
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
Josh is older than Fred. Josh notices that if he switches the two digits of his age (an integer), he gets Fred’s age. Moreover, the difference between the squares of their ages is a square of an integer. How old are Josh and Fred?

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