Perez leads Royals to 8-4 victory over Yankees