
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
Sergei chooses two different natural numbers  $a$  and  $b$ . He writes four numbers in a notebook:  $a$ ,  $a+2$ ,  $b$  and  $b+2$ . He then writes all six pairwise products of the numbers of notebook on the blackboard. Let  $S$  be the number of perfect squares on the blackboard. Find the maximum value of  $S$ .

*S. Berlov*

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