Cole and Pirates beat Padres 4-1