#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ll long long
#define ld long double
ll const N=1e6+5;
ll const INF=8223372036854775807;

#define pb push_back
#define popb pop_back()
#define pf push_front
#define popf pop_front()
#define si size()
#define be begin()
#define en end()
#define all(v) v.be, v.en
#define len length()
#define mp make_pair
#define mt make_tuple
#define umap unordered_map
#define uset unordered_set
#define acc(v) accumulate(all(v), 0)
#define F first
#define S second

#define forz(i, n) for (ll i = 0; i < n; i++)
#define fore(i, m, n) for (ll i = m; i <= n; i++)
#define rforz(i, n) for (ll i = n - 1; i >= 0; i--)
#define rfore(i, m, n) for (ll i = n; i >= m; i--)
#define deci(n) fixed << setprecision(n)
#define high(n) __builtin_popcount(n)
#define highll(n) __builtin_popcountll(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define lb lower_bound
#define ub upper_bound
#define er equal_range
#define maxe *max_element
#define mine *min_element
#define mod 1000000007
#define mod2 998244353
#define gcd __gcd
#define prag ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)

#define endl "\n"
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c << endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << endl

int isPalindrome(int A) {
    string s=to_string(A);
    string copy=s;
    reverse(s.begin(),s.end());
    if(s==copy)
    return 1;
    else
    return 0;

}

ll fact(ll n,ll MOD)
{
    if(n==0 || n==1)
    return 1;
    return  ((n%MOD)*(fact(n-1,MOD)%MOD))%MOD;
}

ll poww(ll x,ll y,ll MOD)
{  ll ans=1;
   while(y)
   {
      if(y%2==1)  ans=(ans%MOD*x%MOD)%MOD;

      x=(x%MOD*x%MOD)%MOD;

      y/=2;
   }

    return ans%MOD;
}

ll modi(ll a,ll MOD){
    return poww(a,MOD-2,MOD);
}

// ll gcd(ll a,ll b)
// {
//     if(a==0)
//     return b;
//     if(a>b) return gcd(a%b,b);
//     else  return gcd(b%a,a);
// }

ll lcm(ll a,ll b){
    return (a*b)/(gcd(a, b));
}

ll max(ll a,ll b){
    if(a>b){
        return a;
    }else{
        return b;
    }
}

ll min(ll a,ll b){
    if(a<b){
        return a;
    }else{
        return b;
    }
}

ll nCr(ll n,ll k){
    ll C[n + 1][k + 1];
    ll i, j;
    for(i=0;i<=n;i++){
        for(j=0;j<=min(i,k);j++){
            if(j==0||j==i){
                C[i][j]=1;
            }else{
                C[i][j]=C[i-1][j-1]+C[i-1][j];
            }
        }
    }
    return C[n][k];
}

int giveno(vector<int> v)
{
    int ans=0;
    for(int i=0;i<v.size();i++)
    ans = ans*10+v[i];

    return ans;

}

ll solve(ll r,ll m,ll b)
{      ll an= r/m;
       ll cor= min(r,an*m+b-1)-(an*m)+1;
       ll tot=((r/m)-1)*b+cor+b-1;

       return tot;

}

bool cc(string A,string B)
  {return A.length()>B.length();}

ll solve(ll** arr,bool** visited,ll dcount,ll i,ll j,ll m,ll n)
{

     dcount++;
     visited[i][j]=true;
     if(i<m-1)
     {
         if(arr[i+1][j]== -1) {arr[i+1][j]=dcount; }
     }

     if(i>0)
     {
         if(arr[i-1][j]== -1) {arr[i-1][j]=dcount; }
     }

     if(j<n-1)
     {
         if(arr[i][j+1]==-1) {arr[i][j+1]=dcount;}
     }

     if(j>0)
     {
         if(arr[i][j-1]==-1) {arr[i][j-1]=dcount;}
     }

}

vector<ll> res;
///generates a no of 18 digits or less having not more than 3 non zero digits
void gen(int pos, int cnt, long long cur){
    if (pos == 18){
        res.push_back(cur);
        return;
    }

    gen(pos + 1, cnt, cur * 10);

    if (cnt < 3)
        for (int i = 1; i <= 9; ++i)
            gen(pos + 1, cnt + 1, cur * 10 + i);
}

vector<ll> vec(N+1);

void precalc()
{   vec[1]=2; vec[0]=0;
    fore(i,2,N)
     vec[i]=vec[i-1]+3*i-1;
}

int main()
{ prag;

  precalc();

  ll t;
  cin>>t;
  while(t--)
  {

     ll n,cnt=1;
     bool flag=false;
     vector<ll> vec;
     cin>>n;
     forz(i,n)
     {
         ll num;
         cin>>num;
         vec.pb(num);

     }

     forz(i,n)
     {  fore(j,i+1,n-1)
       {
          if((vec[i]-vec[j]+n)%n == cnt) {flag=true; break;}
          cnt++;
       }

       if(flag) break;

      cnt=1;

     }

     if(flag) p1("NO");
     else p1("YES");

  }

  return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        set<int> a;
        for(int i=0;i<n;i++){
            int k;
            cin>>k;
            k=abs(k+i)%n;
            a.insert(k);
        }
        puts(a.size()==n?"YES":"NO");
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        set<int> a;
        for(int i=0;i<n;i++){
            int k;
            cin>>k;
            k=(abs(k)%n+i)%n;
            a.insert(k);
        }
        puts(a.size()==n?"YES":"NO");
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        set<int> a;
        for(int i=0;i<n;i++){
            int k;
            cin>>k;
            k=abs(k)%n+i;
            a.insert(k);
        }
        puts(a.size()==n?"YES":"NO");
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v(n+1);
        int f=0;
        for(int i=1;i<=n;i++){
            int k;
            cin>>k;
            k=(abs(k)%n+i)%n;
            if(v[k]){
                f=1;
            }
            else v[k]++;
        }
        if(f) cout<<"NO"<<ln;
        else cout<<"YES"<<ln;
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        set<int> a;
        for(int i=0;i<n;i++){
            int k;
            cin>>k;
            k=((k+i)%n+n)%n;
            a.insert(k);
        }
        puts(a.size()==n?"YES":"NO");
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        set<int> a;
        for(int i=1;i<=n;i++){
            int k;
            cin>>k;
            k=((k+i)%n+n)%n;
            a.insert(k);
        }
        puts(a.size()==n?"YES":"NO");
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        vi v(n+1);
        int f=0;
        for(int i=1;i<=n;i++){
            ll k;
            cin>>k;
            k=(abs(k)%n+i)%n;
            if(v[k]){
                f=1;
            }
            else v[k]++;
        }
        if(f) cout<<"NO"<<ln;
        else cout<<"YES"<<ln;
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        ll n;
        cin>>n;
        set<int> a;
        for(int i=1;i<=n;i++){
            int k;
            cin>>k;
            k=(abs(k)%n+i)%n;
            a.insert(k);
        }
        puts(a.size()==n?"YES":"NO");
    }
	return 0;
}


