Red Sox edge Yankees in 10 innings