Given an integer $$$x$$$, find the largest integer $$$y \leq x$$$ such that $$$y$$$ is a prime and can be written as a factorial, if such a $$$y$$$ does not exist print $$$-1$$$.
An integer $$$y$$$ can be written as a factorial if there exists an integer $$$z$$$ such that $$$1 \cdot 2 \cdot \ldots \cdot (z-1) \cdot z = y$$$.
The only line of input contains the integer $$$x$$$ $$$(1 \leq x \leq 10^5)$$$.
Print the largest integer $$$y \leq x$$$ such that $$$y$$$ is a prime and can be written as a factorial, if such a $$$y$$$ does not exist print out $$$-1$$$.
1
-1
2
2