Mike Yastrzemski hit three home runs, including a tiebreaking solo shot in the 11th inning, and the San Francisco Giants recovered after squandering two late leads, beating the Arizona Diamondbacks 10-9 Friday night.