Problem

Source: IMONST2 2022 Senior #2

Tags: algebra



It is known that there are $n$ integers $a_1, a_2, \cdots, a_n$ such that $$a_1 + a_2 + \cdots + a_n = 0 \qquad \text{and} \qquad a_1 \times a_2 \times \cdots \times a_n = n.$$Determine all possible values of $n$.