People have ten fingers, so we use base 10. For example, $257$ means $2 \times 10^2 + 5 \times 10^1 + 7 \times 10^0$, and each digit in base 10 ranges from $0$ to $9$.
Besides base 10, the bases used most often are base 2, base 8, and base 16. In base $b$, each digit ranges from $0$ to $b-1$, and going from right to left the weight of each position grows as $b^0, b^1, b^2, \dots$.
For example, the decimal number $9$ is written in several bases as follows.
All three of these representations are palindromes. A palindrome is a sequence that reads the same forwards and backwards. English examples include "dad", "mom", and "racecar"; numeric examples include $9$, $11$, and $1001$.
Given a decimal integer $X$, write a program that finds every base $b$ ($2 \le b < X$) for which $X$ written in base $b$ is a palindrome.
The first line contains an integer $X$. ($2 \le X \le 1{,}000{,}000{,}000$)
Print every base $b$ for which $X$ written in base $b$ is a palindrome, one per line in increasing order. If there is no such $b$, print nothing.