
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 real parameters  $p$  for which the equation  $x^3 -2p(p+1)x^2+(p^4 +4p^3 -1)x-3p^3 = 0$ has three distinct real roots which are sides of a right triangle.


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