//
// main.cpp
// PATA1128
//
// Created by Phoenix on 2018/2/25.
// Copyright © 2018年 Phoenix. All rights reserved.
//
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 1010;
int main(int argc, const char * argv[]) {
int n;
scanf("%d", &n);
for(int i = 0; i < n; i++) {
bool flag = true;
int table1[maxn * 2] = {0}, table2[maxn * 2] = {0};
int row[maxn] = {0};
int k;
scanf("%d", &k);
for(int j = 1; j <= k; j++) {
int a;
scanf("%d", &a);
if(row[a] == 0) row[a] = 1;
else flag = false;
if(table1[j + a] == 0) table1[j + a] = 1;
else flag = false;
if(table2[k + 1 - j + a] == 0) table2[k + 1 - j + a] = 1;
else flag = false;
}
if(flag) printf("YES\n");
else printf("NO\n");
}
return 0;
}