Definition
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.For example, 2, 3, 5, 7, and 11 are prime numbers.
Input
The first line contains the number of elements N.
The second line contains N integers representing the elements of the array, each number separated by one space.
Constraint
1 ≤ N ≤1000
1< a[i] < 109,0≤i≤N-1.
Output
Please print out the largest prime number in the array.
If there is no prime number, print 0.
Sample
Input
4
8 10 12 14
6
17 23 15 19 21 22
Output
0
23
Class:
Sample 1
Sample 2
Practical Paper
3/4
Zoom
+ 100%
Close