mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 18:56:28 +00:00
32 lines
655 B
C++
32 lines
655 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int t, n, a[100005];
|
|
|
|
int main() {
|
|
scanf("%d", &t);
|
|
while (t--) {
|
|
bool flag = true;
|
|
scanf("%d", &n);
|
|
for (int i = 1; i <= n; i++) {
|
|
scanf("%d", a + i);
|
|
}
|
|
for (int i = 1; i <= n; i++) {
|
|
bool t = false;
|
|
for (int j = 2; j <= i + 1; j++) {
|
|
if (a[i] % j) {
|
|
t = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!t) {
|
|
flag = false;
|
|
break;
|
|
}
|
|
}
|
|
printf("%s\n", flag ? "YES" : "NO");
|
|
}
|
|
return 0;
|
|
}
|