A successful homestand injected some much-needed confidence into the New York Yankees. A winless one has the Arizona Diamondbacks at a new low.

Both will try to move up from last place in their respective divisions when the Yankees visit the Diamondbacks on Monday night.

New York (16-20) was facing major offensive issues during a 1-7 rut earlier this month and entered a 10-game homestand buried in last place in the AL East. The Yankees are still there but just barely and with a whole new perspective after leaving with seven wins.

The best part: they won each of their series against rival Boston, defending World Series champion Kansas City and the AL-Central Chicago White Sox.

''It really shows we're capable of winning against good teams,'' Carlos Beltran said.

A boost in run production played a huge part. New York had averaged 2.57 runs its previous 21 games but churned them out at a rate of 4.8 per game the last three series at Yankee Stadium.

Beltran hit his fourth home run of the homestand in Sunday's 7-5 win over the White Sox - becoming the fourth MLB switch hitter with 400 in his career - and Brian McCann also went deep.

Chase Headley lined a pinch-hit tiebreaking double in the seventh inning, capping a .333 homestand - which moved his batting average to a season-high .200 after entering at .151.

''Obviously, it's a big homestand for the whole team,'' Headley said. ''I think we're playing the way we're capable of.''

While New York's lineup is finally clicking - and will try to give the Yankees their 12th win in the last 16 meetings of this series - Arizona's has stumbled during a five-game skid.

The Diamondbacks (17-23) have scored seven runs their last four games, and shuffling their lineup didn't help in Sunday's 2-1 loss to San Francisco - opening a seven-game homestand with a four-game sweep.

Arizona's lone run came on Paul Goldschmidt's sacrifice fly, and the Diamondbacks stranded runners at third four other times, twice with one out. Goldschmidt was moved to fourth in the lineup, while Chris Owings shifted from center field to shortstop, and catcher Chris Herrmann manned center.

Michael Bourn was also promoted from Double-A and is likely to see time in center field.

''It is difficult to score runs, more difficult than people think, when a runner is on third,'' manager Chip Hale said. ''(But) we are not doing a good job offensively that way. We have to get better.''

They will try to do it against Chad Green, who makes his MLB debut after Michael Pineda's start was pushed back to Tuesday.

The 24-year-old right-hander posted a 1.22 ERA in seven starts at Triple-A Scranton/Wilkes-Barre before getting called up on Saturday to provide the Yankees with bullpen depth.

Arizona will counter with another 24-year-old, Robbie Ray. After opening the season with three quality starts, Ray (1-2, 4.84 ERA) has failed to complete five innings in three of his last four while compiling a 7.94 ERA.

The left-hander allowed nine hits and five runs - three earned - in 4 2/3 innings of Wednesday's 8-7 loss at Colorado. He walked three but struck out a career-high nine.