#p10184. 优雅的数组

优雅的数组

Background

Description

一个数组是优雅的,当且仅当存在两个数字i和j(1<i=i<j<=n),使得对于所有k(1<=k<=n)来说,aka_k 都可以被 aia_iaja_j 整除。 现在需要你判断每个数组是不是好的。

Format

Input

第一行包含一个整数 T(T50)T(T\le 50) 表示询问的数量。 接下来每个询问包含两行,第一行一个正整数 n(2n105)n(2 \le n\le 10^5) 表示数组长度,第二行 n 个正整数表示 ai(1ai109)a_i(1\le a_i\le 10^9)

Output

对于每个询问输出一行。
如果该数组是好的,输出 Yes;
如果该数组是不好的,输出 No;

Samples

5
3
7 3 8
5
7 1 9 3 5
5
4 12 2 6 3
5
7 49 9 3 1000000000
5
1 2 4 8 16
No
Yes
Yes
No
Yes

Limitation

1s, 256MB for each test case.