/*#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <queue>
#include <deque>
#include <vector>*/
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
//#pragma GCC optimize(2)
using namespace std;
/*freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);*/
/*ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(2);*/
/*{//具体随机数据根据题意生成
    freopen("D://ACM duipai//data.txt","w",stdout);
    srand(time(NULL));
    int n=1000;
    while(n--){
        cout<<rand()<<endl;
    }
    return 0;
  }*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out1.txt","w",stdout);WA*/
/*freopen("D://ACM duipai//duipai//bin//Debug//data.txt","r",stdin);
    freopen("D://ACM duipai//duipai//bin//Debug//out2.txt","w",stdout);//AC*/
#define ll long long
#define me(a,b) memset(a,b,sizeof(a))
#define zdebug(a) for(int i=0;i<n;i++) cout<<a[i]<<" ";cout<<endl;
#define zdebug1(a) for(int i=1;i<=n;i++) cout<<a[i]<<" ";cout<<endl;
#define ds(a) cout<<#a<<"="<<a<<endl;
#define dd(a,b) cout<<#a<<"="<<a<<" "<<#b<<"="<<b<<endl;
#define ln "\n"
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
//template<typename>
const ll inf=1e18+10;
const ll mod=1e9+7;
const int maxc=2e5+10;
ll gcd(ll a,ll b){
    return b?gcd(b,a%b):a;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout<<fixed<<setprecision(6);
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v(n+1);
        int f=0;
        for(int i=1;i<=n;i++){
            int k;
            cin>>k;
            k=((k+i)%n+n)%n;
            if(v[k]){
                f=1;
            }
            else v[k]++;
        }
        if(f) cout<<"NO"<<ln;
        else cout<<"YES"<<ln;
    }
	return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u)
{m=(l+u)/2;
if(item==L[m])
{flag=m-1;
break;
}else if(item>L[m])l=m-1;
else u=m+1;
}return flag;
}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
ll solve(ll x, ll n)
{
	if(x>=0 ||mdls(x)%n==0)
	return x%n;
	else
	return n+x%n;
}
int main()
{//cout<<solve(-1337,3);
/*6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11
*/
ll t;
cin>>t;
while(t--)
{ll flag=1;
	ll n,i,j,k,l;
	cin>>n;
	ll a[n],c[n];
	map<ll,ll>mp;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		c[i]=a[i];
	}
	sort(c,c+n);
	ll u=max(mdls(c[0]),mdls(c[n-1]));
	for(i=-(n+u);i<=n+u;i++)
	{
		mp[ a[solve(i,n)] + i ]++;
	}
	for(i=-n;i<=n;i++)
	{
		if(mp[i]!=1)
		{flag=0;
			cout<<"NO"<<endl;
			break;
		}
	}
	if(flag==1)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
#define fo(i , n) for(ll i = 0 ; i < n ; i++)
ll sons(ll x, ll n) {if(x>=0) return x%n;	else return n+x%n;}
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u) {m=(l+u)/2;if(item==L[m]) {flag=m-1; break;} else if(item>L[m]) l=m-1; else u=m+1;} return flag;}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
int main()
{
ll t;
cin>>t;
while(t--)
{
	ll n,i;
	cin>>n;
	ll a[n];
	fo(i,n)
	{
		cin>>a[i];
		a[i]=(((a[i]%n)+n)%n);
	}
	map<ll,ll>mp;
	fo(i,n)
	{
		mp[(i+a[i])%n]++;
	}
	int flag=0;
	fo(i,n)
	{
		if(mp[i]!=1)
		{
			cout<<"NO"<<endl;
			flag=1;
		}
	}
	if(flag==0)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u)
{m=(l+u)/2;
if(item==L[m])
{flag=m-1;
break;
}else if(item>L[m])l=m-1;
else u=m+1;
}return flag;
}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
ll solve(ll x, ll n)
{
	if(x>0)
	return x%n;
	else
	return n+x%n;
}
int main()
{//cout<<solve(-1337,3);
/*6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11
*/
ll t;
cin>>t;
while(t--)
{ll flag=1;
	ll n,i,j,k,l;
	cin>>n;
	ll a[n];
	map<ll,ll>mp;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		mp[ solve(a[i],n) + i ]++;
	}
	for(i=0;i<=2*n;i++)
	{
		if(mp[i]>1)
		{flag=0;
			cout<<"NO"<<endl;
			break;
		}
	}
	if(flag==1)
	cout<<"YES"<<endl;
}
return 0;}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u)
{m=(l+u)/2;
if(item==L[m])
{flag=m-1;
break;
}else if(item>L[m])l=m-1;
else u=m+1;
}return flag;
}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
ll solve(ll x, ll n)
{
	if(x>=0 ||mdls(x)%n==0)
	return x%n;
	else
	return n+x%n;
}
int main()
{//cout<<solve(-1337,3);
/*6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11
*/
ll t;
cin>>t;
while(t--)
{ll flag=1;
	ll n,i,j,k,l;
	cin>>n;
	ll a[n],c[n];
	map<ll,ll>mp;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		c[i]=a[i];
	}
	sort(c,c+n);
	ll u=max(mdls(c[0]),mdls(c[n-1]));
	for(i=-u;i<=n+u;i++)
	{
		mp[ a[solve(i,n)] + i ]++;
		if(mp[i]>1)
		{flag=0;
			cout<<"NO"<<endl;
			break;
		}
	}
	if(flag==1)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
#define fo(i , n) for(ll i = 0 ; i < n ; i++)
ll sons(ll x, ll n) {if(x>=0) return x%n;	else return n+x%n;}
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u) {m=(l+u)/2;if(item==L[m]) {flag=m-1; break;} else if(item>L[m]) l=m-1; else u=m+1;} return flag;}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
int main()
{
ll t;
cin>>t;
while(t--)
{
	ll n,i;
	cin>>n;
	ll a[n];
	fo(i,n)
	{
		cin>>a[i];
		a[i]=(sons(a[i],n));
	}
	map<ll,ll>mp;
	fo(i,n)
	{
		mp[(i+a[i])%n]++;
	}
	int flag=0;
	fo(i,n)
	{
		if(mp[i]!=1)
		{
			cout<<"NO"<<endl;
			flag=1;
		}
	}
	if(flag==0)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
#define fo(i , n) for(ll i = 0 ; i < n ; i++)
ll sons(ll x, ll n) {if(x>=0) return x%n;	else return n+x%n;}
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u) {m=(l+u)/2;if(item==L[m]) {flag=m-1; break;} else if(item>L[m]) l=m-1; else u=m+1;} return flag;}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
int main()
{
ll t;
cin>>t;
while(t--)
{
	ll n,i;
	cin>>n;
	ll a[n];
	fo(i,n)
	{
		cin>>a[i];
		a[i]=(((arr[i]%n)+n)%n);
	}
	map<ll,ll>mp;
	fo(i,n)
	{
		mp[(i+a[i])%n]++;
	}
	int flag=0;
	fo(i,n)
	{
		if(mp[i]!=1)
		{
			cout<<"NO"<<endl;
			flag=1;
		}
	}
	if(flag==0)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
#define fo(i , n) for(ll i = 0 ; i < n ; i++)
ll sons(ll x, ll n) {if(x>=0) return x%n;	else return n+x%n;}
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u) {m=(l+u)/2;if(item==L[m]) {flag=m-1; break;} else if(item>L[m]) l=m-1; else u=m+1;} return flag;}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
int main()
{
ll t;
cin>>t;
while(t--)
{
	ll n,i;
	cin>>n;
	ll a[n];
	fo(i,n)
	{
		cin>>a[i];
		a[i]=(((a[i]%n)+n)%n);
	}
	map<ll,ll>mp;
	fo(i,n)
	{
		mp[(i+a[i])%n]++;
	}
	int flag=0;
	fo(i,n)
	{
		if(mp[i]!=1)
		{
			cout<<"NO"<<endl;
			flag=1;
			break;
		}
	}
	if(flag==0)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u)
{m=(l+u)/2;
if(item==L[m])
{flag=m-1;
break;
}else if(item>L[m])l=m-1;
else u=m+1;
}return flag;
}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
ll solve(ll x, ll n)
{
	if(x>=0 ||mdls(x)%n==0)
	return x%n;
	else
	return n+x%n;
}
int main()
{//cout<<solve(-1337,3);
/*6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11
*/
ll t;
cin>>t;
while(t--)
{ll flag=1;
	ll n,i,j,k,l;
	cin>>n;
	ll a[n],c[n];
	map<ll,ll>mp;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		c[i]=a[i];
	}
	sort(c,c+n);
	ll u=max(mdls(c[0]),mdls(c[n-1]));
	for(i=-u;i<=n+u;i++)
	{
		mp[ a[solve(i,n)] + i ]++;
	}
	for(i=0;i<=n;i++)
	{
		if(mp[i]!=1)
		{flag=0;
			cout<<"NO"<<endl;
			break;
		}
	}
	if(flag==1)
	cout<<"YES"<<endl;
}
return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
#define fo(i , n) for(ll i = 0 ; i < n ; i++)
ll sons(ll x, ll n) {if(x>=0) return x%n;	else return n+x%n;}
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u) {m=(l+u)/2;if(item==L[m]) {flag=m-1; break;} else if(item>L[m]) l=m-1; else u=m+1;} return flag;}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
int main()
{
	/*6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11
*/
ll t;
cin>>t;
while(t--)
{
	ll n,i;
	cin>>n;
	ll a[n];
	fo(i,n)
	{
		cin>>a[i];
		a[i]=(sons(a[i],n));
	}
	map<ll,ll>mp;
	fo(i,n)
	{
		mp[(i+a[i])%n]++;
	}
	int flag=0;
	fo(i,n)
	{
		if(mp[i]!=1)
		{
			cout<<"NO"<<endl;
			flag=1;
		}
	}
	if(flag==0)
	cout<<"YES"<<endl;
}
return 0;
}
�


