No coach ever wishes foul trouble upon his or her basketball team, but Katie Kelly, Amanda McMahon and Sydney Rosenoff give Commack’s Denis Conroy a luxury.

Those three underclassmen — two sophomores and Rosenoff, an eighth-grader — have proved they can come off the bench, change a game’s pace and provide a spark. That was certainly the case Wednesday in No. 1 Commack’s 79-65 win over No. 9 Kings Park in a Suffolk AA quarterfinal.

Jillian Spagnuola carried the Cougars (20-2) with 29 points, but no other starter scored more than six, largely because of foul trouble that opened the door for Kelly (18 points) and McMahon (10) to supplement Spagnuola’s offensive dominance and Rosenoff to contribute defensively.

“One of the things that’s made us good all year is that the bench is good,” Conroy said. “We have three solid kids that come off the bench with Sydney and Katie and Mandy, and it’s also a little bit of a changeup because Mandy and Katie play very fast.”

The change of pace provided by Kelly and McMahon helped Commack turn a 20-12 lead after one quarter into a 43-26 advantage at halftime. The Cougars forced 17 turnovers in the first half, breaking out in transition and scoring quickly.

In the second quarter, Spagnuola nailed three three-pointers and scored 13 points. Kelly (7 points, two three-pointers) and McMahon (3 points, one three-pointer) provided the rest of the offense.

advertisement | advertise on newsday

“They were leaving me open because I don’t really score a lot, but I made them pay for it,” Kelly said. “Jill, she just does that every game.”

After Spagnuola split a pair of foul shots to start the third quarter, Kings Park (14-7) caught fire. Samantha Schultz scored seven of her 24 points during a 14-4 run that spanned a little more than four minutes and cut the gap to 48-40.

But Commack closed the quarter on a 9-2 run to gain separation, with two layups by Kelly leading the way.

“We know they’re such a great team,” Spagnuola said, “and we knew that there were going to be times that they were going to play really well.”

Kings Park used a 9-0 run in the fourth to trim a 68-47 deficit to 12 points, but Kelly’s layup with 2:50 remaining ended the spurt and helped the Cougars advance.

“We really wanted this,” Spagnuola said. “We’ve been playing Kings Park for years, and it’s always been a battle.”