Codeforces Round 837 (Div. 2)
C
Hossam and Trainees
Codeforces
1600
原题
← BD →
翻译中…

Hossam has $n$ trainees. He assigned a number $a_i$ for the $i$-th trainee.

翻译中…

A pair of the $i$-th and $j$-th ($i \neq j$) trainees is called successful if there is an integer $x$ ($x \geq 2$), such that $x$ divides $a_i$, and $x$ divides $a_j$.

翻译中…

Hossam wants to know if there is a successful pair of trainees.

翻译中…

Hossam is very tired now, so he asks you for your help!

翻译中…

Input

翻译中…

The input consists of multiple test cases. The first line contains a single integer $t$ ($1 \le t \le 10^5$), the number of test cases. A description of the test cases follows.

翻译中…

The first line of each test case contains an integer number $n$ ($2 \le n \le 10^5$).

翻译中…

The second line of each test case contains $n$ integers, the number of each trainee $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^9$).

翻译中…

It is guaranteed that the sum of $n$ over all test cases does not exceed $10^5$.

翻译中…

Output

翻译中…

Print the answer — "YES" (without quotes) if there is a successful pair of trainees and "NO" otherwise. You can print each letter in any case.

翻译中…

Note

翻译中…

In the first example, the first trainee and the second trainee make up a successful pair:

翻译中…

$a_1 = 32, a_2 = 48$, you can choose $x = 4$.

翻译中…

样例

Input #1
2
3
32 48 7
3
14 5 9
Output #1
YES
NO
InputCopy OutputCopy
题目信息
题号
1771C
时间限制
3 s
内存限制
256 MB
标签
贪心
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。