#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<bits/stdc++.h>
#include<map>
#include<cmath>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define pb push_back
ll bin_srch(ll L[], ll N,ll item)
{ll flag=-2;
int l=0,u=N-1,m;
while(l<=u)
{m=(l+u)/2;
if(item==L[m])
{flag=m-1;
break;
}else if(item>L[m])l=m-1;
else u=m+1;
}return flag;
}
ll modExp(ll b, ll p){ll res = 1;while(p > 0) {if(p & 1){res = (res * b) % MOD;}b = (b * b) % MOD;p >>= 1;}return res;}
ll properdiv(ll x,ll y){if(x%y==0) return x/y;else return x/y+1;}
ll mdls(ll x){return max(x,-x);}
ll solve(ll x, ll n)
{
	if(x>=0 ||mdls(x)%n==0)
	return x%n;
	else
	return n+x%n;
}
int main()
{//cout<<solve(-1337,3);
/*6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11
*/
ll t;
cin>>t;
while(t--)
{ll flag=1;
	ll n,i,j,k,l;
	cin>>n;
	ll a[n],c[n];
	map<ll,ll>mp;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		c[i]=a[i];
	}
	sort(c,c+n);
	ll u=max(mdls(c[0]),mdls(c[n-1]));
	for(i=-u;i<=n+u;i++)
	{
		mp[ a[solve(i,n)] + i ]++;
		if(mp[i]>1)
		{flag=0;
			cout<<"NO"<<endl;
			break;
		}
	}
	if(flag)
	cout<<"YES"<<endl;
}
return 0;
}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;
      bool okey =true;
        set<int> ost;
        for (int k = 0;k<n;k++){
          all.insert(ll(k+a[k]));
          if (a[k]+k<0){
            ost.insert((a[k]+k)%n+n);

          }else{
            ost.insert((a[k]+k)%n);

          }

        }

        if (ost.size()==n){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;

        set<int> ost;
        for (int k = 0;k<n;k++){

            ost.insert(((a[k]+k)%n+n)%n);

        }

        if (ost.size()==n){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;
      bool okey =true;
        vector<int> ost(n);
        for (int k = 0;k<n;k++){
          all.insert(ll(k+a[k]));
          if (a[k]+k<0){
            ost[(a[k]+k)%n+n]++;
            if (ost[(a[k]+k)%n+n]>1) okey = false;
          }else{
            ost[(a[k]+k)%n]++;
            if (ost[(a[k]+k)%n]>1) okey = false;
          }

        }

        if (all.size()==n && okey){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;
      bool okey =true;
        set<int> ost;
        for (int k = 0;k<n;k++){
          all.insert(ll(k+a[k]));
          if (a[k]+k<0)
            ost.insert(((a[k]+k+n)%n+n)%n);

        }

        if (ost.size()==n){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;
        for (int k = -n;k<=n;k++){
          if (k<0){
            all.insert(ll(k+a[k%n+n]));
          }else{
          all.insert(ll(k+a[k%n]));}
          // cout<<k+a[k%n]<<" "<<k<<" "<<k%n<<endl;
        }
        if (all.size()==2*n+1){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;
      bool okey =true;
        set<int> ost;
        for (int k = 0;k<n;k++){
          all.insert(ll(k+a[k]));
          if (a[k]+k<0){
            ost.insert((a[k]+k)%n+n);

          }else{
            ost.insert((a[k]+k)%n);

          }

        }

        if (all.size()==n && ost.size()==n){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


  #include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>

  using namespace std;

  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  int INF = INT_MAX;

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

      int q;
      cin>>q;

  // cout<<(-1)%2<<endl;

      while(q--){
        int n;
        cin>>n;
        vector<ll> a(n);
        for (int i = 0;i<n;i++) {cin>>a[i];}
        set<ll> all;
      bool okey = true;
        vector<int> ost(n);
        for (int k = 0;k<n;k++){
          all.insert(ll(k+a[k]));
          ost[(a[k]+k)%n]++;
          if (ost[(a[k]+k)%n]>1) okey = false;
        }

        if (all.size()==n && okey){
          cout<<"YES\n";
        }else{
          cout<<"NO\n";
        }

      }

}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 2e9;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = -3 * n; i < 3 * n; i++){
        int x = i % n;
        x += n;
        x += INF * n;
        x %= n;
        ss.insert(i + a[x]);
        need++;
//        cerr << i + a[x] << ' ';
    }
    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 2e9;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = 0; i < n; i++){
        int x = i + a[i];
        x %= n;
        x += n;
        x %= n;
        ss.insert(x);
        need++;
//        cerr << x << ' ';
    }
//    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 2e9;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = 0; i < n; i++){
        int x = i % n;
        x += n;
        x %= n;
        ss.insert(i + a[x]);
        need++;
//        cerr << i + a[x] << ' ';
    }
    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 2e9;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = 0; i <= n; i++){
        int x = i % n;
        x += n;
        x %= n;
        ss.insert(i + a[x]);
        need++;
//        cerr << i + a[x] << ' ';
    }
    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 2e9;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = 0; i <= n; i++){
        int x = i + a[i];
        x %= n;
        x += n;
        x %= n;
        ss.insert(x);
        need++;
//        cerr << i + a[x] << ' ';
    }
    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
