Yankees rally to beat Twins 6-4