
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 positive integers \( a \) such that there exists a polynomial \( P(x) \) with integer coefficients and a polynomial
$$
Q(x) = a_1 x + a_2 x^2 + \cdots + a_{2016} x^{2016},
$$
where \( a_i \in \{-1, 1\} \) for \( i = 1, 2, \ldots, 2016 \), satisfying
$$
(x^2 + a x + 1) P(x) = Q(x).

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