0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-11 07:26:25 +00:00
OI-codes/CodeForces/1604/C/C.cpp

32 lines
655 B
C++
Raw Normal View History

#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;
}