BOSTON — It’s supposed to rain in Boston on Sunday night, when the Yankees are scheduled to play the Red Sox. The way they are hitting, the Yankees probably should pray for an all-night soaker.

The Yankees might have a better shot against David Price when they return to Fenway in August or September. A rainout could save the Yankees from beginning May as they ended April — in the throes of a horrific offensive slump.

The Yankees finished the first month of the season at 8-14 after suffering their fourth loss in a row, an 8-0 drubbing by the Red Sox on Saturday night.

Rick Porcello and two relievers stifled the Yankees on five hits. The Yankees came into the game with 16 hits in their last 124 at-bats with runners in scoring position. That wasn’t a huge problem on Saturday night; they only had two opportunities and went hitless.

It was the 17th time in 22 games that the Yankees had scored three or fewer runs (3-14) and the 12th time they had scored two or fewer runs (0-12).

Before the game, hitting coach Alan Cockrell expressed confidence in his batters’ track records.

“We have an accomplished group in that clubhouse that has been through this before,” he said. “You play this game long enough, you’re around this game long enough, this kind of thing happens. We’re not going to try to reinvent the wheel with these guys . . . There’s no panic here whatsoever.”

Asked if the prolonged team slump weighed on him personally, Cockrell said: “Not really. This can be a frustrating game at times. But we’ve got an accomplished group, so they’re confident and we’re definitely confident in their abilities.”

Michael Pineda, who allowed four home runs in his last outing, rebounded to allow two runs in five innings. The Red Sox took a 2-0 lead in the second on Mookie Betts’ bloop two-out, two-run double to rightfield.

Pineda (1-3, 6.33 ERA) kept Boston in the ballpark, but he had two other problems. The first was a high pitch count (76 after three innings, 106 total) that limited him to five frames and exposed the soft underbelly of the Yankees’ bullpen.

The other was an inability to put the Red Sox away with two outs. In their first eight plate appearances with two outs, the Red Sox were 5-for-7 with a walk.

The rally in the second took place after Pineda retired the first two batters. Christian Vazquez singled and Jackie Bradley Jr. doubled off the Green Monster before Betts dunked the next pitch in front of Carlos Beltran for a 2-0 Boston lead.

Bradley went 3-for-3 with the double, two triples and three RBIs.

The Yankees tried for a little two-out lightning of their own in the fifth when Didi Gregorius walked and Chase Headley singled him to third.

Headley’s liner went off the glove of third baseman Travis Shaw and trickled into short leftfield. An attempt was made to nail Gregorius at third, but the throw was way off line. Porcello saved a run when he made a diving stop of the errant throw backing up third. He then retired Jacoby Ellsbury on a grounder to second to preserve the shutout.

With Pineda done, Joe Girardi called on Chasen Shreve to start the sixth. Shreve walked Brock Holt with one out before allowing a two-out RBI triple to Bradley. Kirby Yates was next and he gave up an RBI single off Gregorius’ glove to make it 4-0.

Porcello (5-0, 2.76) went seven innings and allowed five hits with one walk and six strikeouts.

David Ortiz, who hit what proved to be a game-winning homer on Friday night, led off Boston’s four-run seventh with a blast to right off Johnny Barbato. It was Big Papi’s 49th regular-season home run against the Yankees (48 with the Red Sox, one with the Twins).

Bradley also had a two-run triple in the inning.