Code Submission Evaluation System Login

HIIT Open 2016

Start:2016-05-28 11:00:00
End:2016-05-28 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2016 - Interesting number

Interesting number

Time limit:1.00 s
Memory limit:256 MB

There are $n$ numbers written on a blackboard. Exactly one of the numbers is interesting because it is both prime and palindrome. Can you find it?

Input

The first input line contains an integer $t$: the number of test cases.

Each test case consists of two lines. The first line contains an integer $n$: the amount of numbers. The second line contains $n$ numbers on the blackboard.

Output

For each test case, output the interesting number.

Constraints
Example

Input:
3
5
12 8 11 14 19
3
6 7 8
4
44 85 100 131


Output:
11
7
131