Given an array A of n integers. Find the maximum value of GCD(Ai,Aj) with 1≤i<j≤n.
- The first line contains an integer n.
- The next line contains n integers Ai.
Output
- Print the maximum value of GCD(Ai,Aj).
Constraints
- 2≤n≤105.
- 1≤Ai≤106.
Example
Input:
4
3 6 5 2
Output:
3