Greatest Greatest Common Divisor#1932

Greatest Greatest Common Divisor

2 seconds
256 megabytes
Very easy

Andrew has just made a breakthrough in sociology: he realized how to predict whether two people will be good friends or not. It turns out that each person has an inner friendship number (a positive integer). The quality of friendship between two people is equal to the greatest common divisor of their friendship numbers.

That means there are prime people (whose friendship numbers are prime) who have difficulty finding a friend, and... Wait, this is no longer relevant.

You are given the friendship numbers for a group of people. Find the largest possible quality of friendship among all pairs of people.

Input

The first line contains an integer (2 \leq n \leq 100000) — the number of people. Each of the next lines contains one integer from to (inclusive) — the friendship number of a person. All friendship numbers are distinct.

Output

Output one integer — the largest possible value of the quality of friendship. In other words, output the maximum greatest common divisor among all pairs of friendship numbers.

Examples

Example 1

Loading
Loading