Question 44
Given a prime number $p \gt 2$. There are $N$ people in a circle, each one came up with a positive integer and then wrote down the remainder when divided by $p$ on a piece of paper. Then everyone showed their piece of paper to the neighbor on the right, computed the product of their number on a piece of paper and their neighbor's number, and wrote down the second number, which is the remainder of a product divided by $p$. What is the largest value that $N$ could be, if it is known that everyone's first numbers are pairwise distinct, and each piece of paper has two distinct numbers written down?