The hardest gcd problem GCDDIV

All submissions for this problem are available.<h3>Read problems statements in Mandarin chinese, Russian and Vietnamese as well.</h3>

You are given a sequence $A_1, A_2, \dots, A_N$ of positive integers and an integer $K$. You are allowed to perform the following operation any number of times (including zero):

Determine if it is possible to modify the sequence $A$ in such a way that it would satisfy the following condition: there is no positive integer strictly greater than $1$ which divides every element of $A$. (In other words, the greatest common divisor of all elements of $A$ should be $1$.)

Input

Output

For each test case, print a single line containing the string "YES" if it is possible to make the GCD of all elements of $A$ equal to $1$ or "NO" if it is impossible.

Constraints

Subtasks

Subtask #1 (30 points):

Subtask #2 (70 points): original constraints

Example Input

2
3 6
10 15 30
3 4
5 10 20

Example Output

YES
NO