//#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 2e9;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = -3 * n; i < 3 * n; i++){
        int x = i % n;
        x += n;
        x += INF * n;
        x %= n;
        ss.insert(i + a[x]);
        need++;
//        cerr << i + a[x] << ' ';
    }
    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
#pragma GCC optimize("O3")

#define F first
#define S second
#define pb push_back
#define llong   long long
//#define int  llong
#define ld long double
#define pii pair <int, int>
//#define endl '\n'

#ifdef LOCAL
#else
#define cerr if(0) cerr
#endif // LOCAL

using namespace std;
using namespace __gnu_pbds;

mt19937 gen(time(0));

#ifdef LOCAL
const int N = 2e5 + 1;
#else
const int N = 1e6 + 5;
#endif // LOCAL

const int M = 2e5 + 7;
//const int B = 1100;
const int add1 = 39;
const ld eps = 1e-8;
const llong INF = 1e18;
const int MOD1 = 1e18 + 7;
const int MOD = 11e7 - 6e5 + 7;
const int rx[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int ry[8] = {2, -2, 2, -2, 1, -1, 1, -1};
const char rr[12]= {31, 28, 31, 30, 31, 31, 30, 31, 30, 31, 30, 31};
//typedef cc_hash_table< int, int, hash<int>, equal_it.F<int>, direct_mask_range_hashing<int>, hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true >> ht;

template <typename T> using ordered_set = tree <T, null_type, less< T >, rb_tree_tag,tree_order_statistics_node_update>;

vector <int> s[N];
int sz[N], pr[N];

int get(int v) {
    if (pr[v] == v)
        return v;
    return pr[v] = get(pr[v]);
}

int unite(int x, int y) {
    x = get(x);
    y = get(y);
    if (x == y)
        return 0;
    if (sz[x] < sz[y])
        swap(x, y);
    sz[x] += sz[y];
    pr[y] = x;
    return 1;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // srand(time(0));
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
//    freopen("f.in", "r", stdin);
//    freopen("f.out", "w", stdout);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

#endif

  int t;

  cin >> t;
  while(t--){
    int n;
    cin >> n;
    vector <int> a;

    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.pb(x);
//        ss += x;
    }
    set <int> ss;
    int need = 0;
    for(int i = -3 * n; i < 3 * n; i++){
        int x = i % n;
        x += n;
        x += 2 * n;
        x %= n;
        ss.insert(i + a[x]);
        need++;
//        cerr << i + a[x] << ' ';
    }
    cerr << endl;
    if (ss.size() == need) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t; cin >> t;

    while (t--) {
        int n;
        cin >> n;

        long long a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<long long> st;

        for (long long i = 0; i < n; i++) {
            st.insert((i+a[i%n])%n);
        }

        (st.size()==n) ? cout << "YES" : cout <<"NO";

        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t; cin >> t;

    while (t--) {
        int n;
        cin >> n;

        int a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<int> st;

        for (int i = 0; i < n; i++) {
            st.insert((i+a[i%n])%n);
        }

        (st.size()==n) ? cout << "YES" : cout <<"NO";

        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t; cin >> t;

    while (t--) {
        int n;
        cin >> n;

        long long a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<long long> st;

        for (long long i = 0; i < n; i++) {
            st.insert((i+(a[i]%n))%n);
        }

        (st.size()==n) ? cout << "YES" : cout <<"NO";

        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t; cin >> t;

    while (t--) {
        int n;
        cin >> n;

        long long a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<long long> st;

        for (long long i = 0; i < n; i++) {
            st.insert((i+(a[i]%n)+n)%n);
        }

        (st.size()==n) ? cout << "YES" : cout <<"NO";

        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t; cin >> t;

    while (t--) {
        int n;
        cin >> n;

        long long a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<long long> st;

        for (long long i = 0; i < n; i++) {
            st.insert((i+1+a[i%n])%n);
        }

        (st.size()==n) ? cout << "YES" : cout <<"NO";

        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int t; cin >> t;

    while (t--) {
        int n;
        cin >> n;

        long long a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<long long> st;

        for (long long i = 0; i < n; i++) {
            st.insert((i+1+(a[i]%n))%n);
        }

        (st.size()==n) ? cout << "YES" : cout <<"NO";

        cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pii;
typedef pair<long long,long long> pll;

int main()
{
    int t;
    cin >> t;

    while (t--) {
        int n;
        cin >> n;

        int a[n];
        for (int i = 0; i < n; i++) cin >> a[i];

        set<int> st;
        for (int i = 1; i <= n; i++) st.insert(i + a[i%n]);

        if (st.size() == n) cout << "YES";
        else cout << "NO";

        cout << endl;

    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (i+abs(A[i%N]))%N;
	        //cout<<k<<" ";
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (i+A[i])%N;
	        if(k<N)
	            k += N;
	        //k %= N;
	        //cout<<k<<" ";
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (i+A[i])%N;
	        //cout<<k<<" ";
	        if(k<0){
	            k = (N-k)%N;
	        }
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (A[i]+i)%N;
	        if(k<0){
	            k = (N-k)%N;
	        }
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    for(i=0;i<N;i++){
	        if(A[i]<0){
	            A[i] = N-A[i];
	        }
	        B[(A[i]+i)%N] = i+1;
	    }
	   // for(i=0;i<N;i++){
	   //     cout<<B[i]<<"  ";
	   // }

	    if(*min_element(B.begin(),B.end())!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (A[i]+i)%N;
	        if(k<0){
	            k = (N-k)%N;
	        }
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    if(*min_element(B.begin(),B.end())!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll flag=0;
	    for(i=0;i<N;i++){
	        if(A[i]<0){
	            A[i] = N-A[i];
	        }
	        if(B[(A[i]+i)%N]!=0){
	            flag=1;
	            break;
	        }
	        B[(A[i]+i)%N] = i+1;
	    }
	   // for(i=0;i<N;i++){
	   //     cout<<B[i]<<"  ";
	   // }

	    if(*min_element(B.begin(),B.end())!=0 || flag==0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (i+A[i]%N)%N;
	        //cout<<k<<" ";
	        if(k<0){
	            k = (N-k)%N;
	        }
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (i+A[i])%N;

	            k += N;
	        k %= N;
	        //cout<<k<<" ";
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define mod 1000000007
typedef long long int ll;

int main() {

	// your code goes here
	ll T;
	cin>>T;
	while(T--){
	    ll N,i,temp;
	    cin>>N;
	    vector<ll> A;
	    vector<ll> B;
	    for(i=0;i<N;i++){
	        cin>>temp;
	        A.push_back(temp);
	        B.push_back(0);
	    }
	    ll k;
	    for(i=0;i<N;i++){
	        k = (i+A[i])%N;
	        if(k<0)
	            k += N;
	        //k %= N;
	        //cout<<k<<" ";
	        B[k] = i+1;
	    }/*
	    for(i=0;i<N;i++){
	        cout<<B[i]<<"  ";
	    }
	    cout<<"\n";
	    cout<<-1337%3<<"\n";*/
	    sort(B.begin(),B.end());
	    if(B[0]!=0)
	        cout<<"YES\n";
	    else
	        cout<<"NO\n";
	}

	return 0;
}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        scanf("%d", &n);
        vi v(n);
        map<ll, int> cnt;
        bool ok = 1;
        FOR(i,0,n) scanf("%d", &v[i]);
        FOR(i,0, 3*n + 1)
        {
            ll nw = i + v[i%n]%n;
            cnt[nw]++;
            if(cnt[nw] == 2) ok = 0;
        }
        cout << (ok ? "YES\n" : "NO\n");
    }
    return 0;

}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        scanf("%d", &n);
        vi v(n);
        map<ll, int> cnt;
        bool ok = 1;
        FOR(i,0,n) scanf("%d", &v[i]);
        FOR(i,-2*n, 2*n + 1)
        {
            int nw = i + v[(n + i%n)%n];
            cnt[nw]++;
            if(cnt[nw] == 2) ok = 0;
        }
        cout << (ok ? "YES\n" : "NO\n");
    }
    return 0;

}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        scanf("%d", &n);
        vi v(n);
        map<ll, int> cnt;
        bool ok = 1;
        FOR(i,0,n) scanf("%d", &v[i]);
        FOR(i,0, 3*n + 1)
        {
            ll nw = i + v[i%n];
            cnt[nw]++;
            if(cnt[nw] == 2) ok = 0;
        }
        cout << (ok ? "YES\n" : "NO\n");
    }
    return 0;

}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int was[4000][4000];

int main()
{
    int n;
    cin >> n;

    set<int> s;
    FOR(i,1,n+1) s.insert(i);
    int k = 0;
    int left = 4269;
    vi v(n+1,0);
    while(SZ(s) != 1)
    {
        k++;
        int x = (1 << 12) - 1;
        FOR(c,1,n+1)
        {
            if(c == k) continue;
            int a;
            if(was[c][k]) a = was[c][k];
            else
            {
                cout <<"? "<<k<<' '<<c<<endl;
                cin >> a;

                was[c][k] = a;
                was[k][c] = a;
            }
            x &= a;
        }

        vi dl;
        for(auto c: s)
        {
            if(c == k) continue;
            int a;
            if(was[c][k]) a = was[c][k];
            else
            {
                cout <<"? "<<k<<' '<<c<<endl;
                cin >> a;

                was[c][k] = a;
                was[k][c] = a;
            }
            if(a != x) dl.pb(c);
        }
        for(auto c: dl) s.erase(c);
        if(x % 2) s.erase(k);
    }

    int ind = *s.begin();
    FOR(i,1,n+1)
    {
        if(i == ind) continue;
        if(was[ind][i]) v[i] = was[ind][i];
        else
        {
            cout <<"? "<< ind<<' '<<i<<endl;
            cin >> v[i];
        }

    }
    cout << "! ";
    FOR(i,1,n+1) cout <<v[i]<<' ';
    return 0;

}


#include "bits/stdc++.h"
#include <stdint.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define FORR(i, b, a) for(int i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
#define endl '\n'
const int MOD = 1e9+7;
const ull INF = 1e9 + 7;
const int base = 2e5+1;
const ll MAX = 1e15+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 1e6+47;

int main()
{

    int t;
    cin >> t;
    while(t--)
    {
        int n;
        cin >> n;
        bool ok = 1;
        set<int> s;
        vi a(n);
        FOR(i,0,n){
             scanf("%d", &a[i]);
        }
        FOR(k,0,4*n)
        {
            int x = k + a[k%n];
            s.insert(x);
        }
        cout << (SZ(s)==4*n ? "YES\n" : "NO\n");
    }
    return 0;
}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        scanf("%d", &n);
        vi v(n);
        map<ll, int> cnt;
        bool ok = 1;
        FOR(i,0,n) scanf("%d", &v[i]);
        FOR(i,-3*n, 3*n + 1)
        {
            ll nw;
            if(i < 0) nw = i + v[(n - abs(i)%n)%n];
            else nw = i + v[(n + i%n)%n];
            cnt[nw]++;
            if(cnt[nw] == 2) ok = 0;
        }
        cout << (ok ? "YES\n" : "NO\n");
    }
    return 0;

}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        scanf("%d", &n);
        vi v(n);
        map<ll, int> cnt;
        bool ok = 1;
        FOR(i,0,n) scanf("%d", &v[i]);
        FOR(i,-2*n, 2*n + 1)
        {
            ll nw = i + v[(n + i%n)%n];
            cnt[nw]++;
            if(cnt[nw] == 2) ok = 0;
        }
        cout << (ok ? "YES\n" : "NO\n");
    }
    return 0;

}


#include "bits/stdc++.h"
#include <stdint.h>

#pragma optimize("O3")

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef long double ld;

#define sync                    \
ios_base::sync_with_stdio(0); \
cin.tie(0);                   \
cout.tie(0)
#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define pb push_back
#define mp make_pair
#define fopen freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout)
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, b, a) for(ll i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define REPR(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define ff first
#define ss second
#define pii pair<int,int>
#define pll pair<ll, ll>
#define MP make_pair
//#define endl '\n'

const ll MOD = 100000004987;
const ll INF = 1e9+1;
const int base = 2e5+1;
const ll MAX = 1e6+1;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 500000+47;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        scanf("%d", &n);
        vi v(n);
        map<ll, int> cnt;
        bool ok = 1;
        FOR(i,0,n) scanf("%d", &v[i]);
        FOR(i,-3*n, 3*n + 1)
        {
            ll nw = i + v[(n + i%n)%n];
            cnt[nw]++;
            if(cnt[nw] == 2) ok = 0;
        }
        cout << (ok ? "YES\n" : "NO\n");
    }
    return 0;

}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     unordered_map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n];
     for(int i=0;i<n;i++){
         cin>>a[i];
     }
     for(int j=1;j<=n;j++){

         m1[j+a[(j)%n]]++;
 }
     for(auto i=m1.begin();i!=m1.end();i++){
         if(i->second>1){
           //  cout<<i->second<<"\n";
             f=1;
             break;
         }
     }

       if(f)cout<<"NO\n";
       else cout<<"YES\n";
}

}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n];
     for(int i=0;i<n;i++){
         cin>>a[i];
     }
     for(int j=1;j<=n;j++){
    //   cout<<j+a[(j)%n]<<" ";
         m1[j+a[(j)%n]]++;
 }
     for(auto i=m1.begin();i!=m1.end();i++){
         if(i->second>1){

            //cout<<i->first<<"\n";
             f=1;
             break;
         }
     }

       if(f)cout<<"NO\n";
       else cout<<"YES\n";
}

}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     unordered_map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n+1];
     for(int i=1;i<=n;i++){
         cin>>a[i];
     }
     for(int j=1;j<=n;j++){

         m1[j+a[j%n+1]]++;
 }
     for(auto i=m1.begin();i!=m1.end();i++){
         if(i->second>1){
             f=1;
             break;
         }
     }

       if(f)cout<<"NO\n";
       else cout<<"YES\n";
}

}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n];
     set<int>s;
     for(int i=0;i<n;i++){
         cin>>a[i];
     }
     for(int j=0;j<n;j++){
         s.insert((j+a[(j)%n])%n);
 }
   if(s.size()!=n)cout<<"NO\n";
   else cout<<"YES\n";

}
}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n];
     set<int>s;
     for(int i=0;i<n;i++){
         cin>>a[i];
     }
     for(int j=1;j<=n;j++){
         s.insert((j+a[(j)%n])%n);
 }
   if(s.size()!=n)cout<<"NO\n";
   else cout<<"YES\n";

}
}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n];
     set<int>s;
     for(int i=0;i<n;i++){
         cin>>a[i];
     }
     for(int j=1;j<=n;j++){
         s.insert(j+a[(j)%n]);
 }
   if(s.size()!=n)cout<<"NO\n";
   else cout<<"YES\n";

}
}


