Gwendoline rolls a pair of six-sided dice and records the product of the two values rolled. She continues rolling the dice and recording the product until one of the products appears for a third time. What is the maximum number of times Gwendoline will need to roll the two dice?

Let's think step by step and output the final answer within \boxed{}.
user