
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 $P=\{x \mid |x-1|>2\}$, $S=\{x \mid x^2-(a+1)x+a>0\}$  
(1) If $a=2$, find the set $S$;  
(2) If $a \neq 1$, and $x \in S$ is a necessary condition for $x \in P$, find the range of the real number $a$.

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