#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
#define S second
#define F first
bool sortvec( const vector<int>& v1,
               const vector<int>& v2 ) {
 return v1[0] < v2[0];
}

int main(){

   int t;cin>>t;
   while(t--){
     map<int,int>m1;
     int n;cin>>n;int f=0;
     int a[n];
     set<int>s;
     for(int i=0;i<n;i++){
         cin>>a[i];
     }
     for(int j=0;j<n;j++){
         int temp =(j+a[j])%n;
         if (temp<0 )temp+=n;
         s.insert(temp);
 }
   if(s.size()!=n)cout<<"NO\n";
   else cout<<"YES\n";

}
}


                                            #include<bits/stdc++.h>
                                            using namespace std;

                                            #define FOR(i,a,b) for(int i = (a); i < (b); i++)
                                            #define rep(i,n) FOR(i,0,n)
                                            #define RFOR(i,b,a) for(int i = (b) - 1; i>= (a); i--)
                                            #define ITER(it, a) for(typeof(a.begin()) it = a.begin(); it != a.end(); it++)
                                            #define FILL(a, value) memset(a, value, sizeof(a)

                                            #define SZ(a) (int)a.size()
                                            #define ALL(a) a.begin(), a.end()
                                            #define PB push_back
                                            #define MP make_pair
                                            #define er erase
                                            #define in insert
                                            #define fs first
                                            #define sc second

                                            typedef  long long LL;
                                            typedef vector<int> VI;
                                            typedef vector<LL > VL;
                                            typedef vector<vector<int > > VVI;
                                            typedef vector<vector<LL>> VVL;
                                            typedef vector <vector<pair<int, int >> >VVPI;
                                            typedef vector<vector<pair<LL, LL >> >VVPL;
                                            typedef vector<pair<LL, LL >> PL;
                                            typedef vector<PL> VPL;
                                            typedef pair<int, int> PII;
                                            typedef vector<PII> VPI;

                                            const double PI = acos(-1.0);
                                            const int INF = 1e9;
                                            const LL LINF = (LL)3e18;

                                            const double EPS = 1e-7;
                                            const int MAX = 20 * 1000 + 47;
                                            const int MAS =  5 *1e5 + 10;
                                            const int MOD = 998244353;
                                            const int mod =1e9+7;

                                       struct RMQ{
                                           int n;
                                           int t[MAS] ;
                                           void build_RMQ(int v,int tl ,int tr)
                                           {
                                               if(tl == tr)
                                               {
                                                   t[v] =1;
                                               }
                                               else
                                               {
                                                   int tm = (tl + tr)/2;
                                                   build_RMQ(v * 2, tl ,tm);
                                                   build_RMQ(v * 2 + 1, tm + 1, tr);
                                                   t[v] = t[v * 2] + t[v * 2 + 1];
                                               }
                                           }
                                           void update_RMQ(int v, int tl ,int tr ,int pos )
                                           {
                                               if(tl == tr)
                                               {
                                                   t[v] = 0;
                                               }
                                               else {
                                                   int tm = (tl + tr) / 2;

                                                   if (pos <= tm) {
                                                       update_RMQ(v * 2, tl, tm, pos);
                                                   } else {
                                                       update_RMQ(v * 2 + 1, tm + 1, tr, pos);
                                                   }
                                                   t[v] = t[v *2] + t[v *2 + 1];
                                               }
                                           }
                                           int find_RMQ(int v ,int tl ,int tr, int pos)
                                           {

                                               if (tl == tr)
                                                   return tl;
                                               int tm = (tl + tr) / 2;
                                               if (t[v*2] >=pos)
                                                   return find_RMQ (v*2, tl, tm, pos);
                                               else
                                                   return find_RMQ (v*2+1, tm+1, tr, pos - t[v*2]);
                                           }
                                           int find(int pos)
                                           {
                                               return find_RMQ(1,0,n-1,pos);
                                           }
                                           void update(int pos)
                                           {
                                               update_RMQ(1,0,n-1,pos);
                                           }
                                           void build(int n )
                                           {
                                             this ->n = n;
                                             build_RMQ(1,0,n-1);
                                           }

                                       }T;

                                           struct dsu
                                           {
                                               VI sz,p ;
                                               int n;
                                               void build(int n )
                                               {
                                                   sz.resize(n);
                                                   p.resize(n);
                                               }
                                               void make(int v)
                                               {
                                                   p[v] = v;
                                                   sz[v] = 1;
                                               }
                                               int get(int v)
                                               {
                                                   if(p[v] == v)return v;
                                                   return p[v] = get(p[v]);
                                               }
                                               int combine(int a, int b)
                                               {
                                                   a = get(a);
                                                   b = get(b);
                                                   if(a !=b)
                                                   {
                                                       if(sz[a] < sz[b])swap(a,b);
                                                       sz[a]+=sz[b];
                                                       p[b] =a ;
                                                   }
                                               }

                                           }D;

                                            int main() {
                                                ios_base::sync_with_stdio(false);
                                                cin.tie(NULL);
                                                int test;
                                                cin >> test;
                                                while(test--)
                                                {
                                                    int n;
                                                    cin >> n;
                                                    VI a(n);
                                                    rep(i,n)
                                                    {
                                                        cin >> a[i];
                                                    }
                                                    set<int > s;
                                                    FOR(i,0,n * 10 )
                                                    {
                                                        s.in(i + a[i % n] );
                                                    }
                                                    cout << (SZ(s) == 10* n?"YES":"NO")<< '\n';
                                                }

                                             }


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
using namespace std;
int n,m,a,b[100002],mx;
int main(){
	scanf("%d",&n);
	for(register int i=1;i<=n;++i){
		scanf("%d",&a);
		for(register int j=2;j<=a;++j){
			if(a%j==0){b[j]++;mx=max(mx,j);
			}
			while(a%j==0)a/=j;
		}
	}
	for(register int i=1;i<=mx;++i){
		if(b[i]>m)m=b[i];
	}
	printf("%lld",m);
}


