
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
Find all possible values of the positive integer \( n \) for the following two problems:
(1) There exist \( a_{1}, a_{2}, \cdots, a_{n} \) such that \( a_{i} \) and \( a_{i} + i \) (for \( 1 \leq i \leq n \)) each form a complete residue system modulo \( n \).
(2) There exist \( a_{1}, a_{2}, \cdots, a_{n} \) such that \( a_{i}, a_{i} + i \), and \( a_{i} - i \) (for \( 1 \leq i \leq n \)) each form a complete residue system modulo \( n \).

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