시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB153604234.426%

문제

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.

입력

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 a single integer, denoting the maximum GCD of the array after any number of modulo operations.

예제 입력 1

3
3 10 7

예제 출력 1

3