#include<bits/stdc++.h>
using namespace std;
int mindiv[100002],prime[100002],k,c[100000],ans=1,cnt1,mx;
void Euler(int n)
{
    memset(mindiv,0,sizeof(mindiv));
    for(int i=2;i<=n;i++)
    {
        if(!mindiv[i])
            prime[++cnt1]=i,mindiv[i]=i;
        for(int j=1;j<=cnt1;j++)
        {
            if(prime[j]>mindiv[i]||prime[j]>n/i) break;
            mindiv[prime[j]*i]=prime[j];
        }
    }
}
int p[100002];
bool vis[100003];
void divide(int n){
    while (n != 1){
        if (!vis[mindiv[n]]) vis[mindiv[n]]=true,p[mindiv[n]]++;
        n /= mindiv[n];
    }
}
int main()
{
    int n;
	Euler(100005);
    cin>>n;
    for(int i=1;i<=n;i++)
	{
		int a;
		memset(vis,false,sizeof(vis));
		cin>>a;
		divide(a);
		mx=max(a,mx);
	}
	for(int i=2;i<=mx;i++)
		ans=max(ans,p[i]);
	cout<<ans<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,s[100007];
int maxx,vis[100007],pd[100007];
int ans;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;++i)
	{
		int x;
		scanf("%d",&x);
		vis[x]=1;
		maxx=max(x,maxx);
	}
	for(int i=2;i<=maxx;++i)
	{
		int a=1;
		if(!pd[i])
		{
			for(int j=i;j*i<=maxx;++j)
			{
				pd[i*j]=1;
				if(vis[i*j]==1)++a;
			}
		}
		ans=max(ans,a);
	}
	printf("%d",ans);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int a[100005],n,d[100005],p=0,ans=0,s[100005],maxn=0;

