Yanks overtake Red Sox for wild card with doubleheader sweep