#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define pb push_back
#define mp make_pair
#define yes cout<< "YES"<< '\n'
#define no cout<< "NO"<< '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define srt(v) sort(all(v))
#define rsrt(v) sort(rall(v))
#define gcd(a,b) __gcd(a, b)
#define lcm(a,b) ((a) * (b)) / gcd(a, b)
#define out cout<< '\n'
#define endl '\n'
#define debug(x) cout<< #x<< " "<< x<< endl
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
void solve()
{
int n;
ll sum= 0LL;
cin>> n;
vector<int> v(n);
for(int& num : v){
cin>> num;
sum+= num;
}
if((n*(n+1) >> 1) == sum)
cout<< "YES\n";
else
cout<< "NO\n";
}
int main(){
/*#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif*/
int t;
cin >> t;
while (t--) {
solve();
}
return 0;
}