
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 the pairs of positive integers  $(x,p)$  such that p is a prime,  $x \leq 2p$  and  $x^{p-1}$  is a divisor of  $ (p-1)^{x}+1$ .

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