
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
Let \( n \geq 3 \) be a natural number. Let \( x \) and \( y \) be distinct natural numbers between 1 and \( n-1 \). We say that \( x \) and \( y \) are friends if there exist natural numbers \( a \) and \( b \) such that \( ax = by \neq 0 \pmod{n} \).

Determine the values of \( n \) for which every integer between 1 and \( n-1 \) has an even number of friends between 1 and \( n-1 \).

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