How many times have you heard an athlete faced with the daunting task of slaying a dominating team spit out the following cliché:

“To be the best you have to beat the best.’’

Well, when it comes to what the Yankees are up against in the ALCS, the cliché is more truth than simply something to say.

Thanks to the Astros beating the Rays, 6-1, in a deciding Game 5 of the ALDS on Thursday night in Houston, the Yankees and Astros will battle for the ALCS title and a ticket to the World Series.

Games 1 and 2 are set for Minute Maid Park on Saturday and Sunday in the best-of-seven affair. Games 3, 4 and 5 (if necessary) will be played in The Bronx. If Games 6 and 7 are required, they are in Houston.

And the winner of the ALCS will have four home games in the World Series.

The Astros won a major league-high 107 games to the Yankees’ 103. In Justin Verlander and Gerrit Cole, they have starters who are expected to finish one-two in the AL Cy Young race. And Zack Greinke is the third starter. Alex Bregman is a serious AL MVP candidate and the lineup is loaded with dangerous hitters.

Having gone 12-7 against the Rays this year and 3-4 versus the Astros, the Yankees knew more about their fellow AL East member.

Yet, after beating Greinke and Verlander in back-to-back ALDS games to erase a 0-2 deficit, the Rays couldn’t solve Cole who dominated them twice.

“Obviously with Houston, I think a lot of people would look at them as going into this postseason as kind of the odds-on favorite,’’ Yankees manager Aaron Boone said. “Really kind of a complete team with elite starting pitching, a good bullpen and star players. We know they’re a load.’’

There was much talk about the Yankees gaining something by the Astros going five games with the Rays. Yet, they can line up Greinke, Verlander and Cole in the first three games, so just because Verlander and Cole won’t pitch Games 1 and 2 doesn’t handicap the Astros.

As for the Yankees, Boone hesitated to name the order he will use his starters for the first three games until the Yankees’ opponent was identified. It’s likely Boone will use James Paxton, Masahiro Tanaka and Luis Severino in some order, with the possibility that Tanaka will pitch Game 3 at home after starting Game 2 of the ALDS against the Twins at Yankee Stadium.

“They are just a good team. At this stage everyone is a good team. Houston is good,’’ reliever Zack Britton said of the Astros, who swept the Yankees in three games at Minute Maid Park in April and lost three of four in The Bronx in June. “Just executing to all these lineups. That’s the biggest thing.’’

It will be the second time in three seasons the Astros and Yankees will meet in the ALCS. In 2017 the Astros won two at home, lost three at Yankee Stadium and won Games 6 and 7 to get to the World Series.

A lot of the players in each dugout remain, but Cole and Greinke weren’t Astros then. Giancarlo Stanton, Gleyber Torres, Gio Urshela and DJ LeMahieu weren’t Yankees. Astros manager A.J. Hinch was there; Boone hadn’t yet left the broadcast booth for the manager’s chair in The Bronx.

From the All-Star break forward the Astros and Yankees were considered the best teams in the American League. Now, for the second time in three years, they decide who goes to the World Series.

For the Yankees it would be their first trip since 2009, when they won it by beating the Phillies. The Astros used the 2017 ALCS title to beat the Dodgers in the World Series.

“To be the best you have to beat the best” isn’t a cliché when it comes to this ALCS. For each team, it’s the truth.