Grace says that at her family home, Will learned the answer to the question from the title.
Pam and her boyfriend know all the songs from the musical.
The movie poster hangs on the wall of Grace's bedroom. Will is turned on by the sight of Kevin Bacon on it.
Jack calls the story of how Will and Grace met and dated in the 80s the story about "when Mary met Sally."
Dialogue quoted in an $800 clue in the category "TV Laugh Lines"