void prime(){
	for(int i=2;i<=maxn;i++){
		if(s[i]==0){
			p=a[i];
			for(int k=2;k*i<=maxn;k++){
				s[k*i]=1;
				p+=a[k*i];
			}
		}
		ans=max(ans,p);
	}
	return ;
}

int main(){
	int z;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&z);
		a[z]++;
		maxn=max(maxn,z);
	}
	prime();
	printf("%d\n",ans);
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
using namespace std;
int shu[100001]={0};
int tong[7001]={0};
int max(int a,int b){return a>b?a:b;}
int main(){
	int n,sum1(0);
	scanf("%d",&n);
	if(n==1){
		printf("1");
		return 0;
	}
	for(int i(1);i<=n;i++){
		scanf("%d",&shu[i]);
	}
	for(int i(1);i<=n;i++){
		for(int j(2);j<=7000;j++){
			if(shu[i]!=1&&shu[i]%j==0){
				tong[j]++;
			}
		}
	}
	tong[1]=1;
	for(int i(1);i<=7000;i++){
		sum1=max(sum1,tong[i]);
	}
	printf("%d",sum1);
}


#include <bits/stdc++.h>
using namespace std;
int a,ans,mx=1,n,vis[100007];
bool v[100007];
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a);
        vis[a]++;
    }
    for(int i=2;i<=100000;i++){
        if(v[i]) continue;
        ans=vis[i];
        for(int j=2;j<=100000/i;j++){
            v[i*j]=true;
            ans+=vis[i*j];
        }
        mx=max(mx,ans);
    }
    printf("%d",mx);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
