Perez’s HR off Holmes in 9th leads Royals over Yanks 8-6