Problem

Source: AllRussian-2014, Grade 9, day1, P2

Tags: number theory, number theory proposed



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