using namespace std;
int n,m,a,b[1000002],mx;
int main(){
	scanf("%d",&n);
	for(register int i=1;i<=n;++i){
		scanf("%d",&a);
		for(register int j=2;j<=a;++j){
			if(a%j==0){b[j]++;mx=max(mx,j);
			}
			while(a%j==0)a/=j;
		}
	}
	for(register int i=2;i<=mx+10000;++i){
		if(b[i]>m)m=b[i];
	}
	printf("%d",m);
}


#include <bits/stdc++.h>
using namespace std;

bool snt(int o)
{
	int q = sqrt(o);
	for(int i = 2;i <= o;i++)
		if(!(o % i))
		{
			if(o == 2)
				return true;
			else return false;
		}
	return true;
}

int main ()
{
	int n,ans = 0,max = 0;
	scanf("%d",&n);
	int a[n];
	for(int i = 0;i < n;i++)
	{
		scanf("%d", &a[i]);
		max = max > a[i]/2?max:a[i]/2;
	}
	max += 10;
	for(int i = 2;i <= max;i++)
	{
		if(!snt(i))
			continue;
		int temp = 0;
		for(int j = 0;j < n;j++)
		{
			if(!(a[j] % i))
				temp++;
		}
		ans = ans < temp?temp:ans;
	}
	if(!ans) ans++;
	printf("%d", ans);
}