Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

K. Maximum GCD
time limit per test
1 second
memory limit per test
1024 mebibytes
input
standard input
output
standard output

Grammy has an array of length $$$n$$$. She recently learned about the concept of greatest common divisor(GCD). Recall that the GCD of an array is the maximum integer $$$d$$$ such that every element in the array is divisible by $$$d$$$. Grammy thinks that the GCD of an array should be as large as possible so that the array can be beautiful.

You want to help Grammy to make her array beautiful, so you decided to do some (possibly zero) modulo operations on each of the elements in the array. In other words, for each operation, you can choose a number $$$a_i$$$ ($$$1 \leq i \leq n$$$) in the array and choose another integer $$$x$$$, and then replace $$$a_i$$$ with $$$(a_i\bmod x)$$$. Since Grammy does not want $$$0$$$ to appear in her array, you cannot change $$$a_i$$$ into $$$0$$$ by doing the modulo operation.

Now, your task is to calculate the maximum GCD of the array after several (possibly zero) modulo operations.

Input

The first line contains a single integer $$$n$$$ ($$$1 \leq n \leq 10^5$$$), denoting the number of elements in the array.

The second line contains $$$n$$$ positive integers $$$a_i$$$ ($$$1 \leq a_i \leq 10^9$$$), denoting the initial elements of Grammy's array.

Output

Output a single integer, denoting the maximum GCD of the array after any number of modulo operations.

Example
Input
3
3 10 7
Output
3