Question 17
On the board, there are written numbers $1, 2, 3, \dots, 2023^{2024}$. At each step, it is allowed to erase any two numbers $a, b$ on the board and then replace them with $\gcd(2024ab, a^2 + 254ab + b^2)$, keep doing this until there is only one number $x$ left. Find all possible values of $x$.