Problem

Source: Baltic Way 1993

Tags: number theory proposed, number theory



$a_1a_2a_3$ and $a_3a_2a_1$ are two three-digit decimal numbers, with $a_1$ and $a_3$ different non-zero digits. Squares of these numbers are five-digit numbers $b_1b_2b_3b_4b_5$ and $b_5b_4b_3b_2b_1$ respectively. Find all such three-digit numbers.