
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 function $f(x) = x^2 - (a+1)x + b$,  
(1) If the solution set of $f(x) < 0$ is $(-5, 2)$, find the values of $a$ and $b$;  
(2) If $a = b$, solve the inequality $f(x) > 0$.

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