Ke’Bryan Hayes and Josh Palacios went yards back-to-back in the seventh inning to help the Pittsburgh Pirates beat the St. Louis Cardinals 7-5.