Cousins, Hayes power Marlins past Pirates