
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given an $n \times n (n \geqslant 2)$ grid filled with -1 and +1, where the cell at the intersection of the $i$-th row and $j$-th column is denoted as $(i, j)$, and cells $(i-1, j)$, $(i+1, j)$, $(i, j-1)$, and $(i, j+1)$ are considered the neighbors of $(i, j)$, with addition and subtraction under modulo $n$. An operation consists of changing the number in each cell $(i, j)$ to the product of its four neighbor cells. Determine all values of $n$ for which, for any $n \times n$ grid, after a finite number of operations, all numbers in the grid become +1.

Present the answer in LaTex format: \boxed{Your answer}
user