
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 the sets
$$
\begin{array}{l}
A=\left\{(x, y) \mid x=m, y=-3m+2, m \in \mathbf{Z}_{+}\right\}, \\
B=\left\{(x, y) \mid x=n, y=a\left(a^{2}-n+1\right), n \in \mathbf{Z}_{+}\right\},
\end{array}
$$

find the total number of integers $a$ such that $A \cap B \neq \varnothing$.

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