Hilbert's Hotel is a very unusual hotel since the number of rooms is infinite! In fact, there is exactly one room for every integer, including zero and negative integers. Even stranger, the hotel is currently at full capacity, meaning there is exactly one guest in every room. The hotel's manager, David Hilbert himself, decides he wants to shuffle the guests around because he thinks this will create a vacancy (a room without a guest).

For any integer $k$ and positive integer $n$, let $k\bmod n$ denote the remainder when $k$ is divided by $n$. More formally, $r=k\bmod n$ is the smallest non-negative integer such that $k-r$ is divisible by $n$. It always holds that $0\le k\bmod n\le n-1$. For example, $100\bmod 12=4$ and $(-1337)\bmod 3=1$.

Then the shuffling works as follows. There is an array of $n$ integers $a_0,a_1,\ldots,a_{n-1}$. Then for each integer $k$, the guest in room $k$ is moved to room number $k+a_{k\bmod n}$.

After this shuffling process, determine if there is still exactly one guest assigned to each room. That is, there are no vacancies or rooms with multiple guests.


-----Input-----

Each test consists of multiple test cases. The first line contains a single integer $t$ ($1\le t\le 10^4$) — the number of test cases. Next $2t$ lines contain descriptions of test cases.

The first line of each test case contains a single integer $n$ ($1\le n\le 2\cdot 10^5$) — the length of the array.

The second line of each test case contains $n$ integers $a_0,a_1,\ldots,a_{n-1}$ ($-10^9\le a_i\le 10^9$).

It is guaranteed that the sum of $n$ over all test cases does not exceed $2\cdot 10^5$.


-----Output-----

For each test case, output a single line containing "YES" if there is exactly one guest assigned to each room after the shuffling process, or "NO" otherwise. You can print each letter in any case (upper or lower).


-----Example-----
Input
6
1
14
2
1 -1
4
5 5 5 1
3
3 2 1
2
0 1
5
-239 -2 -100 -3 -11

Output
YES
YES
YES
NO
NO
YES



-----Note-----

In the first test case, every guest is shifted by $14$ rooms, so the assignment is still unique.

In the second test case, even guests move to the right by $1$ room, and odd guests move to the left by $1$ room. We can show that the assignment is still unique.

In the third test case, every fourth guest moves to the right by $1$ room, and the other guests move to the right by $5$ rooms. We can show that the assignment is still unique.

In the fourth test case, guests $0$ and $1$ are both assigned to room $3$.

In the fifth test case, guests $1$ and $2$ are both assigned to room $2$.

Difficulty: MEDIUM_HARD
Tags: Number theory

Sorting

Mathematics
Skill types: Sorting

Starter code:

Solutions:
import io
import os
from collections import Counter, defaultdict, deque

def solve(N, A):
	if len(set(((i + x) % N for (i, x) in enumerate(A)))) == N:
		return 'YES'
	return 'NO'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N,) = [int(x) for x in input().split()]
	A = [int(x) for x in input().split()]
	ans = solve(N, A)
	print(ans)


for t in range(int(input())):
	n = int(input())
	arr = map(lambda x: int(x) % n, input().split())
	arr = list(arr)
	for i in range(n):
		arr[i] += i
		arr[i] %= n
	arr = sorted(arr)
	true_arr = list(range(n))
	print('YES' if true_arr == arr else 'NO')


for _ in range(int(input())):
	N = int(input())
	List = [int(x) for x in input().split()]
	flag = 0
	Visited = [False] * N
	for i in range(N):
		X = (i + List[i]) % N
		Visited[X] = True
	for i in range(N):
		if Visited[i] == False:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


t = int(input())
for T in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	temp = 0
	for i in range(n - 1):
		for j in range(i + 1, n):
			l = a[i] - a[j] + i - j
			if l < 0:
				l = -l
			if l % n == 0:
				temp = 1
				break
		if temp == 1:
			break
	if temp == 0:
		print('YES')
	else:
		print('NO')


from sys import stdin, stderr

def rl():
	return [int(w) for w in stdin.readline().split()]
(t,) = rl()
for _ in range(t):
	(n,) = rl()
	a = rl()
	r = set(((x + i) % n for (i, x) in enumerate(a)))
	print('YES' if len(r) == n else 'NO')


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	ta = []
	for i in range(n):
		ta.append(a[i] % n)
	for i in range(n):
		ta[i] += i
		if ta[i] >= n:
			ta[i] -= n
	ta.sort()
	bhul = True
	for i in range(n):
		if ta[i] != i:
			bhul = False
			print('NO')
			break
	if bhul:
		print('YES')


t = int(input())
while t:
	n = int(input())
	l1 = list(map(int, input().split()))
	arr = [0 for j in range(0, n)]
	for i in range(0, n):
		val = i + l1[i]
		m = val % n
		if arr[m] == 1:
			print('NO')
			break
		else:
			arr[m] = 1
	else:
		print('YES')
	t = t - 1


n = int(input())
for _ in range(n):
	p = int(input())
	A = list(map(int, input().split()))
	B = set()
	work = False
	for t in range(p):
		lm = (A[t] + t) % p
		if lm in B:
			work = True
			print('NO')
			break
		B.add(lm)
	if not work:
		print('YES')


import sys

def input():
	return sys.stdin.readline().strip()
T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	s = set()
	for i in range(n):
		s.add((i + arr[i % n]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	B = [(a + i) % N for (i, a) in enumerate(A)]
	print('YES' if len(set(B)) == N else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = []
	for i in range(n):
		l.append((a[i % n] + i) % n)
	if len(set(l)) < n:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	k = int(input())
	l = list(map(int, input().split()))
	for j in range(len(l)):
		l[j] = (l[j] + j) % k
	if len(l) == len(set(l)):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	req = [0] * n
	for i in range(n):
		req[i] = ((arr[i] + i) % n + n) % n
	m = 0
	req.sort(reverse=False)
	for i in range(n):
		if req[i] != i:
			print('NO')
			m = 1
			break
	if m == 0:
		print('YES')


def solution(t):
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		s = []
		for i in range(n):
			s.append((a[i] + i) % n)
		s.sort()
		p = True
		for i in range(n):
			if s[i] != i:
				p = False
				break
		if p:
			print('YES')
		else:
			print('NO')
solution(int(input()))


def solve(n, rem):
	remainder = []
	set1 = set(())
	for i in range(n):
		remainder.append(rem[i] % n)
		set1.add((i + remainder[i]) % n)
	if len(set1) < n:
		return 'NO'
	else:
		return 'YES'
t = int(input())
output = []
for i in range(t):
	n = int(input())
	rem = [int(x) for x in input().split()]
	output.append(solve(n, rem))
for v in output:
	print(v)


T = int(input())
for t in range(1, T + 1):
	n = int(input())
	l = list(map(int, input().split()))
	s = set()
	for i in range(n):
		x = (i + l[i]) % n
		s.add(x)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	b = [None for _ in range(n)]
	for i in range(n):
		b[(i + a[i]) % n] = a[i]
	if None in b:
		print('NO')
	else:
		print('YES')


from sys import *
from math import *
from bisect import *
from heapq import heappush, heappop
from itertools import combinations
from collections import deque
setrecursionlimit(100000000)
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	n = int(input())
	a = lmi()
	s = set()
	for i in range(n):
		s.add((i + a[i]) % n)
	if len(s) != n:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	used = set()
	for i in range(n):
		used.add((i + a[i]) % n)
	s = list(used)
	s.sort()
	st = 0
	ans = False
	for i in s:
		if i != st:
			break
			ans = True
		st += 1
	if ans or len(s) < n:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = []
	sol = 'YES'
	for i in range(n):
		b.append((i + a[i] % n) % n)
	if len(list(set(b))) != n:
		sol = 'NO'
	print(sol)


t = int(input())
for _ in range(t):
	n = int(input())
	als = list(map(int, input().split()))
	ans = 'YES'
	ls = [0 for _ in range(n)]
	for i in range(n):
		if ls[(als[i] + i) % n] != 0:
			ans = 'NO'
		else:
			ls[(als[i] + i) % n] += 1
	print(ans)


def task(n, a):
	occupied = {}
	for k in range(-2 * n - 1, 2 * n + 1):
		target = k + a[k % n] % n
		if target in occupied:
			print('NO')
			return
		occupied[target] = True
	print('YES')
t = int(input())
for i in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	task(n, a)


t = int(input())
for w in range(t):
	n = int(input())
	l = input().split()
	a = []
	for i in range(n):
		a.append(int(l[i]))
	c = []
	for i in range(n):
		c.append((i + a[i]) % n)
	c.sort()
	band = True
	for i in range(n):
		band = band * (i == c[i])
	if band:
		print('YES')
	else:
		print('NO')


Times = int(input())
j = 0
while j < Times:
	n = int(input())
	s = input().split()
	s = [int(c) for c in s]
	i = 0
	f = True
	while i < n and f:
		t = 0
		while t < i and f:
			if (s[i % n] - s[t % n] + i - t) % n == 0:
				f = False
			t += 1
		i += 1
	if f:
		print('YES')
	else:
		print('NO')
	j += 1


import sys
import bisect
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(int(ri())):
	s = set()
	n = int(ri())
	a = Ri()
	flag = True
	for i in range(n):
		if (i + a[i]) % n in s:
			flag = False
			break
		else:
			s.add((i + a[i]) % n)
	if flag:
		YES()
	else:
		NO()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	m = {}
	o = []
	f = 0
	for i in range(n):
		m[i] = (i + arr[i]) % n
		if m[i] in o:
			f = 1
			break
		else:
			o.append(m[i])
	if f:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag = True
	mods = set()
	for (i, x) in enumerate(a):
		d = (i + x) % len(a)
		if d in mods:
			flag = False
			break
		mods.add(d)
	if flag:
		print('YES')
	else:
		print('NO')


for __ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ans = 0
	d = {}
	for i in range(n):
		if d.get((ar[i] + i) % n) == None:
			ans += 1
			d[(ar[i] + i) % n] = 1
	if ans == n:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	rooms = set()
	for i in range(N):
		if (i + A[i]) % N in rooms:
			break
		rooms.add(i + A[i] % N)
	if len(rooms) == N:
		print('YES')
	else:
		print('NO')


import sys
import io, os
import math
gcd = math.gcd
sqrt = math.sqrt
ceil = math.ceil
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def strinp(testcases):
	k = 5
	if testcases == -1 or testcases == 1:
		k = 1
	f = str(input())
	f = f[2:len(f) - k]
	return f

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = list(map(int, input().split()))
		rem = [0] * n
		for i in range(n):
			rem[(i + arr[i]) % n] += 1
		trig = False
		for i in range(n):
			if rem[i] != 1:
				trig = True
				break
		if trig:
			print('nO')
		else:
			print('yEs')
main()


def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))
from collections import defaultdict, deque
from sys import exit
import math
import copy
from bisect import bisect_left
import sys

def solve():
	n = getN()
	nums = getList()
	rooms = [0 for i in range(n)]
	for (i, num) in enumerate(nums):
		move = num % n
		if rooms[(i + move) % n] == 0:
			rooms[(i + move) % n] = 1
		else:
			print('NO')
			return
	print('YES')
	return

def main():
	n = getN()
	for _ in range(n):
		solve()
main()


def solve(arr, length):
	mod_arr = list(map(lambda x: x % length, arr))
	result = 'YES'
	for (idx1, value1) in enumerate(mod_arr):
		for (idx2, value2) in enumerate(mod_arr):
			if idx1 == idx2:
				continue
			distance = (idx1 - idx2) % length
			difference = value2 - value1
			if distance == difference:
				result = 'NO'
				break
		if result == 'NO':
			break
	print(result)
n = int(input())
for i in range(n):
	length = int(input())
	arr_str = input().split(' ')
	arr = list(map(int, arr_str))
	solve(arr, length)


for _ in range(int(input())):
	MySet = set()
	N = int(input())
	X = list(map(int, input().split()))
	for i in range(N):
		MySet.add((i + X[i]) % N)
	print('YES' if len(MySet) == N else 'NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	vec = list(map(int, input().split()))
	s = set()
	for i in range(n):
		s.add((vec[i] + i) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	s = set()
	arr = list(map(int, input().split()))
	for i in range(0, n):
		s.add((arr[i] + i) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


for s in [*open(0)][2::2]:
	a = s.split()
	n = len(a)
	s = {*range(n)}
	print('YNEOS'[s > {(k + int(a[k])) % n for k in s}::2])


t = int(input())
for test in range(t):
	n = int(input())
	a1 = list(map(int, input().split()))
	a = a1.copy()
	freq = set()
	f = True
	stay = set()
	for i in range(n):
		a[i] += i
		if a[i] % n in freq:
			f = False
			break
		else:
			freq.add(a[i] % n)
		if a[i] % n in stay:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


test = int(input())
for t in range(test):
	n = int(input())
	a = list(map(int, input().split()))
	attendance = [False for i in range(n)]
	for i in range(1, n + 1):
		x = (i + a[i % n]) % n
		if attendance[x] == True:
			print('NO')
			break
		else:
			attendance[x] = True
		if False not in attendance:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	divisors = [0] * n
	res = 'YES'
	for i in range(n):
		div = (i + a[i]) % n
		if divisors[div] == 1:
			res = 'NO'
			break
		else:
			divisors[div] = 1
	print(res)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	r = [0] * n
	f = 0
	for i in range(n):
		p = (i + a[i] % n) % n
		if r[p] == 1:
			f = 1
			break
		r[p] = 1
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	seen = set()
	bad = False
	for i in range(n):
		if (i + a[i]) % n in seen:
			bad = True
		seen.add((i + a[i]) % n)
	if bad:
		print('NO')
	else:
		print('YES')


def main():
	import sys, math
	from collections import defaultdict as dd, deque

	def data():
		return sys.stdin.readline().strip()

	def mdata():
		return list(map(int, data().split()))
	out = sys.stdout.write
	INF = int(1000000000.0)
	mod = int(1000000000.0) + 7
	for t in range(int(data())):
		n = int(data())
		A = mdata()
		s = set()
		for i in range(n):
			s.add((i + 1 + A[i]) % n)
		if len(s) == n and (min(s) != 1 or max(s) != n):
			print('YES')
		else:
			print('NO')
main()


try:
	t = int(input())
	for _ in range(t):
		n = int(input())
		A = list(map(int, input().split()))
		B = []
		for i in range(n):
			a = i + A[i]
			B.append(a % n)
		if len(set(B)) == n:
			print('YES')
		else:
			print('NO')
except:
	pass


from sys import stdin, stdout
from collections import Counter
all_tenants = map(lambda x: [int(i) for i in x.split()], stdin.readlines()[2::2])
for tenants in all_tenants:
	n = len(tenants)
	new_rooms = {(index + rm) % n: '' for (index, rm) in enumerate(tenants)}
	for i in range(n):
		if new_rooms.get(i) is None:
			stdout.write('NO\n')
			break
	else:
		stdout.write('YES\n')


t = int(input())
for test in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	D = set()
	count = 0
	ans = 'YES'
	for i in arr:
		a = (i + count) % n
		if a in D:
			ans = 'NO'
			break
		D.add(a)
		count += 1
	print(ans)


import sys
from math import sqrt
cin = sys.stdin.buffer.readline

def countPair(arr, n, k):
	cnt = 0
	for i in range(n):
		arr[i] = (arr[i] + k) % k
	hash = [0] * k
	for i in range(n):
		hash[arr[i]] += 1
	for i in range(k):
		cnt += hash[i] * (hash[i] - 1) / 2
	return int(cnt)
for _ in range(int(cin())):
	n = int(cin())
	a = list(map(int, cin().split()))
	d = set()
	for i in range(n):
		d.add(a[i] + i)
	if len(d) < n:
		print('no')
	elif countPair(list(d), len(d), n) > 0:
		print('no')
	else:
		print('yes')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		n = int(input())
		arry = list(map(int, input().split()))
		dic = {}
		ans = 'YES'
		for i in range(n):
			bobo = (i + arry[i] % n) % n
			ina = dic.get(bobo, False)
			if ina:
				ans = 'NO'
				break
			else:
				dic[bobo] = True
		yield ans
t = int(input())
ans = gift()
print(*ans, sep='\n')


def solve(nr):
	for i in range(len(nr)):
		for j in range(i + 1, len(nr)):
			if nr[i] == nr[j]:
				return 'No'
	else:
		return 'YES'
t = int(input())
for _ in range(t):
	k = int(input())
	arr = list(map(int, input().split()))
	nr = []
	for i in range(len(arr)):
		nr.append((i + arr[i]) % k)
	print(solve(nr))


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	for i in range(n):
		l[i] = (i + l[i]) % n
	if len(set(l)) == n:
		print('YES')
	else:
		print('NO')


import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = pow(10, 9) + 7

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def x(i):
	return i * (i + 1) + i * (i - 1) / 2

def solve():
	n = int(inp())
	a = lis()
	newrem = []
	for i in range(0, n):
		newrem.append((i + a[i]) % n)
	if len(newrem) == len(set(newrem)):
		out('YES')
		nextline()
	else:
		out('NO')
		nextline()
testcase(int(inp()))


import sys

def answer(n, a):
	if n == 1:
		return 'YES'
	s = set()
	for i in range(n):
		m = (i + a[i]) % n
		if m in s:
			return 'NO'
		s.add(m)
	return 'YES'

def main():
	t = int(sys.stdin.readline())
	while t:
		n = int(sys.stdin.readline())
		a = tuple(map(int, sys.stdin.readline().split()))
		print(answer(n, a))
		t -= 1
	return
main()


a = int(input())
for i in range(0, a):
	c = int(input())
	b = list(map(int, input().split()))
	d = []
	k = 0
	switch = 1
	for j in range(0, len(b)):
		k = (b[j] + j) % c
		if k not in d:
			d.append(k)
		else:
			print('NO')
			switch = 0
			break
	if switch == 1:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	d = {}
	for i in range(n):
		tmp = (i + arr[i]) % n
		if tmp not in d.keys():
			d[tmp] = 1
		else:
			d[tmp] += 1
	ck = True
	for (i, j) in d.items():
		if j > 1:
			ck = False
			break
	if ck:
		print('YES')
	else:
		print('NO')


from sys import setrecursionlimit
from collections import deque
import heapq
import functools

def IntInput():
	return int(input())

def M_IntInput():
	return map(int, input().split())

def M_StrInput():
	return map(int, input().split())

def IntArrayInput():
	return list(map(int, input().split()))

def modInverse(p, a, m):
	return p % m * pow(a % m, m - 2, m) % m

def compare(item1, item2):
	return item2[0] - item1[0] if item1[0] != item2[0] else item1[1] - item2[1]

def DFS(s, n, paths, answer):
	visited = [False] * (n + 1)
	stack = []
	stack.append(s)
	visited[s] = True
	DFSArray = []
	while stack:
		s = stack.pop()
		DFSArray.append(s)
		flag = 0
		for i in paths[s]:
			if visited[i] == False:
				flag = 1
				stack.append(i)
				visited[i] = True
		if not flag:
			answer[s - 1][1] = 0
	while DFSArray != []:
		s = DFSArray.pop()
		if answer[s - 1][1] < 0:
			answer[s - 1][1] = 0
			for i in paths[s]:
				if answer[i - 1][1] >= 0:
					answer[s - 1][1] += answer[i - 1][1] + 1
	return answer

def BFS(s, n, paths, answer):
	visited = [False] * (n + 1)
	answer[s - 1][0] = 0
	queue = deque()
	queue.append(s)
	visited[s] = True
	while queue:
		s = deque.popleft(queue)
		for i in paths[s]:
			if visited[i] == False:
				queue.append(i)
				answer[i - 1][0] = answer[s - 1][0] + 1
				visited[i] = True
	return answer
for _ in range(int(input())):
	n = int(input())
	array = IntArrayInput()
	sum = 0
	dif = {}
	ans = False
	for i in range(1, n + 1):
		temp = (i + array[i % n]) % n
		if temp in dif:
			ans = 'NO'
			break
		else:
			dif[temp] = 0
			sum += temp
	if ans:
		print(ans)
	elif sum == n * (n - 1) // 2:
		print('YES')
	else:
		print('NO')


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	b = [0] * n
	ans = True
	for i in range(n):
		b[(i + a[i]) % n] += 1
	for i in range(n):
		if b[i] >= 2:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = dict()
	flag = True
	for i in range(n):
		tmp = (i + a[i] % n) % n
		if tmp in d:
			flag = False
			break
		else:
			d[tmp] = 1
	if flag:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for you in range(t):
	n = int(input())
	l = input().split()
	li = [int(i) for i in l]
	hashi = dict()
	for i in range(n):
		z = i + li[i]
		if z % n in hashi:
			hashi[z % n] += 1
		else:
			hashi[z % n] = 1
	poss = 1
	for i in hashi:
		if hashi[i] > 1:
			poss = 0
			break
	if poss:
		print('Yes')
	else:
		print('No')


def main():
	test_cases = int(input())
	for _ in range(test_cases):
		n = int(input())
		arr = [int(num) for num in input().split()]
		new_arrangements = [None] * n
		k = 0
		flag = True
		while k < n and flag:
			guest = arr[k]
			new_room = (k + arr[k]) % n
			if new_arrangements[new_room] is not None:
				flag = False
				print('NO')
			else:
				new_arrangements[new_room] = guest
			k += 1
		if flag:
			print('YES')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = [False] * n
	good = True
	for i in range(n):
		k = (i + a[i]) % n
		if b[k]:
			good = False
			break
		b[k] = True
	print('YES' if good else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	flag = [0 for i in range(n)]
	if n == 1:
		print('YES')
		continue
	else:
		for i in range(n):
			flag[(i + a[i % n]) % n] += 1
			if flag[(i + a[i % n]) % n] >= 2:
				print('NO')
				break
		else:
			print('YES')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	graph = [[] for i in range(n)]
	for i in range(n):
		graph[(i + a[i]) % n].append(i)
		graph[i].append((i + a[i]) % n)
	for v in graph:
		if len(v) != 2:
			print('NO')
			break
	else:
		print('YES')


import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect
MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda : sys.stdin.readline().strip()
sys.setrecursionlimit(10 ** 8)
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = (a[i] + (i + 1)) % n
	a.sort()
	if n == 1:
		print('YES')
	for i in range(n - 1):
		if a[i] == a[i + 1]:
			print('NO')
			break
		elif i == n - 2:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	ai = list(map(int, input().split()))
	ansn = [0] * n
	for i in range(n):
		ansn[(ai[i] + i) % n] += 1
	ans = ['NO', 'YES']
	print(ans[min(ansn)])


T = int(input())
for _ in range(T):
	n = int(input())
	aa = list(map(int, input().split()))
	seenl = set()
	for (k, a) in enumerate(aa):
		ll = (a + k) % n
		if ll in seenl:
			break
		seenl.add(ll)
	else:
		print('YES')
		continue
	print('NO')


def mymod(k, n):
	return k % n

def main():
	tc = int(input())
	for _ in range(tc):
		n = int(input())
		arr = list(map(int, input().split()))
		arr = [mymod(a, n) for a in arr]
		res = []
		for i in range(n):
			res.append(mymod(arr[i] + i, n))
		res.sort()
		exist_same = False
		for i in range(n):
			j = i + 1
			if j < n:
				if res[i] == res[j]:
					exist_same = True
		if exist_same:
			print('NO')
		else:
			print('YES')
main()


t = int(input())
for i in range(t):
	n = int(input())
	print(['NO', 'YES'][sorted([(j + k) % n for (j, k) in zip(map(int, input().split(' ')), range(n))]) == list(range(n))])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	seen = set()
	for i in range(n):
		if (a[i] + i) % n in seen:
			print('NO')
			break
		seen.add((a[i] + i) % n)
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	lis = [0] * n
	for j in range(n):
		temp = j + 1
		a = temp % n
		b = arr[a]
		temp1 = temp + b
		c = temp1 % n
		lis[c] += 1
	if lis.count(1) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	s = set()
	for i in range(n):
		val = (i + li[i]) % n
		if val in s:
			print('NO')
			break
		else:
			s.add(val)
	if n == len(s):
		print('YES')


import sys
from collections import deque
input = lambda : sys.stdin.readline().strip()
ipnut = input
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(lambda x: int(x) % n, input().split()))
	s = set()
	for i in range(n):
		s.add((i + a[i]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin as cin
from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, cin.readline().split(' ')))
	cnt = Counter(map(lambda x: (x[0] + x[1]) % n, enumerate(arr)))
	if max(cnt.values()) > 1:
		print('NO')
	else:
		print('YES')


for f in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	occup = [0] * n
	for i in range(n):
		occup[(i + a[i % n]) % n] += 1
	if max(occup) > 1:
		print('NO')
	else:
		print('YES')


for test_i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	vis = [False for i in range(n)]
	ans = True
	for i in range(n):
		if vis[(arr[i] + i) % n]:
			ans = False
			break
		else:
			vis[(arr[i] + i) % n] = True
	print('YES' if ans else 'NO')


t = int(input())
for q in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	tmp = [0] * n
	for i in range(0, n):
		if i + a[i] >= 0:
			tmp[(i + a[i]) % n] = 1
		else:
			tmp[(n - abs(i + a[i])) % n] = 1
	if sum(tmp) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin
a = int(stdin.readline())
for b in range(0, a):
	c = int(stdin.readline())
	d = stdin.readline().split()
	A = set()
	l = 0
	K = 0
	for e in range(0, c):
		test = (e + int(d[e])) % c
		A.add(test)
		if len(A) == l:
			print('NO')
			K = 1
			break
		else:
			l += 1
	if K == 0:
		print('YES')


t = int(input())
for test in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	num = {}
	f = 1
	for i in range(n):
		k = ((l[i] + i) % n + n) % n
		if not num.get(k):
			num[k] = 1
		else:
			f = 0
			break
	print('YES' if f else 'NO')


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	d = defaultdict(int)
	for k in range(n):
		d[(k + a[k]) % n] += 1
	if len(d) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	flags = [0] * n
	for (i, e) in enumerate(arr):
		flags[(e + i) % n] += 1
	flag = True
	for e in flags:
		if e != 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	check = {}
	sig = 0
	for i in range(len(a)):
		if (i + a[i]) % n in check.keys():
			print('NO')
			sig = 1
			break
		else:
			check[(i + a[i]) % n] = 1
	if sig == 1:
		pass
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		l[i] = l[i] + i + 1
	for i in range(n):
		l[i] = l[i] % n
	if len(set(l)) == len(l):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for i in range(n):
		x = ((a[i] + i) % n + n) % n
		s.add(x)
	print(('NO', 'YES')[len(s) == n])
	t -= 1


from bisect import *
from collections import *
from math import gcd, ceil, sqrt, floor, inf
from heapq import *
from itertools import *
from functools import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc
farr = [1]
ifa = []

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	fact(x, mod)
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa.reverse()

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def lowbit(n):
	return n & -n

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] > self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return prime

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		seen.add(u)
		for (v, w) in graph[u]:
			if v not in d or d[v] > d[u] + w:
				d[v] = d[u] + w
				heappush(heap, (d[v], v))
	return d

def GP(it):
	return [[ch, len(list(g))] for (ch, g) in groupby(it)]

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None

def nb(i, j):
	for (ni, nj) in [[i + 1, j], [i - 1, j], [i, j - 1], [i, j + 1]]:
		if 0 <= ni < n and 0 <= nj < m:
			yield (ni, nj)

@bootstrap
def gdfs(r, p):
	if len(g[r]) == 1 and p != -1:
		yield None
	for ch in g[r]:
		if ch != p:
			yield gdfs(ch, r)
	yield None

def lcm(a, b):
	return a * b // gcd(a, b)

def cal(x):
	l = 0
	r = x
	while l < r:
		mid = (l + r + 1) // 2
		tmp = 2 + (3 * mid + 4) * (mid - 1) // 2
		if tmp <= x:
			l = mid
		else:
			r = mid - 1
	return x - (2 + (3 * l + 4) * (l - 1) // 2)
t = N()
for i in range(t):
	n = N()
	a = RLL()
	s = set()
	for i in range(n):
		s.add((i + a[i]) % n)
	if len(s) == n:
		ans = 'YES'
	else:
		ans = 'NO'
	print(ans)


num = int(input())
for _ in range(num):
	n = int(input())
	l = [int(i) for i in input().split()]
	s = set()
	for (index, i) in enumerate(l):
		k = (i + index) % n
		if k in s:
			print('NO')
			break
		else:
			s.add(k)
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	rooms = [0] * n
	same_room = False
	for k in range(len(arr)):
		new_k = (k + arr[k % n]) % n
		if rooms[new_k] == 1:
			same_room = True
			break
		rooms[new_k] += 1
	if same_room:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = [0] * n
	for (i, e) in enumerate(a):
		j = (i + e) % n
		cnt[j] += 1
	bl = True
	for e in cnt:
		if e != 1:
			bl = False
	print('YES' if bl else 'NO')


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
import bisect
for _ in range(I()):
	n = I()
	a = L()
	s = set([(a[i] + i + 1) % n for i in range(n)])
	print(['YES', 'NO'][len(s) < n])


def read_int():
	return int(input().strip())

def read_ints():
	return list(map(int, input().strip().split(' ')))

def solve():
	n = read_int()
	a = read_ints()
	b = []
	for k in range(n):
		b.append((k + a[k % n]) % n)
	b.sort()
	for i in range(1, n):
		if b[i] == b[i - 1]:
			return 'NO'
	return 'YES'
T = read_int()
for _ in range(T):
	print(solve())


def change(x):
	if x >= n:
		return x % n
	if x <= -n:
		return -(abs(x) % n) + n
	else:
		return x
t = int(input())
for uuu in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = [change(i) for i in a]
	nxt = [(i + a[i % n]) % n for i in range(n)]
	if len(nxt) != len(set(nxt)):
		print('NO')
	else:
		print('YES')


from sys import stdin
for _ in range(int(input())):
	n = int(stdin.readline().rstrip())
	l = list(map(int, stdin.readline().rstrip().split(' ')))
	test = [0] * n
	for i in range(n):
		x = l[i] % n
		z = i + x
		if z >= n:
			z = z - n
		test[z] += 1
	r = 'YES'
	for i in range(n):
		if test[i] != 1:
			r = 'NO'
			break
	print(r)


t = int(input())
from copy import deepcopy
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	hashmap = {}
	for i in range(0, len(a)):
		a[i] = (a[i] + i) % n
		if a[i] not in hashmap:
			hashmap[a[i]] = 0
		hashmap[a[i]] += 1
	flag = 0
	for i in hashmap:
		if hashmap[i] > 1:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag = True
	s = set()
	for i in range(n):
		if (i + a[i]) % n in s:
			flag = False
		s.add((i + a[i]) % n)
	if flag:
		print('YES')
	else:
		print('NO')


from math import sqrt
count_empty = 0

def move(hotel, i, k):
	global count_empty
	n = len(hotel)
	index = (i + k) % n
	hotel[i] -= 1
	if hotel[i] == 0:
		count_empty += 1
	hotel[index] += 1
	if hotel[index] == 1:
		count_empty -= 1

def main():
	global count_empty
	t = int(input())
	for i in range(t):
		n = int(input())
		hotel = [1 for i in range(n)]
		moves = list(map(int, input().split()))
		count_empty = 0
		for j in range(n):
			move(hotel, j, moves[j])
		if count_empty > 0:
			print('NO')
		else:
			print('YES')
main()


def isvalid(arr):
	for i in arr:
		if i > 1:
			return 0
	return 1
t = int(input())
for you in range(t):
	n = int(input())
	l = input().split()
	li = [int(i) for i in l]
	arr = [0 for i in range(n)]
	for i in range(n):
		arr[(i + li[i]) % n] += 1
	if isvalid(arr):
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for i in range(n):
		s.add((i + a[i]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')
	return

def main():
	n = int(input())
	for i in range(n):
		solve()
main()


n = int(input())
for i in range(0, n):
	o = int(input())
	L = []
	K = 1
	G = 0
	p = input().rstrip().split(' ')
	for j in range(0, len(p)):
		T = (K + int(p[K % o])) % o
		if T in L:
			G = 1
			break
		K += 1
		L.append(T)
	if G == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0 for _ in range(n)]
	for i in range(n):
		b[(a[i] + i) % n] = 1
	s = b.count(0)
	if s == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	A = set()
	for j in range(n):
		a[j] = a[j] % n + j
		A.add(a[j] % n)
	if n == len(A):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
		t -= 1
		continue
	d = {}
	b = []
	f = 0
	for i in range(n):
		x = i + a[i] % n
		x = x % n
		b.append(x)
		d[x] = 0
	for i in range(n):
		if d[b[i]] == 1:
			f = 1
			print('NO')
			break
		else:
			d[b[i]] += 1
	if f == 0:
		print('YES')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	d = set()
	flag = True
	for i in range(n):
		if (arr[i] + i) % n in d:
			flag = False
			break
		d.add((arr[i] + i) % n)
	if flag:
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	occupied = set()
	for i in range(len(a)):
		new_room = (i + a[i]) % n
		if new_room in occupied:
			print('NO')
			break
		else:
			occupied.add(new_room)
	if len(occupied) == n:
		print('YES')
t = int(input())
for test_case in range(t):
	solve()


import math
from collections import defaultdict, Counter

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	rooms = []
	for i in range(n):
		rooms.append((i + arr[i]) % n)
	rooms.sort()
	for i in range(n):
		if rooms[i] != i:
			print('NO')
			return
	print('YES')
	return
t = int(input())
for _ in range(t):
	main()


for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split()))
	ans = {}
	for i in range(N):
		A[i] = (A[i] % N + N) % N
		t = (A[i] + i) % N
		if t not in ans:
			ans[t] = 1
		else:
			ans[t] += 1
	t = 0
	for i in ans.keys():
		if ans[i] >= 2:
			t = 1
			break
	if t == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	lista = [int(x) for x in input().split()]
	l = len(lista)
	restos = []
	for i in range(0, l):
		resto = (lista[i] + i) % n
		restos.append(resto)
	largo = len(set(restos))
	if largo == l:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	q = int(input())
	w = list(map(int, input().split()))
	for i in range(q):
		w[i] = (w[i] + i) % q
	w.sort()
	for i in range(q):
		if w[i] == i:
			l = 0
		else:
			l = 1
			print('NO')
			break
	if l == 0:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	for i in range(n):
		a[i] = (i + a[i]) % n
	if len(set(a)) == n:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	n = int(input())
	a = input().split(' ')
	b = {}
	for i in range(n):
		a[i] = int(a[i])
		b[(i + a[i]) % n] = 1
	flag = 0
	for i in range(n):
		if i not in b:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	count = [0] * n
	for j in range(n):
		ans = j + a[j % n]
		count[ans % n - 1] = 1
	f = 0
	for j in range(n):
		if count[j] == 0:
			f = 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	A = LIST()
	S = set()
	for i in range(N):
		S.add((i + A[i % N]) % N)
	if len(S) == N:
		YES()
	else:
		NO()


t = int(input())
for i in range(t):
	n = int(input())
	s = input().split()
	for j in range(n):
		s[j] = int(s[j])
		s[j] = j + s[j]
		s[j] = s[j] % n
	x = set(s)
	if len(x) == n:
		print('YES')
	else:
		print('NO')


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	r = defaultdict(int)
	outcome = 'YES'
	for i in range(2 * n):
		val = i + a[i % n] % n
		if r[val]:
			outcome = 'NO'
			break
		else:
			r[val] = 1
	print(outcome)


n = int(input())
for i in range(n):
	h = int(input())
	b = set()
	l = list(map(int, input().split()))[:h]
	for (l, v) in enumerate(l):
		b.add((v + l) % h)
	if len(b) == h:
		print('YES')
	else:
		print('NO')


import sys
import math

def readStr():
	return sys.stdin.readline().rstrip()

def readInts():
	return list(map(int, readStr().split(' ')))

def main(n, a):
	j = set()
	for k in range(n):
		jk = k + a[k] % n
		j.add(jk % n)
	return len(j) == n
(t,) = readInts()
for _ in range(t):
	(n,) = readInts()
	a = readInts()
	x = main(n, a)
	if x:
		print('YES')
	else:
		print('NO')


import math
import sys
import collections
from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d1 = defaultdict(int)
	flag = 0
	for i in range(n):
		temp = (i + arr[i]) % n
		if temp in d1:
			flag = 1
			break
		else:
			d1[temp] = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	for i in range(n):
		arr[i] += i
		arr[i] %= n
	if len(set(arr)) == n:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	print('YES' if len(set([(int(a) + i) % N for (i, a) in enumerate(input().split())])) == N else 'NO')


from collections import defaultdict, Counter
from functools import lru_cache
from heapq import heappush, heappop
from math import gcd, floor, ceil
from sys import stdin, stdout

def ilist():
	return [int(x) for x in stdin.readline().strip().split(' ')]

def iint():
	return int(stdin.readline().strip())

def istr():
	return stdin.readline().strip()

def solve(a):
	n = len(a)
	res = set()
	for i in range(n):
		res.add((i + a[i]) % n)
	if len(res) == n:
		return 'YES'
	return 'NO'
t = iint()
for _ in range(t):
	n = iint()
	a = ilist()
	print(solve(a))


def md(a, m):
	return a % m
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	suc = True
	for i in range(n):
		if md(a[i] + i, n) in s:
			print('NO')
			suc = False
			break
		s.add((a[i] + i) % n)
	if not suc:
		continue
	print('YES')


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	n = I()
	a = set()
	for (i, j) in enumerate(R()):
		a.add((i + j) % n)
	print('YES' if n == len(a) else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	isVisited = False
	d = {}
	if n == 1:
		print('YES')
		continue
	for k in range(n):
		m = (k + a[k]) % n
		if m not in d:
			d[m] = True
		else:
			isVisited = True
			break
	if isVisited:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * n
	for k in range(n):
		x = (k + a[k]) % n
		if b[x]:
			print('NO')
			break
		b[x] = 1
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	index = []
	for i in range(n):
		index.append(0)
	flag = 0
	for i in range(n):
		temp = l[i] + i
		if index[temp % n] == 1:
			flag = 1
			print('NO')
			break
		else:
			index[temp % n] = 1
	if flag == 0:
		print('YES')


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	rooms = set()
	good = True
	for k in range(n):
		value = (k + a[k % n]) % n
		if value in rooms:
			good = False
			break
		rooms.add(value)
	if good:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input().strip()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def from_file(f):
	return f.readline

def solve(n, A):
	dup = set([(i + A[i]) % n for i in range(n)])
	res = 'yes' if len(dup) == n else 'no'
	return res
t = inp()
for _ in range(t):
	n = inp()
	A = inlt()
	print(solve(n, A))


t = int(input())
for tt in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	s = set(((i + a[i]) % n for i in range(n)))
	print('YES' if len(s) == n else 'NO')


def hilbert_shift(array):
	targets = set()
	size = len(array)
	for (idx, number) in enumerate(array):
		targets.add((number + idx) % size)
	return len(targets) == size
number_of_tests = int(input())
for _ in range(number_of_tests):
	input()
	array = [int(x) for x in input().split()]
	result = hilbert_shift(array)
	print('YES' if result else 'NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	l = int(input())
	a = list(map(int, input().split()))
	b = []
	for i in range(l):
		a[i] = a[i] % l
		b.append(0)
	for i in range(l):
		b[(a[i] + i) % l] = 1
	s = 1
	for c in b:
		if c != 1:
			s = 0
	if s == 1:
		print('yes')
	else:
		print('no')


from collections import defaultdict as dc
from heapq import *
import math
from bisect import bisect_left, bisect
import sys
from collections import deque as dq
from heapq import heapify, heappush, heappop
mod = 10 ** 9 + 7

def inp():
	p = int(input())
	return p

def line():
	p = list(map(int, input().split()))
	return p

def read_mat():
	n = inp()
	a = []
	for i in range(n):
		a.append(line())
	return a

def digit(n):
	s = str(n)
	p = 0
	for i in s:
		p += int(i) ** 2
	return p
ans = 0

def solve(a, n):
	p = dc(int)
	if n == 1:
		return 'YES'
	q = 0
	for i in range(n):
		z = (i + a[i]) % n
		p[z] += 1
		if p[z] > 1:
			return 'NO'
	return 'YES'
for test in range(inp()):
	n = inp()
	a = line()
	l = solve(a, n)
	print(l)


for _ in range(int(input())):
	n = int(input())
	s = set()
	a = list(map(int, input().split()))
	for k in range(n):
		s.add((k + a[k]) % n)
	if n == len(s):
		print('YES')
	else:
		print('NO')


import collections
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(n):
		arr[i] += i
		arr[i] %= n
	cnt = collections.Counter(arr)
	if len(cnt) != n:
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for (i, val) in enumerate(a):
		s.add((i + val) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
answers = []
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	problem = False
	filled = [False for i in range(n)]
	for (i, el) in enumerate(arr):
		new_pos = (i + el) % n
		if filled[new_pos]:
			problem = True
			break
		filled[new_pos] = True
	if problem:
		answers.append('NO')
	else:
		answers.append('YES')
print(*answers, sep='\n')


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return map(int, input().split())

def array():
	return [int(i) for i in input().split()]
for _ in range(int(input())):
	n = int(input())
	a = array()
	f = 1
	s = set()
	for i in range(n):
		k = (i + a[i]) % n
		s.add(k)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


def is_good_shift(n, shift):
	s = set()
	for (num, i) in enumerate(shift):
		s.add((num + i) % n)
	if len(s) == n:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	shift = [int(_) for _ in input().split()]
	print(is_good_shift(n, shift))


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	smallestNum = min(arr)
	smallestNum = abs(smallestNum)
	start = (smallestNum // n + 1) * n
	nodes = [start + i for i in range(n)]
	degree = defaultdict(int)
	flag = False
	for i in range(len(nodes)):
		if degree[nodes[i] + arr[i]] == 0:
			degree[nodes[i] + arr[i]] = 1
		else:
			flag = True
			break
	if not flag:
		mp = defaultdict(int)
		for k in degree.keys():
			mp[k % n] += 1
			if mp[k % n] >= 2:
				flag = True
				break
	if flag:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for i in range(n):
		room_number = (i + a[i]) % n
		s.add(room_number)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar = ar + ar + ar
	l2 = []
	for i in range(len(ar)):
		ai = ar[i]
		m = ar[i] % n
		while m <= 0:
			m += n
		np = i + m
		l2.append(np)
	l2.sort()
	np = False
	for i in range(1, len(l2)):
		if l2[i] - l2[i - 1] == 0:
			np = True
	if np:
		print('NO')
	else:
		print('YES')


import sys
import math
from bisect import bisect_right as br
from itertools import combinations as cb

def int_arr():
	return list(map(int, sys.stdin.readline().strip().split()))

def str_arr():
	return list(map(str, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	arr = int_arr()
	s = set()
	for i in range(n):
		val = (i + arr[i % n]) % n
		if val in s:
			print('NO')
			break
		else:
			s.add(val)
	else:
		print('YES')


for test in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	lstf = []
	for i in range(n):
		lstf.append((i + lst[i] % n) % n)
	m = min(lstf)
	happy = 0
	for i in range(1, n):
		if m + i not in lstf:
			happy = 1
			break
	if happy == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	seta = set()
	for j in range(n):
		seta.add((j + a[j]) % n)
	if len(seta) == n:
		print('YES')
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	n = int(input())
	ints = list(map(int, input().split()))
	newl = set([])
	exi = True
	for s in range(n):
		if not (s + ints[s]) % n in newl:
			newl.add((s + ints[s]) % n)
		else:
			exi = False
	if exi == True:
		print('YES')
	else:
		print('NO')


import os
import sys
if os.path.exists('/mnt/c/Users/Square/square/codeforces'):
	f = iter(open('C.txt').readlines())

	def input():
		return next(f)
else:
	input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	if len(set([(a + i) % n for (i, a) in enumerate(A)])) == n:
		print('YES')
	else:
		print('NO')


import sys
import math

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]
t = int(input())
for q in range(t):
	n = inputnum()
	a = inputlist()
	good = True
	for i in range(len(a)):
		a[i] = ((i + a[i]) % n + n) % n
	for i in range(1, len(a)):
		for j in range(0, i):
			if i != j and a[i] == a[j]:
				good = False
				break
		if not good:
			break
	if good:
		print('YES')
	else:
		print('NO')


import sys
import bisect as bs

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	flag = 0
	d = {}
	for i in range(n):
		if (i + a[i]) % n in d:
			flag = 1
			break
		d[(i + a[i]) % n] = 1
	print('YES' if flag == 0 else 'NO')


import sys
input = sys.stdin.readline

def read():
	return list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	a = read()
	for i in range(n):
		a[i] = (a[i] + i) % n
	if len(set(a)) == n:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	l1 = []
	for i in range(n):
		p = (i + l[i]) % n
		if p in d:
			print('NO')
			break
		else:
			d[p] = 1
	if len(d) == n:
		print('YES')


import sys

def mod(s):
	return int(s) % rm
for t in range(int(sys.stdin.readline())):
	rm = int(sys.stdin.readline())
	a = tuple(map(mod, sys.stdin.readline().split()))
	if len(set(a)) == 1:
		sys.stdout.write('YES\n')
	else:
		sex = set()
		for i in range(rm * 2):
			q = i + a[i % rm]
			if q in sex:
				sys.stdout.write('NO\n')
				break
			else:
				sex.add(q)
		else:
			sys.stdout.write('YES\n')


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
cases = int(input())
for t in range(cases):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	f = 0
	for i in range(n):
		v = (a[i] + i) % n
		if v in d:
			f = 1
			print('NO')
			break
		else:
			d[v] = 1
	if f == 0:
		print('YES')


t = int(input())
for x in range(t):
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	b = []
	for k in range(n):
		new = k + a[k % n]
		b.append(new % n)
	if len(set(b)) < len(b):
		print('no')
	else:
		print('yes')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scan_int = lambda : int(input())
scan_string = lambda : input().rstrip()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	n = scan_int()
	a = read_list()
	mp = {}
	for i in range(n):
		z = (i + a[i]) % n
		if mp.get(z) == None:
			mp[z] = True
		else:
			print('NO')
			return
	print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(scan_int()):
	solve()


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	A = [(i + A[i]) % n for i in range(0, n)]
	A.sort()
	check = [i for i in range(n)]
	if A == check:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	n = int(input())
	a = int_array()
	mset = set()
	f = 1
	for i in range(n):
		x = (i + a[i]) % n
		if x in mset:
			f = 0
			break
		else:
			mset.add(x)
	if f:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	A = [int(i) % n for i in input().split()]
	if len(set([(i + A[i]) % n for i in range(n)])) < n:
		print('NO')
	else:
		print('YES')


def solve(n, a):
	state = [False] * n
	for (i, x) in enumerate(a):
		ni = (i + (x + abs(x) * n)) % n
		state[ni] = True
	return all(state)
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print('YES' if solve(n, a) else 'NO')


def test(n, arr):
	s = set()
	for (i, a) in enumerate(arr):
		x = (a + i) % n
		if x in s:
			return False
		s.add(x)
	return True
t = int(input())
for _ in range(t):
	n = int(input())
	arr = map(int, input().split())
	print('Yes' if test(n, arr) else 'no')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * n
	for i in range(n):
		b[i] = (i + a[i]) % n
		if b[i] < 0:
			b[i] += n
	if len(set(b)) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	d = set()
	for i in range(n):
		d.add((i + l[i % n] + n) % n)
	if len(d) != n:
		print('NO')
	else:
		print('YES')


class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi
from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)
s = 0
of = []
for i in range(1, 30000):
	s += i
	tt = i ** 2
	of += [s * 2 + tt - s]
from bisect import bisect_right, bisect_left
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a += a
	mod = n
	st = set()
	for i in range(n):
		st.add((i + a[i]) % mod)
	print('YES' if len(st) == n else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = []
	d = dict()
	for i in range(n):
		b.append((i + a[i]) % n)
	for i in range(n):
		d[b[i]] = i
	f = True
	for i in range(n):
		if d[b[i]] != i:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	x = int(input())
	arr = list(map(int, input().split()))
	arr2 = []
	for i in range(x):
		temp = arr[i] + i
		if temp >= 0:
			arr2.append(temp % x)
		else:
			arr2.append((temp + 1000000000 * x) % x)
	seti = set(arr2)
	if len(seti) == x:
		print('YES')
	else:
		print('NO')


t = int(input())
for T in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	mods = []
	for i in range(n):
		mods.append((i + l[i]) % n)
	if len(mods) == len(set(mods)):
		print('YES')
	else:
		print('NO')


from collections import defaultdict

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	used = [False for i in range(n)]
	for k in range(n):
		used[(k + a[k % n]) % n] = True
	ans = True
	for i in used:
		ans &= i
	print('YES' if ans else 'NO')
t = int(input())
for _ in range(t):
	solve()


import os
import heapq
import sys, threading
import math as mt
import operator
from copy import copy
from collections import defaultdict, deque
from io import BytesIO, IOBase
sys.setrecursionlimit(10 ** 5)

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		n = int(input())
		ar = inpt()
		d = defaultdict(int)
		for i in range(n):
			pos = (i + ar[i]) % n
			d[pos] += 1
		ok = True
		for i in d.keys():
			if d[i] > 1:
				ok = False
				break
		if not ok:
			print('NO')
		else:
			print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin, stdout
import math
import heapq
t = 1

def aint():
	return int(input().strip())

def lint():
	return list(map(int, input().split()))

def fint():
	return list(map(int, stdin.readline().split()))

def main():
	n = aint()
	l = lint()
	cnt = [0] * n
	for i in range(n):
		cnt[(i + l[i]) % n] += 1
	for i in range(n):
		if cnt[i] > 1:
			print('NO')
			break
	else:
		print('YES')
t = int(input())
for i in range(t):
	main()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	mp = {}
	flag = True
	for i in range(n):
		x = (i + arr[i]) % n
		if x in mp:
			flag = False
			break
		else:
			mp[x] = 1
	if flag:
		print('YES')
	else:
		print('NO')


from sys import stdin
from collections import Counter
input = stdin.buffer.readline
T = int(input())
for _ in range(T):
	n = int(input())
	ls = list(map(int, input().split()))
	ls = [(u % n + i) % n for (i, u) in enumerate(ls)]
	print('YES' if len(Counter(ls)) == n else 'NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = [0] * n
	for i in range(n):
		if s[(i + l[i % n]) % n] == 0:
			s[(i + l[i % n]) % n] = 1
		else:
			print('NO')
			break
	else:
		print('YES')


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import sqrt, ceil
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for (i, v) in enumerate(a):
		t = (i + v) % n
		s.add(t)
	if len(s) != n:
		print('NO')
	else:
		print('YES')


import sys
import math
from collections import defaultdict
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	arr = list(map(int, sys.stdin.readline().split()))
	vis = defaultdict(int)
	z = True
	for i in range(1, n + 1):
		x = i % n
		y = i + arr[x]
		y %= n
		if vis[y] == 0:
			vis[y] = 1
		else:
			z = False
			break
	if z:
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	n = int(input())
	s = set()
	l = list(map(int, input().split()))
	for j in range(len(l)):
		s.add((j + l[j]) % n)
	print('YES' if len(s) == n else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 1:
		print('YES')
		input()
		continue
	a = [int(i) for i in input().split()]
	for k in range(n):
		a[k] += k
		a[k] %= n
	if set(a) == set(range(n)):
		print('YES')
	else:
		print('NO')


import sys
import heapq
import math
import bisect

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, input().split())

def rlinput():
	return list(map(int, input().split()))

def srlinput():
	return sorted(list(map(int, input().split())))

def main():
	n = iinput()
	q = rlinput()
	for i in range(n):
		q[i] = (q[i] + i) % n
	if len(set(q)) != n:
		print('NO')
	else:
		print('YES')
for sdfghjkl in range(iinput()):
	main()


for _ in range(int(input())):
	n = int(input())
	a = [(j + i) % n for (i, j) in enumerate(map(int, input().split()))]
	print('YNEOS'[len(set(a)) != n::2])


from typing import List

def guest():
	lenRoom = int(input())
	invitados = [1] * lenRoom
	numeroCuarto = [0] * lenRoom
	respuesta = 1
	valoresNumeroCuarto = input()
	numeroCuarto = list(map(int, valoresNumeroCuarto.split()))
	if lenRoom == 1:
		print('YES')
	else:
		for i in range(lenRoom):
			invitados[i] = invitados[i] - 1
			invitados[(i + numeroCuarto[i]) % lenRoom - 1] = invitados[(i + numeroCuarto[i]) % lenRoom - 1] + 1
		for i in range(lenRoom):
			if invitados[i] == 0:
				respuesta = 0
		if respuesta == 1:
			print('YES')
		else:
			print('NO')
t = int(input())
for i in range(t):
	guest()


from collections import Counter

def solve(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	ss = set()
	for (i, num) in enumerate(arr):
		rr = (num % n + i) % n
		if rr in ss:
			print('NO')
			return
		else:
			ss.add(rr)
	print('YES')
tc = int(input())
for t in range(1, tc + 1):
	solve(t)


t = int(input())
while t:
	t -= 1
	n = int(input())
	l1 = list(map(int, input().split()))
	l = []
	for i in l1:
		l.append(i % n)
	d = {}
	f = 0
	for i in range(n):
		if (i + l[i]) % n in d:
			f = 1
			break
		else:
			d[(i + l[i]) % n] = 1
	if f == 0:
		print('YES')
	else:
		print('NO')


def solve(n, a):
	h = {}
	for (k, b) in enumerate(a):
		x = (k + b) % n
		if x in h:
			return False
		h[x] = 1
	return True
t = int(input().strip())
for _ in range(t):
	n = int(input().strip())
	a = list(map(int, input().strip().split()))
	print('YES' if solve(n, a) else 'NO')


n = int(input())
for i in range(n):
	num = int(input())
	nums = map(int, input().split())
	nums = list(nums)
	cache = {}
	flag = False
	for (idx, _num) in enumerate(nums):
		new = (idx + _num) % num
		if new in cache.keys():
			print('NO')
			flag = True
			break
		else:
			cache[new] = 1
	if flag == False:
		print('YES')


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for _ in range(t):
		n = int(input())
		count = [0] * n
		ar = list(map(int, stdin.readline().split()))
		ok = True
		for i in range(n):
			count[(i + ar[i]) % n] += 1
			if count[(i + ar[i]) % n] > 1:
				ok = False
				break
		if ok:
			stdout.write('YES\n')
		else:
			stdout.write('NO\n')
main()


n = int(input())
for i in range(n):
	t = int(input())
	b = [int(i) for i in input().split()]
	k = [0] * t
	z = 0
	while z < t:
		tel = (z + b[z]) % t
		k[tel] += 1
		if k[tel] > 1:
			print('NO')
			break
		z += 1
	else:
		print('YES')


t = int(input())
for i in range(t):
	(s, v, w, b) = (int(input()), [int(elem) for elem in input().split()], 0, True)
	a = tuple(v)
	for elem in a:
		w += elem
	g = []
	for i in range(s):
		x = (i + a[i]) % s
		if x in g:
			b = False
			break
		else:
			g.append(x)
	if w % s == 0 and b:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	f = 0
	for i in range(n):
		x = (i + l[i]) % n
		if x in d:
			f = 1
			break
		else:
			d[x] = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


def solve():
	n = int(input())
	s = set()
	a = [int(x) for x in input().split(' ')]
	for i in range(len(a)):
		this = (i + a[i]) % n
		if this in s:
			print('NO')
			break
		else:
			s.add(this)
	else:
		print('YES')
nums = int(input())
for _ in range(1, nums + 1):
	solve()


t = int(input())
for it in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a_i = [i for i in range(n)]
	for i in range(len(a_i)):
		a_i[i] = (i + a[i % n]) % n
	if len(a_i) == len(set(a_i)):
		print('YES')
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
import threading
from math import floor
from bisect import bisect_right
from collections import Counter
from math import gcd
mod = 998244353

def main():
	for i in range(int(input())):
		n = int(input())
		arr = list(map(int, input().split()))
		occ = [0] * n
		b = True
		for i in range(n):
			if occ[(i + arr[i]) % n]:
				b = False
				break
			occ[(i + arr[i]) % n] = 1
		if b:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


test = int(input())
for i in range(test):
	n = int(input())
	arr = list(map(int, input().split()))
	rakh = [0] * n
	temp = False
	for i in range(0, n):
		value = (arr[i] + i + 1000000000) % n
		if rakh[value] != 0:
			temp = True
			break
		else:
			rakh[value] = 1
	if temp == True:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = 'YES'
	img = set()
	for (i, x) in enumerate(a):
		i0 = (x + i) % n
		if i0 in img:
			ans = 'NO'
			break
		img.add(i0)
	print(ans)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = [int(x) for x in stdin.readline().split()]
	lol = []
	for i in range(n):
		lol.append((i + a[i] % n) % n)
	if len(set(lol)) == n:
		stdout.write('YES' + '\n')
	else:
		stdout.write('NO' + '\n')


import sys
readline = sys.stdin.readline
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))

def solve():
	n = ni()
	print('YES' if len(set([(x + i) % n for (i, x) in enumerate(nl())])) == n else 'NO')
T = ni()
for _ in range(T):
	solve()


def Hilbert(a):
	l = [0 for _ in range(len(a))]
	for (i, ai) in enumerate(a):
		l[(i + a[i]) % len(a)] += 1
	return all((i == 1 for i in l))

def Solve():
	n = int(input())
	a = [int(x) for x in input().split()]
	if Hilbert(a):
		print('YES')
	else:
		print('NO')
T = int(input())
for i in range(T):
	Solve()


t = int(input())
i = 0
while i < t:
	n = int(input())
	x = input().split(' ')
	arr = []
	j = 0
	while j < n:
		arr.append((j + int(x[j])) % n)
		j = j + 1
	j = 0
	cnt = 0
	has = [0] * n
	while j < n:
		if has[arr[j]] == 1:
			cnt = 1
			break
		has[arr[j]] = 1
		j = j + 1
	if cnt == 0:
		print('YES')
	else:
		print('NO')
	i = i + 1


from sys import stdin

def main():
	readline = stdin.readline
	t = int(readline())
	for i in range(t):
		n = int(readline())
		a = list(map(int, readline().split()))
		d = dict()
		for m in range(n):
			m += a[m % n]
			m %= n
			if m not in d:
				d[m] = 1
			else:
				print('NO')
				break
		else:
			print('YES')
main()


import sys
readline = sys.stdin.readline

def solve():
	n = int(readline())
	a = list(map(int, readline().split()))
	s = set()
	for (i, a) in enumerate(a):
		s.add((a + i) % n)
	print('YES' if len(s) == n else 'NO')
for _ in range(int(readline())):
	solve()


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	for i in range(a):
		b[i] = i + b[i % a]
	b = list(map(lambda x: x % a, b))
	if a == len(set(b)):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l1 = []
	for i in range(len(l)):
		num = i + l[i] % n
		if num >= n:
			num = num % n
		l1.append(num)
	s = set(l1)
	if len(l1) == len(s):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	one_per_room = True
	for i in range(n):
		m = (i + a[i]) % n
		if m in s:
			one_per_room = False
			break
		s.add(m)
	if one_per_room:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * n
	for i in range(n):
		k = (a[i] + i) % n
		b[k] += 1
		if b[k] > 1:
			print('NO')
			break
	else:
		print('YES')


def sol():
	x = int(input())
	s = list(map(int, input().split()))
	st = set()
	for n in range(x):
		u = (s[n] + n) % x
		st.add(u)
	print('YES' if len(list(st)) == x else 'NO')
for n in range(int(input())):
	sol()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		l[i] = l[i] % n
	a = []
	for i in range(3 * n + 1):
		a.append(-1)
	f = 0
	for i in range(2 * n + 1):
		x = i + l[i % n]
		if a[x] != -1:
			f = 1
			break
		else:
			a[x] = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for case in range(t):
	n = int(input())
	array1 = [x for x in range(n)]
	array2 = [int(x) for x in input().split()]
	array3 = set()
	for i in range(n):
		array3.add((array1[i] + array2[i]) % n)
	if len(array3) == n:
		print('YES')
	else:
		print('NO')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007
import math
import bisect
abc = 'abcdefghijklmnopqrstuvwxyz'

def main():
	for _ in range(ii()):
		n = ii()
		a = li()
		f = [0] * (n + 1)
		flag = 1
		for i in range(n):
			f[(a[i] + i) % n] += 1
		for i in range(n):
			if f[i] > 1:
				flag = 0
				break
		if flag:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(n):
		arr[i] = (arr[i] % n + i % n) % n
	sets = set(arr)
	if len(sets) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = [0] * n
	for i in range(n):
		l[i] = (i + a[i] + n) % n
	l.sort()
	for i in range(n - 1):
		if l[i + 1] != l[i] + 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	x = [h % n for h in a]
	d = [0] * n * 2
	for i in range(0, 2 * n):
		d[i] = x[i % n] + i
	if len(set(d)) == len(d):
		print('YES')
	else:
		print('NO')
for test in range(t):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	ch = input()
	L = [int(i) for i in ch.split()]
	s = set()
	for j in range(n):
		L[j] += j
		s.add(L[j] % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for p in range(0, t):
	n = int(input())
	move = list(map(int, input().split(' ')))
	state = 'YES'
	cong = []
	for i in range(0, len(move)):
		if (i + move[i % n]) % n not in cong:
			cong.append((i + move[i % n]) % n)
		else:
			state = 'NO'
			break
	print(state)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] %= n
	aux = [0] * (n + 1)
	ok = True
	for i in range(n):
		if aux[(i + a[i]) % n]:
			ok = False
			break
		aux[(a[i] + i) % n] = 1
	print('YES' if ok else 'NO')


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, sys.stdin.readline().split(' ')))
	x = set()
	for i in range(0, n):
		x.add((i + a[i]) % n)
	if len(x) == n:
		print('YES')
	else:
		print('NO')
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split(' ')))
	initarr = [1] * n
	finarr = [0] * n
	nflag = False
	for i in range(len(a)):
		val = (i + a[i]) % n - 1
		if finarr[val] == 1:
			print('NO')
			nflag = True
			break
		else:
			finarr[val] = 1
	if not nflag:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = set(((int(v) + i) % n for (i, v) in enumerate(input().split())))
	print('YES' if len(a) == n else 'NO')


t = int(input())
while t != 0:
	n = int(input())
	list1 = list(map(int, input().split()))
	dicto = {}
	f = 0
	for i in range(n):
		q = (i + list1[i % n]) % n
		if q in dicto.keys():
			f = 1
			break
		else:
			dicto[q] = 1
	if f == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


T = int(input())
for t in range(T):
	N = int(input())
	A = [int(_) for _ in input().split()]
	seen = [False] * N
	for i in range(N):
		res = (i + A[i]) % N
		if seen[res]:
			print('NO')
			break
		seen[res] = True
	else:
		print('YES')


from collections import Counter, defaultdict, deque
import sys

def solve():
	n = int(input())
	arr = [int(x) for x in input().strip().split()]
	s = set()
	for i in range(n):
		s.add((i + arr[i]) % n)
	return len(s) == n
tt = int(input())
for test in range(tt):
	print('YES' if solve() else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	rems = [False] * n
	possible = True
	for i in range(n):
		rem = (i + a[i]) % n
		if rems[rem]:
			possible = False
			break
		rems[rem] = True
	if possible:
		print('YES')
	else:
		print('NO')


def f():
	x = int(input())
	A = list(map(int, input().split()))
	B = []
	C = []
	for j in range(x):
		B.append(j)
		C.append(-1)
	for j in range(x):
		C[(A[j] + j + x * 10 * 9) % x] += 1
	for j in range(x):
		if C[j] != 0:
			return 'NO'
	return 'YES'
for i in range(int(input())):
	print(f())


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	visited = set()
	for k in range(n):
		next = (k + a[k % n]) % n
		if next in visited:
			break
		visited.add(next)
	else:
		print('YES')
		continue
	print('NO')


for _ in range(int(input())):
	n = int(input())
	if len({(k + a) % n for (k, a) in enumerate(map(int, input().split()))}) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	ans = [0] * n
	for i in range(n):
		ans[(i + lis[i % n]) % n] += 1
	if max(ans) > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ls = []
	for i in range(len(a)):
		ls.append((i + a[i]) % n)
	s = set(ls)
	print('YES' if len(s) == len(ls) else 'NO')


def main():
	t = int(input())
	for c in range(t):
		n = int(input())
		shift = [int(s) for s in input().split(' ')]
		print(solve(n, shift))

def solve(n, shift):
	a = [i for i in range(n)]
	for i in range(n):
		a[i] = (a[i] + shift[i]) % n
	a.sort()
	for i in range(n):
		if i not in a:
			return 'NO'
	return 'YES'
main()


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def solve():
	N = getInt()
	A = getInts()
	rooms = set()
	for n in range(N):
		rooms.add((n + A[n]) % N)
	if len(rooms) == N:
		return 'YES'
	return 'NO'
T = getInt()
for t in range(T):
	print(solve())


def readInt():
	return int(input())

def readList():
	return list(map(int, input().rstrip().split()))

def readString():
	s = input()
	return s

def readInts():
	return map(int, input().rstrip().split())

def solve(n, arr):
	a = set([])
	for k in range(0, n):
		nxt = (k + arr[k % n]) % n
		if nxt in a:
			return False
		a.add(nxt)
	return True
T = readInt()
for i in range(T):
	n = readInt()
	arr = list(readInts())
	r = solve(n, arr)
	if r:
		print('YES')
	else:
		print('NO')


from collections import defaultdict as dd
for _ in range(int(input())):
	d = {}
	n = int(input())
	a = list(map(int, input().split()))
	flag = 0
	for i in range(0, n):
		b = (a[i] + i) % n
		if b < 0:
			b += n
		if b not in d:
			d[b] = 1
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = (i + a[i]) % n
	b = [0] * n
	for elem in a:
		b[elem] += 1
	flag = 0
	for elem in b:
		if elem > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


tc = int(input())
for _ in range(tc):
	num = int(input())
	arr = [int(x) for x in input().split()]
	mset = set()
	answer = 'YES'
	for i in range(num):
		val = (i + arr[i]) % num
		if val in mset:
			answer = 'NO'
			break
		else:
			mset.add(val)
	print(answer)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = [0] * n
	d = {}
	f = 0
	for i in range(n):
		l[i] = i + a[i % n]
		d[l[i]] = d.get(l[i], 0) + 1
		if d[l[i]] == 2:
			f = 1
			break
	r = {}
	for i in range(n):
		r[l[i] % n] = r.get(l[i] % n, 0) + 1
		if r[l[i] % n] == 2:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(('NO', 'YES')[len(set(((i + a) % n for (i, a) in enumerate(arr)))) == n])


from collections import defaultdict
for _ in range(int(input())):
	d = defaultdict(int)
	n = int(input())
	a = list(map(int, input().split()))
	f = True
	for i in range(n):
		x = (i + a[int(i)]) % n
		if d[x] == 1:
			f = False
			break
		d[x] = 1
	if f:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	used = set()
	f = False
	for i in range(n):
		v = (i + a[i]) % n
		if v in used:
			f = True
			break
		used.add(v)
	if f:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal
from decimal import *

class Node:

	def _init_(self, val):
		self.data = val
		self.left = None
		self.right = None

class fen_tree:

	def __init__(self, list):
		self.array = [0] + list
		for idx in range(1, len(self.array)):
			idx2 = idx + (idx & -idx)
			if idx2 < len(self.array):
				self.array[idx2] += self.array[idx]

	def prefix_query(self, idx):
		result = 0
		while idx:
			result += self.array[idx]
			idx -= idx & -idx
		return result

	def prints(self):
		print(self.array)
		return

	def range_query(self, from_idx, to_idx):
		return self.prefix_query(to_idx) - self.prefix_query(from_idx - 1)

	def update(self, idx, add):
		while idx < len(self.array):
			self.array[idx] += add
			idx += idx & -idx

def pre_sum(arr):
	p = [0]
	for i in arr:
		p.append(p[-1] + i)
	p.pop(0)
	return p

def pre_back(arr):
	p = [0]
	for i in arr:
		p.append(p[-1] + i)
	p.pop(0)
	return p

def bin_search(arr, l, r, val):
	if arr[r] <= val:
		return r + 1
	if r - l < 2:
		if arr[l] > val:
			return l
		else:
			return r
	mid = int((l + r) / 2)
	if arr[mid] <= val:
		return bin_search(arr, mid, r, val)
	else:
		return bin_search(arr, l, mid, val)

def search_leftmost(arr, val):

	def helper(arr, l, r, val):
		print(l, r)
		if arr[l] == val:
			return l
		if r - l <= 1:
			if arr[r] == val:
				return r
			else:
				print('not found')
				return
		mid = int((r + l) / 2)
		if arr[mid] >= val:
			return helper(arr, l, mid, val)
		else:
			return helper(arr, mid, r, val)
	return helper(arr, 0, len(arr) - 1, val)

def search_rightmost(arr, val):

	def helper(arr, l, r, val):
		print(l, r)
		if arr[r] == val:
			return r
		if r - l <= 1:
			if arr[l] == val:
				return r
			else:
				print('not found')
				return
		mid = int((r + l) / 2)
		if arr[mid] > val:
			return helper(arr, l, mid, val)
		else:
			return helper(arr, mid, r, val)
	return helper(arr, 0, len(arr) - 1, val)

def preorder_postorder(root, paths, parent, left, level):
	l = 0
	queue = [root]
	while queue != []:
		node = queue[-1]
		flag = 0
		for i in paths[node]:
			if i != parent[node] and level[i] == sys.maxsize:
				parent[i] = node
				level[i] = level[node] + 1
				flag = 1
				queue.append(i)
		if flag == 0:
			left[parent[node]] += 1 + left[node]
			queue.pop()
	return [parent, left, level]

def nCr(n, r, p):
	if r == 0:
		return 1
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 998244353
	limit = 10 ** 18
	for test in range(tests):
		n = inp()
		a = inlt()
		done = [0 for i in range(n)]
		flag = 0
		for i in range(n):
			curr = i + a[i]
			if done[curr % n] == 1:
				flag = 1
				break
			else:
				done[curr % n] = 1
		if flag == 0:
			print('YES')
		else:
			print('NO')
main()


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
import math
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def si():
	return input()

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
t = 1
t = int(input())
for _ in range(t):
	n = ii()
	a = li()
	l = []
	for i in range(n):
		l.append((i + a[i % n]) % n)
	if len(l) != len(set(l)):
		print('NO')
	else:
		print('YES')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		a = LI()
		s = set()
		for (i, c) in enumerate(a):
			s.add((i + c) % n)
		rr.append(YES(len(s) == n))
	return JA(rr, '\n')
print(main())


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	B = [0] * n
	for i in range(n):
		B[i] = (A[i] + i) % n
	if len(B) == len(set(B)):
		print('YES')
	else:
		print('NO')


def r(t=int):
	return list(map(t, input().split()))

def ri(t=int):
	return t(input())

def cd(it):
	ret_val = dict()
	for v in it:
		ret_val[v] = ret_val.get(v, 0) + 1
	return ret_val
for h in range(ri()):
	n = ri()
	a = [(i % n + n + e) % n for (e, i) in enumerate(r())]
	print('YES' if len(a) == len(set(a)) else 'NO')


for i in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	check = set()
	ch = 0
	for j in range(len(s)):
		now = (j + s[j]) % n
		if now in check or now > n - 1 or now < 0:
			print('NO')
			ch = 1
			break
		else:
			check.add(now)
	if ch == 0:
		print('YES')


T = int(input())
from collections import Counter
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	b = []
	for i in range(n):
		b.append((i + a[i]) % n)
	c = Counter(b)
	if len(c) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	for i in range(n):
		a[i] += i
		a[i] %= n
	if len(set(a)) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, s, m, p) = (int(input()), input().split(), set(), 0)
	for i in range(len(s)):
		m.add((i + int(s[i])) % n)
	if len(m) == n:
		print('YES')
	else:
		print('NO')


t = int(input())

def sol():
	n = int(input())
	a = list(map(int, input().split()))
	mrk = [False for _ in range(n)]
	for i in range(n):
		u = (i + a[i]) % n
		if u < 0:
			u += n
		if mrk[u]:
			return False
		mrk[u] = True
	return True
for _ in range(t):
	print('YES' if sol() else 'NO')


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	vacancy = [1 for i in range(n)]
	ans = 'YES'
	for i in range(n):
		if vacancy[(i + a[i]) % n] == 0:
			ans = 'NO'
			break
		vacancy[(i + a[i]) % n] = 0
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	alist = [int(i) for i in input().split()]
	check = []
	for k in range(len(alist)):
		check.append((k + alist[k]) % n)
	check.sort()
	if check == [i for i in range(n)]:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	for i in range(n):
		s[i] = s[i] % n
	p = []
	for i in range(n):
		p.append(i + s[i])
		p.append(n + s[i] + i)
	if len(list(set(p))) == 2 * n:
		print('YES')
	else:
		print('NO')


tc = int(input())
while tc > 0:
	n = int(input())
	slots = [0 for i in range(n)]
	a = list(map(int, input().split()))
	for i in range(n):
		slots[i] -= 1
		slots[(i + a[i] % n) % n] += 1
	ans = 'Yes'
	for v in slots:
		if v != 0:
			ans = 'No'
			break
	print(ans)
	tc -= 1


nrew = int(input())
for wew in range(nrew):
	n = int(input())
	temp = list(map(int, input().split(' ')))
	li = [0] * n
	flag = 0
	for i in range(len(temp)):
		mod = 0
		if temp[i] < 0:
			mod = n - abs(temp[i]) % n
		else:
			mod = temp[i] % n
		tr = mod + i
		if tr >= n:
			tr -= n
		li[tr] += 1
		if li[tr] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	n = int(inp())
	a = lis()
	new = []
	for i in range(n):
		new.append(i)
	for i in range(0, n):
		new[i] += a[i]
	for i in range(n):
		new[i] %= n
	if len(set(new)) == n:
		print('YES')
	else:
		print('NO')
testcase(int(inp()))


import sys

def I():
	return sys.stdin.readline().rstrip()
for _ in range(int(I())):
	n = int(I())
	a = list(map(int, I().split()))
	for i in range(n):
		a[i] = (a[i] + i) % n
	a.sort()
	print('YES' if all((i == a[i] for i in range(n))) else 'NO')


for T in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d = {}
	res = 'YES'
	for i in range(n):
		v = (i + arr[i] % n) % n
		if not d.get(v, 0):
			d[v] = 1
		else:
			res = 'NO'
			break
	print(res)


inputs = int(input())
for j in range(inputs):
	size = int(input())
	displacements = input().split()
	mask = [False for i in range(size)]
	for i in range(size):
		number = int(displacements[i])
		if not mask[(i + number % size) % size]:
			mask[(i + number % size) % size] = True
		else:
			print('NO')
			break
	else:
		print('YES')


cases = int(input())
for t in range(cases):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	f = 0
	for i in range(n):
		v = (a[i] + i) % n
		if v in d:
			f = 1
			print('NO')
			break
		else:
			d[v] = 1
	if f == 0:
		print('YES')


import sys

def load_sys():
	return sys.stdin.readlines()

def load_local():
	with open('input.txt', 'r') as f:
		input = f.readlines()
	return input

def hh(n, A):
	seen = set()
	for i in range(n):
		m = (i + A[i]) % n
		while m < 0:
			m += n
		if m in seen:
			return 'NO'
		seen.add(m)
	return 'YES'
input = load_sys()
idx = 1
N = len(input)
while idx < len(input):
	n = int(input[idx].split()[0])
	A = [int(x) for x in input[idx + 1].split()]
	idx += 2
	print(hh(n, A))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	v = [0] * n
	for i in range(len(l)):
		l[i] %= n
	for i in range(len(l)):
		x = (i + l[i]) % n
		if not v[x]:
			v[x] = 1
		else:
			print('NO')
			break
	else:
		print('YES')


count = int(input())
for i in range(count):
	n = int(input())
	a = input().split(' ')
	res = [0] * n
	result = 'YES'
	for j in range(n):
		pos = (j + int(a[j])) % n
		res[pos] += 1
		if res[pos] > 1:
			result = 'NO'
			break
	print(result)


for _ in range(int(input())):
	n = int(input())
	u = list(map(int, input().split()))
	s = set()
	for i in range(n):
		u[i] = (u[i] + i) % n
		s.add(u[i])
	if len(s) < n:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	B = []
	for i in range(n):
		B.append((i + a[i] % n) % n)
	if len(set(B)) != n:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout
from bisect import bisect_left, bisect_right
arr = [2]
for i in range(1, 3 * 10 ** 4):
	arr.append(arr[-1] + i * 3 + 2)
t = int(stdin.readline().strip())
for _ in range(t):
	n = int(stdin.readline().strip())
	arr = list(map(int, stdin.readline().strip().split(' ')))
	tarr = [0 for i in range(n)]
	flag = True
	for i in range(n):
		ni = i + arr[i]
		if ni >= n:
			ni = ni % n
		if ni < 0:
			ni = abs(ni % n)
		tarr[ni] += 1
		if tarr[ni] == 2:
			flag = False
			break
	if flag:
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


import math
import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = [0] * n
	for j in range(n):
		ans[(j + arr[j]) % n] += 1
	f = True
	for j in range(n):
		if ans[j] != 1:
			print('NO')
			f = False
			break
	if f:
		print('YES')


import math
import collections
from sys import stdin, stdout
M = 10 ** 9 + 7
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	res = True
	if n == 1:
		print('YES')
		continue
	d = {}
	for i in range(0, n, 1):
		if (a[i] + i) % n in d:
			res = False
			break
		else:
			d[(a[i] + i) % n] = 0
	if res:
		print('YES')
		continue
	print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = [(int(i) + n) % n for i in input().split()]
	occ = [0 for i in range(n)]
	no = 0
	for i in range(n):
		if occ[(i + arr[i]) % n] != 1:
			occ[(i + arr[i]) % n] = 1
		else:
			print('NO')
			no = 1
			break
	if not no:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = [item % n for item in a]
	after_used = [False for _ in range(n)]
	for i in range(n):
		next_stop = (i + a[i]) % n
		after_used[next_stop] = True
	if sum(after_used) == n:
		print('YES')
	else:
		print('NO')


from collections import deque
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def solve():
	for _ in range(ii()):
		n = ii()
		a = li()
		b = []
		for i in range(n):
			x = a[i]
			y = (i + x + n) % n
			b.append(y)
		if len(set(b)) == n:
			print('YES')
		else:
			print('NO')
solve()


import math
for k in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	for j in range(n):
		l[j] = (l[j] + j + 1) % n
	s = set(l)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


cases = int(input())
for j in range(cases):
	n = int(input())
	a = [int(i) % n for i in input().split()]
	b = [1 for w in range(n)]
	for k in range(n):
		b[(a[k] + k) % n] = 0
	if sum(b) == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for y in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = dict()
	flag = 1
	for i in range(n):
		x = (a[i] + i) % n
		if x in d:
			flag = 0
		d[x] = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint

def ceil(a, b):
	return (a + b - 1) // b
inf = float('inf')
mod = 10 ** 9 + 7

def pprint(*A):
	for a in A:
		print(*a, sep='\n')

def INT_(n):
	return int(n) - 1

def MI():
	return map(int, input().split())

def MF():
	return map(float, input().split())

def MI_():
	return map(INT_, input().split())

def LI():
	return list(MI())

def LI_():
	return [int(x) - 1 for x in input().split()]

def LF():
	return list(MF())

def LIN(n: int):
	return [I() for _ in range(n)]

def LLIN(n: int):
	return [LI() for _ in range(n)]

def LLIN_(n: int):
	return [LI_() for _ in range(n)]

def LLI():
	return [list(map(int, l.split())) for l in input()]

def I():
	return int(input())

def F():
	return float(input())

def ST():
	return input().replace('\n', '')

def solve():
	N = I()
	A = LI()
	ans = set()
	for (i, a) in enumerate(A):
		ans.add((i + a) % N)
	if len(ans) == N:
		print('YES')
	else:
		print('NO')

def main():
	n = I()
	for i in range(n):
		solve()
main()


for _ in range(int(input())):
	n = int(input())
	ai = [*map(int, input().split())]
	bi = [1000000000.0 + 1] * n
	ok = 'Yes'
	for i in range(n):
		new = (i + (ai[i] % n + n) % n) % n
		if bi[new] != 1000000000.0 + 1:
			ok = 'No'
			break
		bi[new] = ai[i]
	if 1000000000.0 + 1 in bi:
		ok = 'No'
	print(ok)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	x = [0] * n
	is_true = True
	for i in range(n):
		l = (i + a[i]) % n
		if x[l] == 0:
			x[l] += 1
		else:
			is_true = False
			break
	if is_true:
		print('YES')
	else:
		print('NO')


def main():
	n = int(input())
	lst = list(map(int, input().split()))
	st = set()
	for i in range(0, 2 * n):
		k = i + 1
		st.add(k + lst[i % n] % n)
	if len(st) == 2 * n:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	main()


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	n = int(data())
	arr = l()
	for i in range(n):
		arr[i] = ((arr[i] + i) % n + n) % n
	arr.sort()
	i = 0
	r = True
	while i < n:
		if arr[i] != i:
			r = False
			break
		i += 1
	if r:
		out('YES')
		continue
	out('NO')


from sys import stdin
from bisect import bisect_left as bl
T = int(stdin.readline().strip())
for caso in range(T):
	n = int(stdin.readline().strip())
	s = list(map(int, stdin.readline().strip().split()))
	a = []
	for i in range(n):
		a.append((i + s[i] % n) % n)
	if len(set(a)) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for loop in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	lis = [0] * n
	for i in range(n):
		lis[(i + a[i]) % n] += 1
	flag = True
	for i in range(n):
		if lis[i] != 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(0, T):
	n = int(input())
	s = [int(x) for x in input().split()]
	L = []
	temp = 'YES'
	for i in range(0, len(s)):
		tt = (i + s[i]) % n
		L.append(tt)
	pos = [0] * n
	for i in range(0, len(L)):
		pos[L[i]] += 1
	for i in range(0, len(pos)):
		if pos[i] > 1:
			temp = 'NO'
			break
	print(temp)


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	Dict = defaultdict(int)
	flag = 0
	for i in range(n):
		Dict[(arr[i] + i) % n] += 1
		if Dict[(arr[i] + i) % n] > 1:
			flag = 1
	if flag == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	data = list(map(int, input().split()))
	found = set()
	result = True
	for i in range(n):
		if (i + data[i]) % n in found:
			result = False
		else:
			found.add((i + data[i]) % n)
	if result:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	b = []
	for i in range(0, n):
		b.append((i + li[i]) % n)
	if len(set(b)) == n:
		print('YES')
	else:
		print('NO')


try:
	tc = int(input())
	for _ in range(tc):
		n = int(input())
		a = list(map(int, input().split()))
		for i in range(n):
			a[i] += i
			a[i] %= n
		s = set()
		for i in range(0, len(a)):
			s.add(a[i])
		if len(s) == len(a):
			print('YES')
		else:
			print('NO')
except:
	pass


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d = defaultdict(int)
	f = 0
	for i in range(n):
		val = (i + arr[i % n]) % n
		if val in d:
			f = 1
		d[val] = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	rooms = [0] * n
	for k in range(len(arr)):
		new_k = (k + arr[k % n]) % n
		rooms[new_k] += 1
	if all(rooms):
		print('YES')
	else:
		print('NO')


from _collections import defaultdict
vis = defaultdict(list)
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	flag = True
	vis = defaultdict(list)
	for i in range(n):
		c = (i + l[i]) % n
		if not vis[c]:
			vis[c] = 1
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	values = set()
	res = True
	for i in range(n):
		new_room = (i + a[i]) % n
		if new_room not in values:
			values.add(new_room)
		else:
			res = False
			break
	if res:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	Dict = {}
	flag = 0
	for i in range(n):
		if (i + arr[i]) % n in Dict:
			flag = 1
			break
		else:
			Dict[(i + arr[i]) % n] = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	d = []
	for i in range(n):
		p = (i + a[i]) % n
		d.append(p)
	d.sort()
	f = []
	for i in range(n):
		f.append(i)
	if f != d:
		print('NO')
	else:
		print('YES')


import sys
try:
	sys.stdin = open('Input.txt', 'r')
	sys.stdout = open('Output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for testCases in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		l[i] += i
	d = {}
	for i in range(n):
		if d.get(l[i] % n) == None:
			d[l[i] % n] = 1
		else:
			print('NO')
			break
	else:
		print('YES')


for ii in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	dic = {}
	f = 1
	for k in range(n):
		if (k + arr[k]) % n not in dic:
			dic[(k + arr[k]) % n] = 1
		else:
			print('NO')
			f = 0
			break
	if f:
		print('YES')


T = int(input())
for tc in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	li = []
	for i in range(n):
		rem = a[i] % n
		res = (rem + i) % n
		li.append(res)
	set_li = set(li)
	if len(set_li) == n:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	A = list(map(int, input().split()))
	s = set()
	res = 'YES'
	for (i, ai) in enumerate(A):
		new_room = ai + i
		new_room = new_room % n
		if new_room in s:
			res = 'NO'
			break
		s.add(new_room)
	print(res)


for _ in ' ' * int(input()):
	a = int(input())
	d = {}
	b = list(map(int, input().split()))
	for i in range(a):
		s = (i + b[i]) % a
		d[s] = d.get(s, 0) + 1
	if max(d.values()) < 2:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	count = dict()
	res = True
	for i in range(2 * n + 1):
		if i + a[i % n] % n not in count:
			count[i + a[i % n] % n] = 0
		count[i + a[i % n] % n] += 1
		if count[i + a[i % n] % n] > 1:
			res = False
			break
	if res:
		print('YES')
	else:
		print('NO')


import bisect
for ii in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	b = [False for i in range(n)]
	for i in range(n):
		b[(a[i] + i) % n] = True
	if False in b:
		print('NO')
	else:
		print('YES')


import os, sys
from math import *
t = int(input())
for nc in range(t):
	n = int(input())
	nums = [int(x) % n for x in input().strip().split()]
	arr = [-1 for i in range(n)]
	for i in range(n):
		ind = i + nums[i]
		arr[ind % n] = i
	print('YES' if min(arr) == 0 else 'NO')


import sys
input = sys.stdin.readline
from collections import defaultdict as dd, deque as dq
import bisect
l = [0, 5]
c = [2]
while c[-1] <= 2000000000:
	c.append(c[-1] + l[-1])
	l.append(3 + l[-1])
t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	vis = [0] * n
	lol = 0
	for i in range(n):
		if vis[i] == 0:
			vis[i] = 1
			p = i + l[i]
			while p % n != i:
				r = p % n
				if vis[r] == 1 and r != i:
					lol = 1
					break
				p = l[r] + r
				vis[r] = 1
			if lol:
				break
	if lol:
		print('NO')
	else:
		print('YES')
	t -= 1


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(II()):
		n = II()
		aa = LI()

		def ok():
			check = [False] * n
			for (i, a) in enumerate(aa):
				r = (i + a) % n
				if check[r]:
					return False
				check[r] = True
			return True
		if ok():
			print('YES')
		else:
			print('NO')
main()


from math import *
import os, sys
from io import BytesIO
input = BytesIO(os.read(0, os.fstat(0).st_size)).readline
s = 0
for _ in range(1, int(input()) + 1):
	n = int(input())
	a = list(map(int, input().split()))
	lol = min(a)
	d = a[0]
	for i in range(0, n):
		a[i] = (a[i] + i) % n
	if len(a) == len(set(a)):
		print('YES')
	else:
		print('NO')


def main_function():
	from sys import stdin
	from sys import stdout
	input = stdin.readline
	print = stdout.write

	def sign(x: int):
		if x == 0:
			return 0
		return 1 if x > 0 else -1
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		new_cells = [0] * n
		for (i, el) in enumerate(a):
			new_cells[(i + abs(el) % n * sign(el)) % n] += 1
		print('NO\n' if new_cells.count(0) != 0 or new_cells.count(1) != n else 'YES\n')
main_function()


import sys
from collections import defaultdict
from copy import copy
R = lambda t=int: t(input())
RL = lambda t=int: [t(x) for x in input().split()]
RLL = lambda n, t=int: [RL(t) for _ in range(n)]

def solution(n, A):
	s = set()
	i = 0
	for a in A:
		s.add((i + a) % n)
		i += 1
	return len(s) == n

def solve():
	n = R()
	A = RL()
	if solution(n, A):
		print('YES')
	else:
		print('NO')
T = R()
for _ in range(T):
	solve()


T = int(input())

def input_ints():
	return [int(x) for x in input().split()]
for t in range(T):
	N = int(input())
	A = input_ints()
	A = set(((k + a + N * 10 ** 10) % N for (k, a) in enumerate(A)))
	if len(A) == N:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	data = list(map(lambda x: int(x) % N, input().split()))
	occupied = [False] * N
	ans = 'YES'
	for (i, elt) in enumerate(data):
		if occupied[(i + elt) % N]:
			ans = 'NO'
			break
		else:
			occupied[(i + elt) % N] = True
	print(ans)


def main():
	n = int(input())
	array = list(map(lambda x: int(x), input().split(' ')))
	used = set()
	for (num, item) in enumerate(array):
		if (num + item) % n not in used:
			used.add((num + item) % n)
		else:
			print('NO')
			return
	print('YES')
t = int(input())
for i in range(t):
	main()


def overlap(N):
	for i in range(N):
		z = (shift[i] + i) % N
		if z in check:
			return 'NO'
		else:
			check.add(z)
	return 'YES'
for _ in range(int(input())):
	N = int(input())
	shift = [int(x) for x in input().split()]
	check = set()
	print(overlap(N))


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	n = mint()
	b = [0] * n
	j = 0
	for i in mints():
		b[(i + j) % n] += 1
		j += 1
	print(['NO', 'YES'][b.count(1) == n])
for i in range(mint()):
	solve()


def answer(n, A):
	d = {}
	for i in range(0, n):
		if (i + A[i]) % n in d:
			return 'NO'
		else:
			d[(i + A[i]) % n] = 1
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(answer(n, arr))


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	b = [False for i in range(n)]
	for (i, j) in enumerate([*map(lambda x: int(x) % n, input().split())]):
		b[(i + j) % n] = True
	print(['NO', 'YES'][all(b)])


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	rooms = set()
	for i in range(n):
		rooms.add((i + a[i]) % n)
	if len(rooms) != n:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	A = [int(x) for x in input().split()]
	count = [0] * n
	for k in range(n):
		count[(A[k] + k) % n] += 1
	if not all(count):
		print('NO')
	else:
		print('YES')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import deque
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
t = ip()
for _ in range(t):
	n = ip()
	arr = list(inp())
	bol = [False] * n
	for i in range(n):
		pos = (i + arr[i]) % n
		bol[pos] = True
	if bol.count(True) == n:
		print('YES')
	else:
		print('NO')


def answer(n, arr):
	intercepts = []
	for i in range(n):
		intercept = i + arr[i % n]
		intercepts.append(intercept)
	for i in range(n):
		for j in range(i + 1, n):
			if (-intercepts[i] + intercepts[j]) % n == 0:
				return 'NO'
	return 'YES'
testCount = int(input())
for _ in range(testCount):
	n = int(input())
	arr = list(map(int, input().split()))
	print(answer(n, arr))


import sys

def read_int():
	return int(sys.stdin.readline())

def read_ints():
	return list(map(int, sys.stdin.readline().split()))
t = read_int()
for j in range(t):
	n = read_int()
	a = read_ints()
	steps = []
	for i in range(n):
		step = (i + a[i] % n) % n
		steps.append(step)
	if len(set(steps)) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin
t = int(input())
for i in range(t):
	n = int(input())
	m = [int(i) for i in stdin.readline().split()]
	e = [0 for i in range(n)]
	for u in range(n):
		e[(m[u] + u) % n] += 1
	if e.count(1) != n:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	d = set()
	f = True
	for i in range(n):
		x = (i + l[i]) % n
		if x in d:
			f = False
			break
		else:
			d.add(x)
	if not f:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		A = getlist()
		D = defaultdict(int)
		for i in range(N):
			D[(A[i] + i) % N] += 1
		judge = 'YES'
		for i in D:
			if D[i] >= 2:
				judge = 'NO'
		print(judge)
main()


from sys import stdin, gettrace

def input():
	return stdin.buffer.readline()

def main():

	def solve():
		n = int(input())
		aa = [int(a) for a in input().split()]
		used = [False] * n
		for (i, a) in enumerate(aa):
			if used[(i + a) % n]:
				print('NO')
				return
			used[(i + a) % n] = True
		print('YES')
	q = int(input())
	for _ in range(q):
		solve()
main()


import sys

def answer(n, a):
	if n == 1:
		return 'YES'
	done = [False for _ in range(n)]
	for i in range(n):
		m = (i + a[i]) % n
		if done[m]:
			return 'NO'
		done[m] = True
	return 'YES'

def main():
	t = int(sys.stdin.readline())
	while t:
		n = int(sys.stdin.readline())
		a = tuple(map(int, sys.stdin.readline().split()))
		print(answer(n, a))
		t -= 1
	return
main()


t = int(input())

def mod(a, b):
	return (a % b + b) % b
while t:
	t -= 1
	n = int(input())
	z = [0 for _ in range(n)]
	a = list(map(int, input().split()))
	for (i, x) in enumerate(a):
		z[mod(i + x, n)] += 1
	if all(z):
		print('Yes')
	else:
		print('No')


from collections import Counter
for i in range(int(input())):
	input()
	tenants = [int(i) for i in input().split()]
	n = len(tenants)
	new_rooms = {(index + rm) % n: '' for (index, rm) in enumerate(tenants)}
	for i in range(n):
		if new_rooms.get(i) is None:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(i) for i in input().split()]
	s = [0 for i in range(n)]
	for i in range(n):
		s[i] = (i + a[i]) % n
	s.sort()
	equal = True
	for i in range(n):
		if s[i] != i:
			equal = False
			break
	if equal:
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(t):
	num = int(input())
	l = list(map(int, input().split(' ')))
	ans = []
	n = len(l)
	flag = False
	for i in range(len(l)):
		if (i + l[i]) % n in ans:
			flag = True
			break
		else:
			ans.append((i + l[i]) % n)
	if flag:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	visited = set()
	flag = 1
	for r in range(n):
		new = (r + a[r]) % n
		if new in visited:
			print('NO')
			flag = 0
			break
		else:
			visited.add(new)
	if flag:
		print('YES')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for (i, a) in enumerate(a):
		if (i + a) % n in s:
			print('no')
			return
		s.add((i + a) % n)
	print('yes')
t = int(input())
for _ in range(t):
	solve()


import math
import sys
from collections import defaultdict, Counter, deque, OrderedDict
import bisect
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]
from itertools import accumulate, groupby
for _ in range(int(input())):
	N = int(input())
	A = alele()
	M = [0] * N
	for i in range(N):
		M[(A[i] % N + i) % N] = 1
	if 0 in M:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	ans = 0
	d = {}
	for t in range(n):
		x = ((t + l[t]) % n + n) % n
		if x in d:
			ans = 1
		else:
			d[x] = 1
	print('NO' if ans else 'YES')


import os
import sys
from io import BytesIO, IOBase

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		A = list(map(int, input().split()))
		res = [False] * n
		for i in range(n):
			A[i] = (A[i] + i) % n
			res[A[i]] = True
		dup = True
		for i in range(n):
			dup = dup and res[i]
		if dup:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = lambda s: self.buffer.write(s.encode()) if self.writable else None

	def read(self):
		if self.buffer.tell():
			return self.buffer.read().decode('ascii')
		return os.read(self._fd, os.fstat(self._fd).st_size).decode('ascii')

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline().decode('ascii')

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

def print(*args, sep=' ', end='\n', file=sys.stdout, flush=False):
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(end)
	if flush:
		file.flush()
(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
sys.setrecursionlimit(10000)
main()


t = int(input())
for i in range(t):
	n = int(input())
	listR = []
	temp = input().split()
	for j in range(len(temp)):
		listR.append((int(temp[j]) + j) % n)
	newR = set(listR)
	listR.sort()
	if len(newR) < n:
		print('NO')
	elif listR == list(range(n)):
		print('YES')
	else:
		print('NO')


import sys, math
mod = 10 ** 9

def solve(test_index):
	n = int(input())
	a = list(map(int, input().split()))
	b = [(a[i] + i) % n for i in range(n)]
	if len(set(b)) != n:
		print('NO')
	else:
		print('YES')
	return
sys.setrecursionlimit(100000)
num_tests = int(input())
for test in range(1, num_tests + 1):
	solve(test)


cases = int(input())
resulsts = []

def solv(n, arr, m):
	d = set()
	for k in range(n):
		if arr[k] < 0:
			arr[k] += m
		new_room = (k + arr[k]) % n
		if new_room in d:
			return 'NO'
		d.add(new_room)
	return 'YES'
for i in range(cases):
	n = int(input())
	arr = [int(i) for i in input().split(' ')]
	m = 10 ** 9 * n
	print(solv(n, arr, m))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import factorial
from collections import Counter, defaultdict
from heapq import heapify, heappop, heappush

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')

def main():
	for _ in range(N()):
		n = N()
		arr = RLL()
		tp = [(i + v) % n for (i, v) in enumerate(arr)]
		if len(set(tp)) != len(tp):
			print('NO')
		else:
			print('YES')
main()


from collections import defaultdict
T = int(input())
for _ in range(T):
	N = int(input())
	d = defaultdict(int)
	x = list(map(int, input().split()))
	for i in range(N):
		d[(i + x[i]) % N] += 1
	K = bool(all((key == 1 for key in d.values())))
	if K:
		print('yes')
	else:
		print('no')


kl = int(input())
for l in range(kl):
	n = int(input())
	B = set()
	k = 0
	for i in input().split():
		i = int(i)
		k += 1
		a = (i % n + k) % n
		B.add(a)
	if len(B) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	a = [int(x) for x in inp().split()]
	arr = list(range(n))
	for i in range(n):
		arr[i] = (arr[i] + a[i % n]) % n
	if len(arr) == len(set(arr)):
		print('YES')
	else:
		print('NO')


t = int(input())
for tc in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = [0] * n
	for i in range(len(a)):
		ans[(i + a[i]) % n] += 1
	output = 'YES'
	for a in ans:
		if a != 1:
			output = 'NO'
			break
	print(output)


import sys
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
while t:
	t -= 1
	(n,) = I()
	a = I()
	d = dd(int)
	ans = 'YES'
	for i in range(n):
		d[(i + a[i]) % n] += 1
		if d[(i + a[i]) % n] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = input()
	A = list(map(int, list(a.split())))
	d = {}
	flag = 0
	for i in range(1, n + 1):
		if (i + A[i % n]) % n in d:
			print('No')
			flag = 1
			break
		else:
			d[(i + A[i % n]) % n] = 1
	if flag == 0:
		print('Yes')


import sys
from collections import defaultdict, deque
from math import sqrt, gcd, factorial

def input():
	return sys.stdin.readline()[:-1]

def solve():
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	ok = 1
	w = set()
	for i in range(n):
		y = (i + a[i]) % n
		if y in w:
			ok = 0
		w.add(y)
	if ok:
		print('YES')
	else:
		print('NO')
t = 1
t = int(input())
for case in range(1, t + 1):
	ans = solve()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for (i, x) in enumerate(a):
		s.add((i + x) % n)
	print('YNEOS'[len(s) != n::2])


import math
t = int(input())
for _ in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	l = []
	for i in range(n):
		l.append((i + s[i]) % n)
	if len(set(l)) != n:
		print('NO')
	else:
		print('YES')


def solve():
	n = int(input())
	arr = [int(v) for v in input().split()]
	st = set()
	for i in range(2 * n):
		loc = arr[i % n] % n + i
		if loc in st:
			print('NO')
			return
		st.add(loc)
	print('YES')
t = int(input())
for _ in range(t):
	solve()


from sys import *
from math import *
from bisect import *
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	d = {}
	f = 0
	for i in range(n):
		x = (i + a[i]) % n
		if x in d:
			f = 1
			break
		else:
			d[x] = a[i]
	if f == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	st = set()
	lst = list(map(int, input().split()))
	for i in range(n):
		st.add((i + lst[i]) % n)
	if len(st) == n:
		print('YES')
	else:
		print('NO')


from math import ceil

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def find_product(n, m, arr):
	product = 1
	if n <= m:
		for i in range(n):
			for j in range(i + 1, n):
				product = product * abs(arr[i] - arr[j]) % m
		return product
	return 0

def count_tables(l):
	count = 0
	l.sort()
	a = l[1] - l[0]
	b = l[2] - l[0]
	if a % 3 > 0 and a % 3 + (b - (a - a % 3)) >= 3:
		count += 1
	count += l[0] + 2 * a // 3
	return int(min(sum(l) / 3, l[0] + l[1]))

def no_vacancy(n, arr):
	hotel = {}
	for i in range(n):
		room = (i + arr[i]) % n
		if room in hotel:
			return False
		else:
			hotel[room] = 1
	return True
t = 1
t = int(input())
while t:
	t = t - 1
	n = int(input())
	l = list(map(int, input().strip().split()))[:n]
	if no_vacancy(n, l):
		print('Yes')
	else:
		print('No')


for T in range(1, int(input()) + 1):
	N = int(input())
	arr = list(map(int, input().split()))
	s = set()
	for (i, a) in enumerate(arr):
		s.add((i + a) % N)
	if len(s) == N:
		print('YES')
	else:
		print('NO')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	s = set()
	cond = True
	for i in range(n):
		x = (i + arr[i]) % n
		if x in s:
			cond = False
			break
		else:
			s.add(x)
	if cond == True:
		print('YES')
	else:
		print('NO')


t = int(input())

def solve(n, A):
	used = [False] * n
	for (i, a) in enumerate(A):
		r = (i + a) % n
		if used[r]:
			return False
		used[r] = True
	return True
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	if solve(n, A):
		print('YES')
	else:
		print('NO')


tests = int(input())
for _ in range(tests):
	n = int(input())
	sp = list(map(int, input().split()))
	st = set()
	for i in range(n):
		st.add((sp[i] + i) % n)
	if len(st) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for xx in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = (a[i] + i) % n
	a.sort()
	flg = 0
	for i in range(n):
		if a[i] != i:
			flg = 1
			break
	if flg == 1:
		print('NO')
	else:
		print('YES')


k = int(input())
for _ in range(k):
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(len(arr)):
		arr[i] += i
		arr[i] %= n
	arr.sort()
	m = 0
	for i in range(len(arr)):
		if arr[i] != i:
			m = 1
			print('NO')
			break
	if m == 0:
		print('YES')


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	N = int(stdin.readline())
	A = [int(x) for x in stdin.readline().split()]
	st = set()
	for i in range(N):
		st.add((i + A[i]) % N)
	if len(st) == N:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for r in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	flag = True
	for i in range(n):
		x = (i + l[i]) % n
		try:
			d[x] += 1
			flag = False
			break
		except:
			d[x] = 0
	if flag == True:
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline
q = int(input())
for _ in range(q):
	n = int(input())
	l = list(map(int, input().split()))
	cyk = [(i + l[i]) % n for i in range(n)]
	cyk.sort()
	dupa = 1
	for i in range(1, n):
		if cyk[i] != cyk[i - 1] + 1:
			dupa = 0
	if dupa:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	list1 = list(map(int, input().split()))
	set1 = set()
	for j in range(n):
		set1.add((list1[j] + j) % n)
	if len(set1) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for each_t in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	s = set()
	for k in range(1, n + 1):
		s.add((k + a[k % n]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


import sys

def input():
	return sys.stdin.readline()[:-1]
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	used = [False for _ in range(n)]
	for i in range(n):
		if used[(i + a[i]) % n]:
			print('NO')
			break
		else:
			used[(i + a[i]) % n] = True
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input().strip())
	arr = map(int, input().strip().split())
	vis = [False] * n
	for (i, v) in enumerate(arr):
		vis[((i + v) % n + n) % n] = True
	if all(vis):
		print('YES')
	else:
		print('NO')


import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def solve():
	n = int(input())
	arr = list_input()
	ans = set()
	for i in range(n):
		ans.add((i + arr[i]) % n)
	if len(ans) == n:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solve()


def areDistinct(ar):
	n = len(ar)
	s = set()
	for i in range(0, n):
		if ar[i] in s:
			return False
		else:
			s.add(ar[i])
	return True
t = int(input())
while t > 0:
	n = int(input())
	ar = list(map(int, input().split()))
	for i in range(0, n):
		ar[i] += i
		ar[i] %= n
	if areDistinct(ar):
		print('YES')
	else:
		print('NO')
	t -= 1


import math as mt
import sys, string
input = sys.stdin.readline
from heapq import heappush, heapify, heappop
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
t = I()
for i in range(t):
	n = I()
	l = [0] * n
	x = L()
	f = 1
	for i in range(n):
		l[(i + x[i]) % n] += 1
		if l[(i + x[i]) % n] > 1:
			print('NO')
			f = 0
			break
	if f:
		print('YES')


testCases = int(input())
for i in range(0, testCases):
	cycleLen = int(input())
	cycle = input().split()
	for c in range(0, cycleLen):
		cycle[c] = int(cycle[c])
	sCycle = []
	rChk = []
	for y in range(0, cycleLen):
		sCycle.append(cycle[y] + y)
		rChk.append(sCycle[y] % cycleLen)
	if len(set(rChk)) == len(rChk):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	freq = {}
	n = int(input())
	arr = [int(s) for s in input().split()]
	flag = True
	for i in range(len(arr)):
		x = (i + arr[int(i % n)]) % n
		if x in freq:
			flag = False
			break
		freq[x] = 1
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	se = set()
	flg = 0
	for j in range(n):
		if (a[j] + j) % n in se:
			flg = 1
			break
		se.add((a[j] + j) % n)
	if flg:
		print('NO')
	else:
		print('YES')


import sys
sys.setrecursionlimit(10 ** 8)
try:
	FILE_POINTER = open('input.inpt')
	input = FILE_POINTER.readline
except:
	FILE_POINTER = None
	input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	hs = [0] * n
	for i in range(n):
		hs[(i + arr[i]) % n] += 1
	poss = 1
	for i in range(n):
		if hs[i] > 1:
			poss = 0
			break
	if poss:
		print('YES')
	else:
		print('NO')
if FILE_POINTER:
	FILE_POINTER.close()


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	liste = []
	for i in range(n):
		if i != n:
			liste.append((i + a[i]) % n)
	y = len(liste)
	x = len(set(liste))
	if x == y:
		print('YES')
	else:
		print('NO')


from sys import *
from collections import *
from math import *
input = stdin.readline
tc = int(input())
for tcase in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	st = set()
	for i in range(n):
		x = i + arr[i]
		x = (x % n + n) % n
		st.add(x)
	print('YES' if len(st) == n else 'NO')


from collections import defaultdict
for t in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	rooms = defaultdict(int)
	for (i, x) in enumerate(a):
		rooms[(i + x) % n] = 1
	for i in range(n):
		if rooms[i] == 0:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	se = set()
	x = 0
	for i in range(n):
		se.add((i + arr[i % n]) % n)
	if len(se) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = a[i] % n
		if a[i] < 0:
			a[i] += n
	temp = [-i for i in range(1, n + 1)]
	temp = temp[::-1]
	temp += [i for i in range(n)]
	val = []
	for i in range(2 * n):
		if a[i % n] + temp[i] >= 0:
			val.append(a[i % n] + temp[i])
	cc = [0 for __ in range(n)]
	for x in val:
		if x < n:
			cc[x] += 1
	if cc == [1] * n:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline

def solve(n, a):
	filled = set()
	for k in range(n):
		newk = (k + a[k % n]) % n
		if newk not in filled:
			filled.add(newk)
		else:
			return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))


from collections import deque
from collections import OrderedDict
import math
import sys
import os
from io import BytesIO
import threading
import bisect
limit = 600005
for t in range(int(input())):
	n = int(input())
	array = input().split()
	hashMap = set()
	for i in range(n):
		array[i] = int(array[i])
	isAnswerNo = False
	for i in range(n):
		step = ((i + array[i]) % n + n) % n
		if step in hashMap:
			isAnswerNo = True
			break
		else:
			hashMap.add(step)
	if isAnswerNo == False:
		print('YES')
	else:
		print('NO')


import sys
readline = sys.stdin.readline

def solve():
	N = int(readline())
	A = list(map(int, readline().split()))
	s = set()
	for (i, a) in enumerate(A):
		s.add((a + i) % N)
	if len(s) == N:
		print('YES')
	else:
		print('NO')
T = int(readline())
for i in range(T):
	solve()


import math
from collections import defaultdict, Counter

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	rooms = []
	m = defaultdict(bool)
	for i in range(n):
		new_room = (i + arr[i]) % n
		if m[new_room]:
			print('NO')
			return
		else:
			m[new_room] = True
	print('YES')
	return
t = int(input())
for _ in range(t):
	main()


T = int(input())
for case in range(T):
	i = int(input())
	ls = [int(x) for x in input().split()]
	o = [int(x) for x in range(i)]
	new = [(x + y) % i for (x, y) in zip(ls, o)]
	s = set(new)
	if len(s) == len(new):
		print('YES')
	else:
		print('NO')


for x in range(int(input())):
	n = int(input())
	m = list(map(int, input().split()))
	s = set()
	for i in range(n):
		s.add((i + m[i % n]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	mark = set()
	for i in range(n):
		mark.add((A[i] + i) % n)
	print('YES') if len(mark) == n else print('NO')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		l[i] = (i + l[i]) % n
	if len(set(l)) == n:
		print('YES')
	else:
		print('NO')


T = int(input())
n = [0] * T
ns = [0] * T
for t in range(T):
	n[t] = int(input())
	ns[t] = [int(i) for i in input().split(' ')]

def check(ns):
	st = set([])
	n = len(ns)
	for i in range(n):
		st.add((i + ns[i]) % n)
	if len(st) == len(ns):
		return 'YES'
	else:
		return 'NO'
for t in range(T):
	print(check(ns[t]))


for w in range(int(input())):
	n = int(input())
	k = []
	a = list(map(int, input().split()))
	for i in range(1, 2 * n + 1):
		if i <= n:
			s = i + a[i - 1] % n
		else:
			s = i + a[i - n - 1] % n
		k.append(s)
	if len(list(set(k))) == len(k):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	hashRem = {rem: 0 for rem in range(0, n)}
	check = True
	for pos in range(len(arr)):
		newRoom = (pos + arr[pos]) % n
		if hashRem[newRoom] == 1:
			check = False
			break
		hashRem[newRoom] += 1
	if check:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split(' ')))
	s = set()

	def check():
		for (k, a) in enumerate(A):
			r = (k + A[k]) % n
			if r in s:
				return 'no'
			s.add(r)
		return 'yes'
	print(check())


for _ in range(int(input())):
	n = int(input())
	a = map(int, input().split())
	b = n * [0]
	valid = True
	for (i, c) in enumerate(a):
		b[(i + c) % n] += 1
		if b[(i + c) % n] == 2:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


MOD = 10 ** 9 + 7
RLIMIT = 1000
DEBUG = 1

def main():
	for _ in inputt():
		(n,) = inputi()
		A = inputl()
		T = [0] * n
		for (i, a) in enumerate(A):
			a = (i + a) % n
			if T[a]:
				print('NO')
				break
			T[a] = 1
		else:
			print('YES')
from math import *
from heapq import *
from itertools import *
from functools import reduce, lru_cache, partial
from collections import Counter, defaultdict
import re, copy, operator, cmath
import sys, io, os, builtins
sys.setrecursionlimit(RLIMIT)
BUFSIZE = 8192

class FastIO(io.IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = io.BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(io.IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	if args:
		sys.stdout.write(str(args[0]))
		split = kwargs.pop('split', ' ')
		for arg in args[1:]:
			sys.stdout.write(split)
			sys.stdout.write(str(arg))
	sys.stdout.write(kwargs.pop('end', '\n'))

def debug(*args, **kwargs):
	if DEBUG and (not __debug__):
		print('debug', *args, **kwargs)
		sys.stdout.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip()
inputt = lambda t=0: range(t) if t else range(int(input()))
inputs = lambda : input().split()
inputi = lambda k=int: map(k, inputs())
inputl = lambda t=0, k=lambda : list(inputi()): [k() for _ in range(t)] if t else list(k())

def len(a):
	if isinstance(a, range):
		return -((a.start - a.stop) // a.step)
	return builtins.len(a)

def bisect_left(a, x, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	while lo < hi:
		mid = (lo + hi) // 2
		if key(a[mid]) < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def bisect_right(a, x, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	while lo < hi:
		mid = (lo + hi) // 2
		if x < key(a[mid]):
			hi = mid
		else:
			lo = mid + 1
	return lo

def insort_left(a, x, key=None, lo=0, hi=None):
	lo = bisect_left(a, x, key, lo, hi)
	a.insert(lo, x)

def insort_right(a, x, key=None, lo=0, hi=None):
	lo = bisect_right(a, x, key, lo, hi)
	a.insert(lo, x)
do_nothing = lambda x: x
bisect = bisect_right
insort = insort_right

def index(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	i = bisect_left(a, x, key, lo, hi)
	if lo <= i < hi and key(a[i]) == x:
		return a[i]
	if default != None:
		return default
	raise ValueError

def find_lt(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_left(a, x, key, lo, hi)
	if lo < i <= hi:
		return a[i - 1]
	if default != None:
		return default
	raise ValueError

def find_le(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_right(a, x, key, lo, hi)
	if lo < i <= hi:
		return a[i - 1]
	if default != None:
		return default
	raise ValueError

def find_gt(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_right(a, x, key, lo, hi)
	if lo <= i < hi:
		return a[i]
	if default != None:
		return default
	raise ValueError

def find_ge(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_left(a, x, key, lo, hi)
	if lo <= i < hi:
		return a[i]
	if default != None:
		return default
	raise ValueError

class Tree:

	def __init__(n):
		self._n = n
		self._conn = [[] for _ in range(n)]
		self._list = [0] * n

	def connect(a, b):
		pass

class Sieve:

	def __init__(self):
		self._n = 6
		self._list = [2, 3, 5, 7, 11, 13]

	def extend(self, n):
		if n <= self._list[-1]:
			return
		maxbase = int(n ** 0.5) + 1
		self.extend(maxbase)
		begin = self._list[-1] + 1
		newsieve = [i for i in range(begin, n + 1)]
		for p in self.primerange(2, maxbase):
			for i in range(-begin % p, len(newsieve), p):
				newsieve[i] = 0
		self._list.extend([x for x in newsieve if x])

	def extend_to_no(self, i):
		while len(self._list) < i:
			self.extend(int(self._list[-1] * 1.5))

	def primerange(self, a, b):
		a = max(2, a)
		if a >= b:
			return
		self.extend(b)
		i = self.search(a)[1]
		maxi = len(self._list) + 1
		while i < maxi:
			p = self._list[i - 1]
			if p < b:
				yield p
				i += 1
			else:
				return

	def search(self, n):
		if n < 2:
			raise ValueError
		if n > self._list[-1]:
			self.extend(n)
		b = bisect(self._list, n)
		if self._list[b - 1] == n:
			return (b, b)
		else:
			return (b, b + 1)

	def __contains__(self, n):
		if n < 2:
			raise ValueError
		if not n % 2:
			return n == 2
		(a, b) = self.search(n)
		return a == b

	def __getitem__(self, n):
		if isinstance(n, slice):
			self.extend_to_no(n.stop + 1)
			return self._list[n.start:n.stop:n.step]
		else:
			self.extend_to_no(n + 1)
			return self._list[n]
sieve = Sieve()

def isprime(n):
	if n <= sieve._list[-1]:
		return n in sieve
	for i in sieve:
		if not n % i:
			return False
		if n < i * i:
			return True
prime = sieve.__getitem__
primerange = lambda a, b=0: sieve.primerange(a, b) if b else sieve.primerange(2, a)

def factorint(n):
	factors = []
	for i in sieve:
		if n < i * i:
			break
		while not n % i:
			factors.append(i)
			n //= i
	if n != 1:
		factors.append(n)
	return factors
factordict = lambda n: Counter(factorint(n))
main()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % n != 0:
		print('NO')
		continue
	set_ = set()
	for i in range(n):
		set_.add((a[i] + i) % n)
	if len(set_) != n:
		print('NO')
	else:
		print('YES')


from sys import stdin

def solve():
	return

def main():
	inp = stdin.readline
	for _ in range(int(inp())):
		n = int(inp())
		a = list(map(int, inp().split()))
		d = set()
		ans = True
		for i in range(n):
			k = (i + a[i] % n) % n
			if k in d:
				ans = False
				break
			d.add(k)
		if ans:
			print('YES')
		else:
			print('NO')
main()


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	pos = [1] * n
	for i in range(n):
		pos[i] -= 1
		pos[(i + a[i % n]) % n] += 1
	print('NO' if pos.count(0) >= 1 else 'YES')
for i in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	mod = []
	for i in range(n):
		mod.append((i + arr[i]) % n)
	vis = [0] * n
	for i in range(len(mod)):
		vis[mod[i]] = 1
	s = sum(vis)
	if s == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	c = n * [0]
	a = list(map(int, input().split()))
	flag = 0
	for i in range(n):
		s = (i + a[i]) % n
		if s < 0:
			s += n
		c[s] += 1
	for i in range(n):
		if c[i] == 0:
			flag = 1
			break
	if flag:
		print('NO')
	else:
		print('YES')


def dfs(cur, vis, a, n):
	if vis[cur]:
		return cur
	vis[cur] = True
	return dfs((cur + a[cur]) % n, vis, a, n)
t = int(input())
for tt in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	vis = [False] * n
	ans = True
	for i in range(n):
		if not vis[i]:
			last = dfs(i, vis, a, n)
			if last != i:
				ans = False
				break
	print('YES' if ans else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	g = [1] * n
	assert -1337 % 3 == 1
	assert 100 % 12 == 4
	for i in range(n):
		g[(i + a[i]) % n] += 1
		g[i] -= 1
	print('YES' if all((x == 1 for x in g)) else 'NO')


def solve(n, s):
	if n == 1:
		return 'YES'
	a = [i for i in range(n)]
	for j in range(n):
		a[j] = (a[j] + s[j]) % n
	if len(set(a)) != len(a):
		return 'NO'
	else:
		return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	print(solve(n, s))


from pprint import pprint
import sys
import collections
input = sys.stdin.readline
q = int(input())
for _ in range(q):
	n = int(input())
	dat = list(map(int, input().split()))
	used = dict()
	res = list(range(0, n))
	can = True
	for j in range(len(res)):
		v = res[j] + dat[res[j] % n]
		v %= n
		if v in used:
			can = False
			break
		used[v] = True
	print('YES' if can else 'NO')


import os

def g(xs, n):
	seen = [False] * n
	for (i, x) in enumerate(xs):
		j = (i + x) % n
		if seen[j]:
			return False
		else:
			seen[j] = True
	return True

def pp(input):
	n_test = int(input())
	for t in range(n_test):
		n = int(input())
		xs = map(int, input().split())
		if g(xs, n):
			print('YES')
		else:
			print('NO')
if 'paalto' in os.getcwd():
	from string_source import string_source
	s1 = string_source('6\n1\n14\n2\n1 -1\n4\n5 5 5 1\n3\n3 2 1\n2\n0 1\n5\n-239 -2 -100 -3 -11\n')
	pp(s1)
else:
	pp(input)


def solve():
	n = int(input())
	li = [int(x) for x in input().split()]
	visited = [False] * n
	for i in range(n):
		shift_room = i + li[i]
		changed_room = shift_room % n
		if visited[changed_room] == True:
			print('NO')
			return
		else:
			visited[changed_room] = True
	else:
		print('YES')
		return
t = int(input())
for i in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	g = set()
	suc = True
	for i in range(n):
		h = (i + a[i]) % n
		if h in g:
			print('NO')
			suc = False
			break
		else:
			g.add(h)
	if suc:
		print('YES')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = [(a[i] + i) % n for i in range(n)]
	b.sort()
	if b == list(range(n)):
		print('YES')
	else:
		print('NO')


def resolve():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		d = {}
		for (index, i) in enumerate(a):
			j = (index + i) % n
			if j in d:
				print('NO')
				break
			else:
				d[j] = 1
		else:
			print('YES')
resolve()


for _ in range(int(input())):
	n = int(input())
	f = 1
	a = list(map(int, input().split()))
	for i in range(n):
		if a[i] == 0:
			f = 0
			break
	for i in range(n):
		a[i] = (i + a[i % n]) % n
	if len(set(a)) == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	se = set({})
	flag = True
	for i in range(n):
		new = i + ar[i % n]
		xx = new % n
		if xx in se:
			flag = False
			break
		else:
			se.add(xx)
	if flag:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	n = int(input())
	array = [int(s) for s in input().split()]
	dict_ = {}
	flag = True
	for i in range(len(array)):
		if (array[i] + i) % n in dict_:
			flag = False
			break
		else:
			dict_[(array[i] + i) % n] = i
	if flag:
		print('YES')
	else:
		print('NO')


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))[:n]
	flag = 0
	store = defaultdict(int)
	for i in range(n):
		pos = arr[i] + i
		if store[(pos % n + n) % n] == True:
			print('NO')
			flag = 1
			break
		store[(pos % n + n) % n] = True
	if flag == 0:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = [(i + j) % n for (i, j) in enumerate(a)]
	if len(set(a)) == n:
		print('YES')
	else:
		print('NO')


from collections import defaultdict
t = int(input())
mod = pow(10, 9) + 7
for t1 in range(0, t):
	d = defaultdict(int)
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		d[(i + l[i]) % n] += 1
	flag = 1
	for i in d.items():
		if i[1] > 1:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	d = {}
	na = [0 for i in range(n)]
	ans = 'YES'
	for i in range(n):
		r = (i + arr[i]) % n
		if na[r] == 0:
			na[r] = 1
		else:
			ans = 'NO'
			break
	print(ans)


testcases = int(input())
for _ in range(testcases):
	n = int(input())
	l = list(map(int, input().split()))
	k = [0 for i in range(n)]
	flag = 0
	for i in range(len(l)):
		p = (i + l[i]) % n
		k[p] += 1
	for i in range(len(k)):
		if k[i] != 1:
			flag = 1
	if flag == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	flag = True
	for i in range(0, n):
		if (i + a[i]) % n in s:
			flag = False
			break
		s.add((i + a[i]) % n)
	if flag:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(c) for c in input().split()]
	done = set()
	for i in range(len(arr)):
		k_i = (i + arr[i]) % n
		if k_i in done:
			print('NO')
			break
		else:
			done.add(k_i)
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	ai = list(map(int, input().split(' ')))
	modi = [0 for k in range(n)]
	for i in range(n):
		modi[(i + ai[i]) % n] += 1
	if modi.count(0) > 0:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	k = int(input())
	a = list(map(int, input().split()))
	for i in range(k):
		a[i] = (a[i] + i) % k
	a.sort()
	for i in range(k):
		if a[i] != i:
			print('NO')
			break
	else:
		print('YES')


import sys
from collections import deque
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * n
	flag = False
	for k in range(n):
		room = (k + a[k]) % n
		if b[room] == 1:
			flag = True
			break
		else:
			b[room] = 1
	if flag:
		print('NO')
	else:
		print('YES')


def hilberts_hotel(n, array):
	s = set()
	for k in range(n):
		new_room = (k + array[k]) % n
		if new_room in s:
			return 'NO'
		s.add(new_room)
	return 'YES'
data_size = int(input())
for _ in range(data_size):
	n = int(input())
	a = list(map(int, input().split(' ')))
	print(hilberts_hotel(n, a))


t = int(input())
for u in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * n
	deff = 0
	for i in range(n):
		b[i] = (b[i] + i + a[i % n]) % n
	b = list(sorted(b))
	for i in range(1, n):
		if b[i] == b[i - 1]:
			deff = 1
	if deff == 1:
		print('NO')
	else:
		print('YES')


import math as m
t = int(input())
for i in range(t):
	n = int(input())
	A = [int(x) for x in input().split()]
	for j in range(n):
		A[j] = (A[j] + j % n) % n
	print('YES' if sorted(A) == [x for x in range(n)] else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	entradas = [0] * n
	for i in range(len(a)):
		entradas[(i + a[i]) % n] += 1
	poss = True
	for x in entradas:
		if x != 1:
			poss = False
	if poss:
		print('YES')
	else:
		print('NO')


n_test = int(input())

def shuffle(N, li):
	st = set()
	for (i, n) in enumerate(li):
		st.add((i + n % N) % N)
	if len(st) == N:
		return 'YES'
	else:
		return 'NO'
for _ in range(n_test):
	N = int(input())
	li = list(map(int, input().split()))
	print(shuffle(N, li))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	d = {}
	for i in range(n):
		d[i] = 1
	for i in range(n):
		t = (i + arr[i]) % n
		d[i] -= 1
		if t not in d.keys():
			d[t] = 2
		d[t] += 1
	flag = 1
	for i in d.keys():
		if d[i] != 1:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
an = []
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sa = set(a)
	ans = 'YES'
	s = set()
	for i in range(n):
		v = (i + a[i]) % n
		if v in s:
			ans = 'NO'
			break
		else:
			s.add(v)
	an.append(ans)
for i in an:
	print(i)


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	rooms = set()
	for j in range(n):
		k = (arr[j] + j) % n
		if k in rooms:
			print('NO')
			break
		rooms.add(k)
	else:
		print('YES')


test = int(input())
for tes in range(test):
	n = int(input())
	L = list(map(int, input().split()))
	st = set()
	i = 0
	for x in L:
		res = (i + x) % n
		if res < 0:
			res += n
		i += 1
		st.add(res)
	if len(st) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = [(i + x) % n for (i, x) in enumerate(a)]
	if set(b) == set(range(n)):
		print('YES')
	else:
		print('NO')


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	dic = defaultdict(int)
	ls = list(map(int, input().strip().split()))
	f = 1
	for (i, val) in enumerate(ls):
		x = (i + val % n) % n
		if x not in dic:
			dic[x] = 1
		else:
			f = 0
			break
	if f == 0:
		print('NO')
	else:
		print('YES')


q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for j in range(n):
		s.add((j + a[j]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = set()
	c = 0
	for i in range(n):
		r = (i + a[i % n]) % n
		if r in s:
			c = 1
			break
		else:
			s.add(r)
	if c == 0:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	c = [0] * (n + 1)
	f = 0
	for j in range(n):
		c[(j + b[j]) % n] += 1
	for j in range(n):
		if c[j] == 0:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
t = int(input())

def judge(b):
	for x in b:
		if x == 0 or x > 1:
			return False
	return True
for _ in range(t):
	n = int(input())
	a = list(map(int, stdin.readline().split()))
	b = [0] * n
	for i in range(len(a)):
		temp = ((i + a[i]) % n + n) % n
		b[temp] += 1
	ans = judge(b)
	if ans:
		print('YES')
	else:
		print('NO')


import sys
import math
import collections
import heapq
import queue
import itertools
import functools
import operator
import time
readline = sys.stdin.readline
IPS = lambda : readline().rstrip()
IP = lambda : int(readline().rstrip())
MP = lambda : map(int, readline().split())
LS = lambda : list(map(int, readline().split()))

def solve():
	for _ in range(IP()):
		di = dict()
		n = IP()
		arr = LS()
		for (i, elem) in enumerate(arr):
			di[elem + i] = 1
		ans = []
		for key in di.keys():
			ans.append((key % n + n) % n)
		ans = sorted(ans)
		fg = len(ans) == n
		if fg:
			for i in range(1, n):
				if ans[i - 1] + 1 != ans[i]:
					fg = 0
					break
		print('Yes') if fg else print('No')
solve()


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().strip().split(' ')))
	dic = defaultdict(int)
	pos = True
	for (i, a) in enumerate(arr):
		dic[(i + a) % n] += 1
		if dic[(i + a) % n] > 1:
			pos = False
			break
	if pos:
		print('YES')
	else:
		print('NO')


numCases = int(input())
for a in range(numCases):
	length = int(input())
	shift = [int(i) for i in input().split(' ')]
	new = [0] * length
	valid = True
	for i in range(len(shift)):
		new[(i + shift[i]) % length] += 1
		if new[(i + shift[i]) % length] >= 2:
			valid = False
			break
	if valid == True:
		print('YES')
	else:
		print('NO')


y = int(input())
ans = []
for i in range(y):
	n = int(input())
	al = input().split()
	m = list(map(int, al))
	s = []
	for j in range(n):
		s.append(j)
		m[j] = (j + m[j] % n + n) % n
	if set(s) == set(m):
		ans.append('YES')
	else:
		ans.append('NO')
for i in ans:
	print(i)


def list_int():
	return list(map(int, input().split()))

def int_in():
	return int(input())

def map_in():
	return map(int, input().split())

def list_in():
	return input().split()
t = int_in()
for _ in range(t):
	n = int_in()
	a = list_int()
	s = set()
	for i in range(n):
		s.add((i + a[i]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
res = []
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	dict = {}
	temp = 'YES'
	for i in range(len(arr)):
		t = (i + arr[i % n]) % n
		if t in dict:
			temp = 'NO'
			break
		else:
			dict[t] = 1
	res.append(temp)
for r in res:
	print(r)


t = int(input())
while t:
	k = 0
	x = int(input())
	lst = list(map(int, input().split()))
	my_lst = [0] * x
	for (i, v) in enumerate(lst):
		a = v % x
		my_lst[(i + a) % x] += 1
	for i in my_lst:
		if i > 1:
			k = 1
			break
	if k == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


import sys
input = sys.stdin.readline
for T in range(int(input())):
	N = int(input())
	k = list(map(int, input().split()))
	k = [x % N for x in k]
	v = [0] * N
	for i in range(N):
		v[(i + k[i]) % N] += 1
	print('NO' if len([x for x in v if x > 1]) else 'YES')


def main():
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = a[i] % n
	l = [0] * (2 * n)
	for k in range(n):
		l[k + a[k]] += 1
		if l[k] == 2:
			print('NO')
			return
	for j in range(n):
		if l[j] + l[n + j] != 1:
			print('NO')
			return
	print('YES')
for _ in range(int(input())):
	main()


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	no = False
	for i in range(n):
		num = i + a[i]
		for j in range(i + 1, n):
			if (num - (j + a[j])) % n == 0:
				no = True
				break
		if no:
			break
	if no:
		print('NO')
	else:
		print('YES')


tc = int(input())
for _ in range(tc):
	n = int(input())
	a = list(map(int, input().split()))
	deg = [0] * n
	for i in range(len(a)):
		j = (a[i] + i) % n
		if j >= 0 and j < n:
			deg[j] += 1
	for x in deg:
		if x != 1:
			ans = 'NO'
			break
	else:
		ans = 'YES'
	print(ans)


def cal(arr):
	d = set()
	l = len(arr)
	for i in range(len(arr)):
		n = (arr[i] + i) % l
		if n in d:
			return 'NO'
		d.add(n)
	return 'YES'

def web():
	T = int(input())
	for t in range(1, T + 1):
		_ = input()
		arr = [int(s) for s in input().split(' ')]
		ans = cal(arr)
		print(str(ans))

def file():
	x = open('p3_in.txt')
	T = int(x.readline())
	for t in range(1, T + 1):
		_ = x.readline()
		arr = [int(s) for s in x.readline().split(' ')]
		ans = cal(arr)
		print(str(ans))
web()


t = int(input())
for _ in range(0, t):
	n = int(input())
	aa = [int(i) for i in input().split()]
	ss = set([])
	for i in range(0, n):
		ss.add((i + aa[i]) % n)
	if len(ss) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for tt in range(t):
	n = int(input())
	lis = input().split()
	for i in range(n):
		lis[i] = int(lis[i])
	flag = True
	for i in range(n):
		for j in range(i + 1, n):
			tmp = j + lis[j] - i - lis[i]
			if tmp % n == 0:
				flag = False
				break
		if flag == False:
			break
	if flag:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	v = list(map(int, input().split(' ')))
	for i in range(n):
		v[i] = (v[i] % n + n) % n
	f = 1
	m = {}
	for i in range(2 * n + 1):
		t = i + v[(i % n + n) % n]
		if t in m:
			f = 0
			break
		m[t] = 0
	if f == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a) = (int(input()), [int(x) for x in input().split()])
	b = []
	for i in range(len(a)):
		b.append(((i + a[i]) % n + n) % n)
	if len(set(b)) is n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	d = int(input())
	b = [(h + g) % d for (g, h) in enumerate(map(int, input().split()))]
	print('YNEOS'[len(set(b)) != d::2])


def ok(N, a_array):
	for i in range(len(a_array)):
		a_array[i] = (a_array[i] + i) % N
	s = set(a_array)
	return N == len(set(s))
T = int(input())
for t in range(T):
	N = int(input())
	a_array = input().split(' ')
	a_array = list((int(x) for x in a_array))
	if ok(N, a_array):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	bool_l = [0] * n
	flag = 0
	for i in range(n):
		if (i + a[i]) % n >= 0 and (i + a[i]) % n <= n - 1:
			if bool_l[(i + a[i]) % n] == 1:
				print('NO')
				flag = 1
				break
			bool_l[(i + a[i]) % n] = 1
		else:
			flag = 1
			break
	if not flag:
		print('YES')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		s = set()
		poss = True
		for i in range(n):
			new_room = (i + a[i] % n) % n
			if new_room in s:
				print('NO')
				poss = False
				break
			s.add(new_room)
		if poss:
			print('YES')
main()


def mp():
	return map(int, input().split())
t = int(input())
for tt in range(t):
	n = int(input())
	a = list(mp())
	u = set()
	for i in range(n):
		u.add((a[i] + i) % n)
	if len(u) == n:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	for j in range(n):
		a[j] = (j + a[j] % n) % n
	a.sort()
	am = 1
	for i in range(len(a) - 1):
		if a[i] < a[i + 1]:
			am += 1
	if am == len(a):
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	l = list(map(int, input().split()))
	nd = []
	for i in range(0, n):
		cur = i
		cur += l[i]
		cur %= n
		nd.append(cur)
	nd = set(nd)
	if len(nd) == n:
		print('YES')
	else:
		print('NO')
	return
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(len(arr)):
		if arr[i] < 0:
			arr[i] = abs(arr[i]) % n * -1
		else:
			arr[i] = arr[i] % n
	t = [0] * n
	temp = [1] * (3 * n)
	temp = t + temp + t
	for i in range(n, 4 * n):
		temp[i] -= 1
		temp[i + arr[i % n]] += 1
	if 2 in temp:
		print('NO')
		continue
	if 0 in temp[2 * n:3 * n]:
		print('NO')
		continue
	print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	flag = 0
	for i in range(n):
		t = (i + l[i] % n) % n
		if t in d:
			flag = 1
			break
		else:
			d[t] = 1
	if flag == 0:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline

def print(val):
	sys.stdout.write(str(val) + '\n')

def yo():
	for _ in range(int(input().strip())):
		n = int(input().strip())
		array = list(map(int, input().split()))
		for i in range(n):
			array[i] = (array[i] + i) % n
		rooms = set()
		match = False
		for i in array:
			if i in rooms:
				print('NO')
				match = True
				break
			else:
				rooms.add(i)
		if not match:
			print('YES')
yo()


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().strip().split(' ')))
	s = set()
	for i in range(n):
		s.add((i + a[i] % n) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	n = ri()
	A = rl()
	seen = set()
	for i in range(n):
		room = (i + A[i]) % n
		if room in seen:
			print('NO')
			return
		else:
			seen.add(room)
	print('YES')
t = ri()
for i in range(t):
	solve()


from sys import stdin, stdout
from collections import Counter
all_tenants = map(lambda x: [int(i) for i in x.split()], stdin.readlines()[2::2])
for tenants in all_tenants:
	n = len(tenants)
	new_rooms = [0] * n
	for i in range(n):
		pos = (i + tenants[i]) % n
		new_rooms[pos] += 1
		if new_rooms[pos] > 1:
			stdout.write('NO\n')
			break
	else:
		stdout.write('YES\n')


I = lambda : list(map(int, input().split(' ')))
for _ in range(int(input())):
	n = int(input())
	lst = I()
	mem = [None for i in range(n)]
	flag = 0
	for i in range(n):
		ind = (i + lst[i] % n) % n
		if mem[ind]:
			flag = 1
			break
		else:
			mem[ind] = 1
	if flag:
		print('NO')
	else:
		print('YES')
lst = [3, 2, 1]
n = 3


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	n = inp()
	ara = inara()
	ans = []
	for i in range(n):
		x = i + ara[i]
		x %= n
		x += n
		x %= n
		ans.append(x)
	ans.sort()
	flag = True
	for i in range(n):
		flag &= i == ans[i]
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	string = input()
	list1 = string.split()
	dict1 = dict()
	count = 0
	flag = 1
	n = len(list1)
	for k in list1:
		value = (count + int(list1[count % n])) % n
		dict1[value] = dict1.get(value, 0) + 1
		count += 1
	for keys in dict1:
		if dict1[keys] > 1:
			flag = 0
	if flag == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t += -1
	n = int(input())
	l = list(map(int, input().split()))
	check = [0] * n
	for i in range(n):
		check[(i + l[i]) % n] = 1
	if 0 in check:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	arr = [0 for i in range(N)]
	for i in range(N):
		arr[i] = (i + A[i]) % N
	flag = 0
	arr.sort()
	for i in range(1, N):
		if arr[i] == arr[i - 1]:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


def run():
	N = int(input())
	A = list(map(int, input().split()))
	occupancy = set()
	for i in range(N):
		occupancy.add((i + A[i]) % N)
	if len(occupancy) == N:
		print('YES')
	else:
		print('NO')
T = int(input())
for i in range(T):
	run()


tests = int(input())
for test in range(tests):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = [0] * n
	res = 'YES'
	for (i, t) in enumerate(a):
		cnt[(t + i) % n] += 1
		if cnt[(t + i) % n] > 1:
			res = 'NO'
			break
	print(res)


for _ in range(int(input())):
	n = int(input())
	rooms = list(map(int, input().split()))
	new_room_unique = set()
	for k in range(n):
		pre_check = len(new_room_unique)
		new_room_unique.add((k + rooms[k]) % n)
		if len(new_room_unique) == pre_check:
			print('NO')
			break
	else:
		print('YES')


inp = input()
num_cases = int(inp)
for _ in range(num_cases):
	n = int(input())
	a = list(map(int, input().split()))
	shift = lambda k: a[k % n]
	sol = 'YES'
	dupes = []
	for (i, idx) in enumerate(a):
		x = (shift(i) + i) % n
		if x in dupes:
			sol = 'NO'
			break
		dupes.append(x)
	print(sol)


def solve(arr, n):
	d = set()
	for i in range(len(arr)):
		d.add((i + arr[i % n]) % n)
	return 'YES' if len(d) == n else 'NO'
T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr, n))


import sys, re, math
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from heapq import heappush, heappop, heapify, nlargest, nsmallest

def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def sortListWithIndex(listOfTuples, idx):
	return sorted(listOfTuples, key=lambda x: x[idx])

def sortDictWithVal(passedDic):
	temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))[::-1]
	toret = {}
	for tup in temp:
		toret[tup[0]] = tup[1]
	return toret

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
t = INT()
while t != 0:
	n = INT()
	a = LIST()
	dd = defaultdict(int)
	set1 = set()
	flag = 0
	for i in range(n):
		dd[(i + a[i]) % n] += 1
	for key in dd:
		if dd[key] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


import sys
readline = sys.stdin.readline
T = int(readline())
Ans = ['NO'] * T
for qu in range(T):
	N = int(readline())
	A = list(map(int, readline().split()))
	S = set()
	for i in range(N):
		S.add((i + A[i]) % N)
	if len(S) == N:
		Ans[qu] = 'YES'
print('\n'.join(map(str, Ans)))


from math import gcd, ceil
from collections import defaultdict as dd

def lcm(a, b):
	return a * b // gcd(a, b)

def inin():
	return int(input())

def inar():
	return list(map(int, input().split()))

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su
for _ in range(int(input())):
	n = inin()
	arr = inar()
	freq = [0 for i in range(n)]
	for k in range(n):
		move = (k + arr[k]) % n
		freq[move] += 1
	ans = True
	for i in freq:
		if i != 1:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


import sys
lines = sys.stdin.readlines()
T = int(lines[0].strip())
for t in range(T):
	n = int(lines[2 * t + 1].strip())
	nums = list(map(int, lines[2 * t + 2].strip().split(' ')))
	seen = set()
	exact = True
	for i in range(n):
		num = nums[i]
		if (i + num) % n not in seen:
			seen.add((i + num) % n)
		else:
			exact = False
			break
	if exact:
		print('YES')
	else:
		print('NO')


def solve(n, a):
	s = set()
	for (i, v) in enumerate(a, start=1):
		c = (i + v) % n
		if c in s:
			return False
		s.add(c)
	return True
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	r = solve(n, a)
	print('YES' if r else 'NO')


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))
for _ in range(I()):
	n = I()
	a = L()
	for i in range(n):
		a[i] = (a[i] % n + i) % n
	x = len(set(a))
	if x == n:
		print('YES')
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	vis = set()
	for i in range(n):
		vis.add((i + a[i]) % n)
	if len(vis) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	b = []
	for j in range(n):
		b.append(0)
	a = list(map(int, input().split()))
	for j in range(n):
		b[(a[j] + j) % n] += 1
	ansflag = 0
	for j in range(n):
		if b[j] == 0:
			ansflag = 1
			break
	if ansflag == 0:
		print('YES')
	else:
		print('NO')


def solve(n, arr):
	(seen, _min, _max) = (set(), float('inf'), float('-inf'))
	for i in range(n):
		nxt = (i + arr[i % n]) % n
		if nxt in seen:
			return False
		seen.add(nxt)
		_min = min(_min, nxt)
		_max = max(_max, nxt)
	if _max - _min >= n:
		return False
	return True
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	if solve(n, arr):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	visited = set()
	for i in range(n):
		if (arr[i] + i) % n in visited:
			print('NO')
			break
		else:
			visited.add((arr[i] + i) % n)
	else:
		print('YES')


for zz in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	se = set()
	ha = True
	for i in range(n):
		val = (a[i] + i) % n
		if val in se:
			ha = False
			break
		se.add(val)
	if ha:
		print('YES')
	else:
		print('NO')


T = int(input().strip())
for t in range(T):
	n = int(input().strip())
	a = list(map(int, input().split()))[:n]
	b = [(j + ind) % n for (ind, j) in enumerate(a)]
	if len(set(b)) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import collections
import heapq

def read_line():
	return stdin.readline().strip()

def read_int():
	return int(read_line())

def read_arr():
	return read_line().split(' ')

def read_int_arr():
	return [int(x) for x in read_arr()]

class UnionFind:

	def __init__(self):
		self.sets = {}

	def make_set(self, s):
		if s not in self.sets:
			self.sets[s] = s

	def find(self, s):
		if self.sets[s] != s:
			self.sets[s] = self.find(self.sets[s])
		return self.sets[s]

	def union(self, s1, s2):
		(a, b) = (self.find(s1), self.find(s2))
		if a == b:
			return
		self.sets[a] = b

	def gets_sets(self):
		res = collections.defaultdict(list)
		for s in self.sets:
			res[self.find(s)].append(s)
		return res

class SegmentTree:

	def __init__(self, nums, func):
		self.n = len(nums)
		self.func = func
		self.build(nums)

	def build(self, nums):
		self.segtree = [0 for _ in range(self.n)] + nums
		for i in reversed(range(1, self.n)):
			self.segtree[i] = self.func(self.segtree[i * 2], self.segtree[i * 2 + 1])

	def update(self, i, val):
		p = i + self.n
		self.segtree[p] = val
		while p > 1:
			self.segtree[p // 2] = self.func(self.segtree[p], self.segtree[p ^ 1])
			p //= 2

	def queryRange(self, i, j):
		res = 0
		(i, j) = (i + self.n, j + self.n)
		while i <= j:
			if i % 2 == 1:
				res = self.func(res, self.segtree[i])
				i += 1
			if j % 2 == 0:
				res = self.func(res, self.segtree[j])
				j -= 1
			(i, j) = (i // 2, j // 2)
		return res

def main():
	T = read_int()
	for _ in range(T):
		n = read_int()
		a = read_int_arr()
		tmp = [0] * n
		for (k, ai) in enumerate(a):
			new_room = (k + ai) % n
			tmp[new_room] += 1
			if tmp[new_room] > 1:
				print('NO')
				break
		else:
			print('YES')
main()


def solve():
	N = int(input())
	A = list(map(int, input().split()))
	S = set()
	for i in range(N):
		S.add((i + A[i]) % N)
	if len(S) == N:
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	solve()


t = int(input())
for ii in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = set()
	for i in range(n):
		s.add((i + l[i]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	occupied = set()
	ans = True
	for i in range(n):
		if (i + arr[i]) % n in occupied:
			ans = False
		occupied.add((i + arr[i]) % n)
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	it = list(map(int, input().split()))
	aa = set()
	j = 1
	for i in it:
		aa.add((j - 1 + i) % n)
		j += 1
	if len(aa) == n:
		print('YES')
	else:
		print('NO')


t = int(input())
for svghj in range(t):
	n = int(input())
	mas = list(map(int, input().split()))
	for i in range(len(mas)):
		mas[i] = (mas[i] + i) % n
	if len(set(mas)) < n:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	v = [0] * n
	for (i, k) in enumerate(a):
		v[(i + k) % n] += 1
	print('NO' if max(v) > 1 else 'YES')


from collections import *
from bisect import *
from math import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	check = []
	for i in range(n):
		shift = i + a[i % n]
		check.append(shift)
	new = []
	for i in check:
		if i % n == 0:
			new.append(0)
			continue
		if i > 0:
			new.append(i % n)
			continue
		f = ceil(abs(i) / n)
		new.append(f * n + i)
	flag = 0
	new.sort()
	ref = new[0]
	for i in range(1, len(new)):
		if new[i] - ref == 1:
			ref = new[i]
			continue
		flag = 1
		break
	if flag == 1:
		print('NO')
	else:
		print('YES')


def solve():
	n = int(input())
	l = list(map(int, input().split()))
	st = set()
	for i in range(len(l)):
		st.add(((l[i] + i) % n + n) % n)
	print(('NO', 'YES')[len(st) == n])
for _ in range(int(input())):
	solve()


for x in range(int(input())):
	n = int(input())
	m = list(map(int, input().split()))
	dic = {}
	for i in range(n):
		dic[(i + m[i]) % n] = dic.get((i + m[i]) % n, 0) + 1
	r = 'YES'
	for i in dic:
		if dic[i] > 1:
			r = 'NO'
			break
	print(r)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	seti = set()
	for i in range(n):
		seti.add((l[i] + i) % n)
	if len(seti) == n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
while t:
	n = int(input())
	a = input().split()
	a = [int(x) for x in a]
	a = [a[i] + i for i in range(n)]
	a = [(x + n) % n for x in a]
	d = [0 for i in range(n)]
	for x in a:
		d[x] += 1
	flag = True
	for i in range(n):
		if d[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')
	t -= 1


from sys import stdin, stdout
input = stdin.buffer.readline
t = int(input())
while t > 0:
	n = int(input())
	a = [int(x) for x in input().split()]
	c = []
	for i in range(n):
		c.append(0)
	for i in range(n):
		val = i + a[i]
		c[val % n] += 1
	flag = 1
	for i in range(n):
		if c[i] != 1:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = {}
	d = defaultdict(lambda : 0, d)
	k = 0
	flag = 0
	for i in a:
		if d[(k + i % n) % n] == 0:
			d[(k + i % n) % n] = 1
		else:
			flag = 1
			break
		k += 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


def solution(A, n):
	B = [0 for _ in range(n)]
	for i in range(n):
		j = (i + A[i] % n) % n
		B[j] += 1
		if B[j] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split(' ')))
	print(solution(A, n))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * len(a)
	for i in range(len(a)):
		b[i] = a[i] + i
	c = True
	for i in range(len(b)):
		for j in range(len(a)):
			if i != j and i != b[i] - a[j]:
				if a[j] == a[(b[i] - a[j]) % n]:
					c = False
					break
		if c == False:
			break
	if c == False:
		print('No')
	else:
		print('Yes')


import sys

class CHilbertsHotel:

	def solve(self, tc=0):
		for _ in range(int(input())):
			n = int(input())
			a = [int(_) for _ in input().split()]
			s = set()
			for i in range(n):
				s.add(a[i] + i)
			xs = set()
			for c in s:
				if c >= 0:
					xs.add(c % n)
				else:
					xs.add(n - -c % n)
			mn = min(xs)
			l = sorted([item - mn for item in xs])
			if l == [i for i in range(n)]:
				print('YES')
			else:
				print('NO')
solver = CHilbertsHotel()
input = sys.stdin.readline
solver.solve()


tc = int(input())
while tc > 0:
	n = int(input())
	print('Yes' if len(set([((i + v) % n + n) % n for (i, v) in enumerate(map(int, input().split()))])) == n else 'No')
	tc -= 1


import sys
ints = (int(x) for x in sys.stdin.read().split())
sys.setrecursionlimit(3000)

def main():
	ntc = next(ints)
	for tc in range(ntc):
		n = next(ints)
		a = [next(ints) for i in range(n)]
		s = set()
		for k in range(n):
			v = (k + a[k % n]) % n
			if v in s:
				break
			else:
				s.add(v)
		print('YES' if len(s) == n else 'NO')
	return
main()


from sys import stdout, stdin
from math import sqrt
import io
import os
from collections import deque
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	v = {}
	ans = 'YES'
	for i in range(n):
		b = (i + a[i] % n) % n
		if v.get(b) == None:
			v[b] = 1
		else:
			ans = 'NO'
			break
	print(ans)


def solve():
	n = int(input())
	arr = list(map(int, input().split(' ')))
	res = []
	for i in range(n):
		res.append((i + arr[i]) % n)
	if len(set(res)) != len(res):
		print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	solve()


n = int(input())
for i in range(n * 2):
	if i % 2 == 0:
		l = int(input())
	else:
		nums = list(map(int, input().split()))
		for j in range(l):
			nums[j] += j
			nums[j] = nums[j] % l
		nums.sort()
		if len(set(nums)) == l and sum(nums) == l * (l - 1) / 2:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr1 = [0 for j in range(n)]
	for j in range(len(arr)):
		var = arr[j] % n + j
		if var >= n:
			var = var - n
		arr1[var] += 1
	for j in arr1:
		if j != 1:
			print('NO')
			break
	else:
		print('YES')


def solve(a, n):
	return len(set(map(lambda x: sum(x) % n, enumerate(a)))) == n
for i in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	print('YES' if solve(a, n) else 'NO')


from sys import *
input = stdin.readline
from bisect import *
import math
from collections import *
import operator
from heapq import *
from itertools import *
inf = 10 ** 18
mod = 10 ** 9 + 7
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] += i + 1
		a[i] %= n
	cnt = Counter(a)
	ans = True
	for i in cnt:
		if cnt[i] > 1:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] += i
		a[i] %= n
	a.sort()
	isDistinct = True
	for i in range(n - 1):
		if a[i] == a[i + 1]:
			isDistinct = False
			break
	if isDistinct:
		print('YES')
	else:
		print('NO')


import sys
from sys import stdin
from collections import defaultdict
import bisect

def eprint(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def inputs(f=int):
	return list(map(f, stdin.readline().strip().split()))

def solve():
	N = int(input())
	arr = inputs()
	assert N == len(arr)
	new_arr = []
	for (i, ele) in enumerate(arr):
		new_pos = (i + ele) % N
		new_arr.append(new_pos)
	if len(set(new_arr)) == N:
		return 'YES'
	else:
		return 'NO'
T = int(input())
for i in range(T):
	ans = solve()
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	s = set()
	a = list(map(int, input().rstrip().split()))
	k = 0
	flag = 0
	for i in range(n):
		if (a[i] + i) % n in s:
			flag = 1
			break
		else:
			s.add((a[i] + i) % n)
	if flag:
		print('NO')
	else:
		print('YES')


t = int(input())
i = 0
while i < t:
	n = int(input())
	array = list(map(int, input().split()))
	visited = [True for i in range(n + 1)]
	flag = 0
	for j in range(n):
		a = j + array[j]
		b = a % n
		if visited[b] == True:
			visited[b] = False
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')
	i += 1


n = int(input())
from math import *
for x in range(n):
	t = int(input())
	l = list(map(int, input().split()))
	p = []
	for xy in range(t):
		p.append((xy + l[xy]) % t)
	p = sorted(p)
	tx = True
	for yz in range(1, t):
		if p[yz] - p[yz - 1] != 1:
			print('No')
			tx = False
			break
	if tx:
		print('Yes')


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	P = []
	for i in range(n):
		P.append(i + A[i] % n)
	D = set(P)
	f = 0
	for i in D:
		if i + n in P:
			f = 1
			break
	if f == 1:
		print('NO')
		continue
	if len(D) < n:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
(t,) = map(int, input().split())
for _ in range(t):
	(N,) = map(int, input().split())
	X = list(map(int, input().split()))
	Y = set()
	for i in range(N):
		Y.add((X[i] + i) % N)
	if len(Y) == N:
		print('YES')
	else:
		print('NO')


import sys

def main():
	t = int(input())
	for _ in range(t):
		n = int(sys.stdin.readline().strip())
		nums = list(map(int, sys.stdin.readline().split()))
		numSet = set()
		flag = True
		for i in range(n):
			if (i + nums[i] % n) % n not in numSet:
				numSet.add((i + nums[i] % n) % n)
			else:
				flag = False
				break
		if max(numSet) - min(numSet) == n - 1 and len(numSet) == n:
			pass
		else:
			flag = False
		if flag:
			print('YES')
		else:
			print('NO')
	return
main()


t = int(input())
for a in range(t):
	modulus = set()
	n = int(input())
	nums = list(map(int, input().split()))
	works = True
	for b in range(n):
		newMod = (b + nums[b]) % n
		if newMod in modulus:
			works = False
		else:
			modulus.add(newMod)
	if works:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = []
	l = []
	for i in range(n):
		x = a[i] % n
		b.append(x)
		l.append([a[i], 0])
	l = []
	for i in range(n):
		l.append((i + b[i]) % n)
	s = set(l)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key, lru_cache
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
M = mod = 10 ** 9 + 7

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip().split()]

def st():
	return str(input().rstrip())[2:-1]

def val():
	return int(input().rstrip())

def li2():
	return [str(i)[2:-1] for i in input().rstrip().split()]

def li3():
	return [int(i) for i in input().rstrip()]
for _ in range(val()):
	n = val()
	l = li()
	arr = defaultdict(int)
	for i in range(1, n + 1):
		arr[(i + l[(i + 1000000000 * n) % n]) % n] += 1
	print('NO' if max(arr.values()) > 1 else 'YES')


def go(arr, n):
	rooms = [False for i in range(n)]
	for (i, a) in enumerate(arr):
		idx = (i + a) % n
		if rooms[idx]:
			return 'NO'
		else:
			rooms[idx] = True
	return 'YES'
t = int(input())
for x in range(t):
	n = int(input())
	arr = map(int, input().split(' '))
	print(go(arr, n))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ach = set()
	for (i, v) in enumerate(a):
		ach.add((i + v % n) % n)
	if len(ach) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import math
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))
(t,) = mp()
for _ in range(t):
	(n,) = mp()
	a = mp()
	s = set()
	for i in range(n):
		s.add((i + a[i] % n) % n)
	if len(s) == n:
		cout('yes\n')
	else:
		cout('no\n')


for _ in range(0, int(input())):
	n = int(input())
	l = list(map(int, input().strip().split()))
	h = {}
	flag7 = 0
	x = max(l)
	for i in range(0, len(l)):
		t = (i + l[i % n]) % n
		if t in h:
			print('NO')
			flag7 = 1
			break
		else:
			h.update({t: None})
	if flag7 == 0:
		print('YES')


def find(A):
	N = len(A)
	ans = []
	for i in range(len(A)):
		ans += [(A[i] + i) % N]
	if sorted(ans) == list(range(N)):
		return 'YES'
	else:
		return 'NO'
for _ in range(int(input())):
	input()
	print(find(list(map(int, input().strip().split()))))


inputs = int(input())
i = 0
j = 0
while j < inputs:
	size = int(input())
	a = input().split()
	add = 0
	mask = [False for i in range(size)]
	i = 0
	while i < size:
		number = int(a[i])
		if number < 0:
			number = -number
			if i < number % size:
				if not mask[i + (size - number % size)]:
					mask[i + (size - number % size)] = True
				else:
					break
			elif not mask[i - number % size]:
				mask[i - number % size] = True
			else:
				break
		elif size - (i + 1) < number % size:
			if not mask[i + (number % size - size)]:
				mask[i + (number % size - size)] = True
			else:
				break
		elif not mask[i + number % size]:
			mask[i + number % size] = True
		else:
			break
		i += 1
	if i == size:
		print('YES')
	else:
		print('NO')
	j += 1


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	kek = set()
	for i in range(n):
		kek.add((ar[i] + i) % n)
	if len(kek) == n:
		print('YES')
	else:
		print('NO')


from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

def input():
	return sys.stdin.readline()

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
for _ in range(int(input())):
	n = int(input())
	a = list(mapi())
	mp = defaultdict(int)
	for i in range(n - 1, -1, -1):
		mp[(i + a[i]) % n] += 1
	f = 1
	for v in mp.values():
		if v > 1:
			f = 0
			break
	if f:
		print('YES')
	else:
		print('NO')


t = int(input())
for w in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	s = set()
	for i in range(n):
		s.add((i + l[i]) % n)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


import math

def solver(x):
	n = (-1 + math.sqrt(1 + 24 * x)) / 6
	return math.floor(n)
t = int(input())
for test in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	tarr = [0 for i in range(n)]
	flag = True
	for i in range(n):
		temp = arr[i] % n
		tarr[i] = (temp + i) % n
	tarr.sort()
	for i in range(len(tarr)):
		if tarr[i] != i:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	c = [0 for j in range(n)]
	for i in range(n):
		c[i] = (a[i] + i) % n
	c.sort()
	div = True
	for i in range(n - 1):
		if c[i] == c[i + 1]:
			print('NO')
			div = False
			break
	if div:
		print('YES')


import sys
input = sys.stdin.readline
t = int(input())
out = []
for i in range(t):
	n = int(input())
	l = list(map(lambda x: int(x) % n, input().split()))
	taken = [False] * n
	for i in range(n):
		taken[(i + l[i]) % n] = True
	for i in range(n):
		if not taken[i]:
			out.append('NO')
			break
	else:
		out.append('YES')
print('\n'.join(out))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	for i in range(n):
		s.add((i + a[i]) % n)
	s = list(s)
	fl = 1
	if len(s) != n:
		print('NO')
		continue
	for i in range(1, n):
		if s[i] != s[i - 1] + 1:
			fl = 0
	if fl:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		s = set()
		for (idx, i) in enumerate(a):
			s.add((idx + i) % n)
		print('YES' if len(s) == n else 'NO')
	return
main()


import sys

def input(itr=iter(sys.stdin.readlines())):
	return next(itr).rstrip('\n\r')
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	pool = set(range(n))
	try:
		for (i, x) in enumerate(a):
			pool.remove((x + i) % n)
	except KeyError:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	l = I()
	f = 0
	vis = [0] * n
	for i in range(n):
		x = (l[i] + i) % n
		if vis[x]:
			f = 1
			break
		vis[x] = 1
	print('YNEOS'[f::2])


for i in range(int(input())):
	n = int(input())
	array = list(map(int, input().split()))
	data = []
	for j in range(n):
		data.append((j + array[j]) % n)
	if sorted(data) == [i for i in range(n)]:
		print('YES')
	else:
		print('NO')


from collections import defaultdict
from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	dct = defaultdict(lambda : 0)
	for i in range(n):
		dct[(i + 1 + arr[(i + 1) % n]) % n] += 1
	u = True
	for (key, value) in dct.items():
		if value > 1:
			u = False
			break
	print('YES' if u else 'NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(item) for item in input().split()]
	cnt = [0] * n
	ok = True
	for (i, item) in enumerate(a):
		index = (i + item) % n
		if cnt[index] == 1:
			ok = False
			break
		cnt[index] += 1
	if ok:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(el) for el in input().split()]
	d = set()
	bad = False
	for (i, el) in enumerate(a):
		if (i + el) % n in d:
			bad = True
			break
		else:
			d.add((i + a[i]) % n)
	if bad:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	final = [0] * n
	possible = True
	for i in range(n):
		x = (i + arr[i]) % n
		final[x] += 1
		if final[x] != 1:
			possible = False
			break
	if not possible:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = set()
	for i in range(n):
		if (i + l[i % n]) % n not in s:
			s.add((i + l[i % n]) % n)
		else:
			print('NO')
			break
	else:
		print('YES')


def solve():
	n = int(input())
	a = [e % n for e in map(int, input().split())]
	d = {(i + e) % n for (i, e) in enumerate(a)}
	if len(d) == n:
		return 'YES'
	return 'NO'
tests = int(input())
for _ in range(tests):
	print(solve())


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = set()
	z = 0
	for j in range(0, n):
		x = ((l[j] + j) % n + n) % n
		if x in s:
			z = 1
		else:
			s.add(x)
	if z == 0:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	B = [(i + A[i]) % n for i in range(n)]
	if len(set(B)) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	rooms = dict()
	for i in range(n):
		rooms[i] = 1
	was = set()
	for i in range(n):
		new_ind = i + arr[i]
		if new_ind not in rooms:
			rooms[new_ind] = 0
		rooms[new_ind] += 1
		was.add(new_ind % n)
		rooms[i] -= 1
	can = True
	for i in range(n):
		if rooms[i] > 1:
			can = False
			break
		elif rooms[i] == 0 and i not in was:
			can = False
			break
		if rooms[i + arr[i]] != 1:
			can = False
			break
	if can:
		print('YES\n')
	else:
		print('NO\n')


import sys
import math
from math import factorial as f
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = a[i] % n
	d = dd(int)
	flg = 1
	for i in range(n):
		p = (i + a[i % n]) % n
		d[p] += 1
		if d[p] > 1:
			flg = 0
			print('NO')
			break
	if flg:
		print('YES')


for t in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = False
	dic = {}
	for (k, a) in enumerate(arr, 1):
		x = (k + a) % n
		if dic.get(x, False) == False:
			dic[x] = True
		else:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')


import sys
import math as mt
input = sys.stdin.buffer.readline
t = int(input())
for __ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ch = n
	d = {}
	for i in range(n):
		r = (ch + l[i]) % n
		d[r] = d.get(r, 0) + 1
		ch += 1
	if len(d) != n:
		print('NO')
	else:
		print('YES')


from math import sqrt
t = int(input())
for _ in range(t):
	n = int(input())
	As = map(int, input().split())
	Bs = [(ai + i) % n for (i, ai) in enumerate(As)]
	if len(set(Bs)) == n:
		print('YES')
	else:
		print('NO')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	b = 0
	for i in range(n):
		j = i + a[i]
		for h in range(n):
			if h == i:
				continue
			if (j - a[h]) % n == h:
				b = 1
				break
		if b == 1:
			print('NO')
			break
	if b == 0:
		print('YES')


mod = 1000000007
eps = 10 ** (-9)

def main():
	import sys
	input = sys.stdin.buffer.readline
	for _ in range(int(input())):
		N = int(input())
		A = list(map(int, input().split()))
		AA = [(a + i) % N for (i, a) in enumerate(A)]
		if len(set(AA)) == N:
			print('YES')
		else:
			print('NO')
main()


import sys
input = sys.stdin.readline
for nt in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	new = []
	for i in range(n):
		new.append(i + l[i % n])
	d = {}
	ans = 'YES'
	for i in new:
		if i % n in d:
			ans = 'NO'
			break
		d[i % n] = 1
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	q = {}
	for j in range(n):
		nxt = (a[j] + j) % n
		if nxt in q:
			q[nxt] += 1
		else:
			q[nxt] = 1
	d = 0
	for j in q:
		if q[j] > 1:
			d = 1
	if d:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = [int(x) for x in stdin.readline().split()]
	for x in range(n):
		a[x] = (a[x] % n + x) % n
	a = sorted(a)
	y = a[0]
	mybool = True
	for x in range(1, n):
		if a[x] == y:
			mybool = False
		y = a[x]
	if mybool:
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	d = dict()
	flag = True
	for i in range(n):
		if (a[i] + i) % n in d:
			flag = False
			break
		else:
			d[(a[i] + i) % n] = True
	if flag:
		print('YES')
	else:
		print('NO')


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	n = inp()
	ara = inara()
	s = set()
	for i in range(n):
		x = i + ara[i]
		x %= n
		x += n
		x %= n
		s.add(x)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


import sys
buff_readline = sys.stdin.buffer.readline
readline = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap
from collections import defaultdict

def slv(N, A):
	m = [0] * N
	for (k, a) in enumerate(A):
		m[(k + a) % N] += 1
	return 'YES' if max(m) == 1 else 'NO'

def main():
	T = read_int()
	for _ in range(T):
		N = read_int()
		A = read_int_n()
		print(slv(N, A))
main()


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = set()
	f = False
	for i in range(len(l)):
		a = (i + l[i]) % n
		if a in s:
			print('NO')
			f = True
			break
		s.add(a)
	if not f:
		print('YES')


input = __import__('sys').stdin.readline
print = __import__('sys').stdout.write
for _ in range(int(input())):
	n = int(input())
	if len({(val % n + idx) % n for (idx, val) in enumerate(map(int, input().split()))}) == n:
		print('YES\n')
	else:
		print('NO\n')


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	n = read_int()
	a = list(read_ints())
	s = set()
	for i in range(n):
		m = (i + a[i]) % n
		if m < 0:
			m += n
		s.add(m)
	print('YES' if len(s) == n else 'NO')


from sys import stdin, stdout
from collections import Counter
readline = stdin.readline
write = stdout.write
t = int(readline())
for i in range(t):
	n = int(readline())
	a = map(lambda i: int(i), readline().split())
	b = Counter([(x + i) % n for (i, x) in enumerate(a)])
	result = 'NO' if any([b[x] > 1 for x in b]) else 'YES'
	write(result + '\n')


for i in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	b = [0] * n
	for i in range(n):
		b[(i + a[i]) % n] = 1
	print('NO' if sum(b) != n else 'YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l1 = [0] * n
	ans = 'YES'
	for j in range(n):
		l1[(j + 1 + l[(j + 1) % n]) % n] += 1
		if l1[(j + 1 + l[(j + 1) % n]) % n] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	elem_1 = set()
	elem_2 = set()
	bool = True
	for j in range(n):
		new = a[j] % n
		if j + new in elem_1 or j + new in elem_2 or j + new + n in elem_1 or (j + new + n in elem_2):
			bool = False
			break
		elem_1.add(j + new)
		elem_2.add(j + new + n)
	if bool:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	h = [0] * (2 * n + 1)
	l = list(map(int, input().split()))
	for i in range(n):
		h[(i + l[i]) % n] = 1
	s = sum(h)
	if s == n:
		print('YES')
	else:
		print('NO')


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max, nsmallest, nlargest

def primeFactors(n):
	pf = []
	while n % 2 == 0:
		pf.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			pf.append(int(i))
			n = n / i
	if n > 2:
		pf.append(int(n))
	return pf

def main():
	mod = 1000000007
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = ri()
	for _ in range(tc):
		n = ri()
		a = ria()
		d = {}
		ans = 'YES'
		for i in range(n):
			posnow = i + a[i]
			if posnow % n in d:
				ans = 'NO'
				break
			else:
				d[posnow % n] = 1
		print(ans)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	seen = {}
	for i in range(n):
		x = (a[i] + i) % n
		if x in seen:
			print('NO')
			break
		seen[x] = 1
	else:
		print('YES')


def solve():
	t = int(input())
	for _ in range(t):
		n = int(input())
		A = list(map(int, input().split()))
		B = []
		for i in range(n):
			B.append(0)
		for i in range(n):
			B[(i + A[i] % n) % n] = 1
		if 0 in B:
			print('NO')
		else:
			print('YES')
solve()


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	kek = set()
	for j in range(n):
		kek.add((j + arr[j % n]) % n)
	if len(kek) != n:
		print('NO')
	else:
		print('YES')


from sys import stdin
for case in range(int(stdin.readline())):
	n = int(stdin.readline())
	ints = [int(x) for x in stdin.readline().split()]
	found = [False for x in range(n)]
	valid = True
	for (ind, num) in enumerate(ints):
		if not found[(ind + num) % n]:
			found[(ind + num) % n] = True
		else:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	initial = [i for i in range(n)]
	final = ['!'] * n
	c = 1
	for i in range(n):
		if final[(initial[i] + lis[i]) % n] == '!':
			final[(initial[i] + lis[i]) % n] = initial[i]
		else:
			c = 0
			print('NO')
			break
	if c:
		print('YES')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		for j in range(n):
			if i != j:
				if (a[i] - a[j]) % n == j - i:
					print('NO')
					return
	print('YES')
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().rstrip().split()))
	tab = [0] * n
	doublon = False
	for (i, a) in enumerate(A):
		moda = (i + 1 + a) % n
		if tab[moda] == 1:
			doublon = True
			break
		tab[moda] = 1
	if doublon:
		print('NO')
	else:
		print('YES')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for test in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	num = {}
	f = 1
	for i in range(n):
		k = ((l[i] + i) % n + n) % n
		if not num.get(k):
			num[k] = 1
		else:
			f = 0
			break
	print('YES' if f else 'NO')


from sys import stdin
input = stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0] * n
	for i in range(n):
		b[i] = (a[i] + i) % n
	if len(list(set(b))) < n:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a_mod = [i % n for i in a]
	sol = [0] * n
	flag = True
	for i in range(n):
		if sol[(i + a_mod[i]) % n] == 1:
			print('NO')
			flag = False
			break
		else:
			sol[(i + a_mod[i]) % n] = 1
	if flag:
		print('YES')


import math

def main():
	for q in range(int(input())):
		N = int(input())
		l = list(map(int, input().split()))
		s = set()
		for i in range(len(l)):
			val = i + l[i]
			s.add(val % N)
		if len(s) == N:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	a = [int(num) for num in input().split()]
	been = set()
	flag = True
	for (index, elem) in enumerate(a):
		res = (index + elem) % n
		if res in been:
			flag = False
			break
		been.add(res)
	ans.append('YES' if flag else 'NO')
print(*ans, sep='\n')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x
for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	li = set()
	for i in range(n):
		li.add((i + a[i]) % n)
	print('YNEOS'[len(li) != n::2])


import math
t = int(input())
for _ in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	q1 = [0] * n
	for i in range(n):
		q1[(i + x[i % n]) % n] += 1
	f = 0
	for i in range(n):
		if q1[i] != 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = [0] * n
	a = list(map(int, input().split()))
	ans = 'YES'
	for i in range(n):
		o = (i + a[i]) % n
		if l[o] == 1:
			ans = 'NO'
			break
		else:
			l[o] = 1
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	check = [0 for x in range(n)]
	flux = 1
	for i in range(n):
		k = (i + l[i] % n + n) % n
		if check[k] == 0:
			check[k] = 1
		else:
			flux = 0
			break
	if flux == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	for i in range(n):
		A[i] = (A[i] + i + 1) % n
	s = set(A)
	if len(s) == n:
		print('YES')
	else:
		print('NO')


import sys, collections
input = sys.stdin.readline
for _ in range(int(input())):
	N = int(input())
	check = True
	A = list(map(int, input().split()))
	D = dict()
	for i in range(N):
		C = (i + A[i]) % N
		if C in D:
			check = False
			break
		else:
			D[C] = 1
	if not check:
		print('NO')
	else:
		print('YES')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	se = set()
	for i in range(n):
		se.add((arr[i] + i) % n)
	if len(se) == n:
		print('YES')
	else:
		print('NO')


import sys

def solve():
	n = int(input())
	s = set()
	arr = list(map(int, sys.stdin.readline().split()))
	for i in range(n):
		position = (i + arr[i % n]) % n
		if position in s:
			print('NO')
			return
		else:
			s.add(position)
	print('YES')

def main():
	t = int(input())
	for i in range(t):
		solve()
main()


def isGoodShuffle(lst):
	modulo = len(lst)
	mset = set()
	for (i, x) in enumerate(lst):
		res = (i + x) % modulo
		mset.add(res)
	return len(mset) == modulo
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	if isGoodShuffle(a):
		print('YES')
	else:
		print('NO')


def solve():
	guests = int(input())
	arr = list(map(int, input().split(' ')))
	if guests == 1:
		print('YES')
		return
	tmp = [(j + index) % guests for (index, j) in enumerate(arr)]
	if len(set(tmp)) == len(arr):
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	solve()


a = int(input())
b = []
c = []
for i in range(a):
	b.append(int(input()))
	x = input().split()
	for j in range(len(x)):
		x[j] = int(x[j])
	c.append(x)
for i in range(a):
	length = b[i]
	for j in range(length):
		c[i][j] += j
		c[i][j] = c[i][j] % length
	s = set(c[i])
	s = list(s)
	if len(s) == length:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [*map(int, input().split())]
	rooms = [0 for _ in range(n)]
	answer = 'YES'
	for (index, room) in enumerate(a):
		rooms[(room + index) % n] += 1
		if rooms[(room + index) % n] > 1:
			answer = 'NO'
			break
	print(answer)


import collections
import operator
for _ in range(int(input())):
	n = int(input())
	ll = [int(i) for i in input().split(' ')]
	size = len(ll)
	noyes = True
	d = collections.defaultdict(int)
	for i in range(size):
		if d[(ll[i] + i + 1) % size] > 0:
			print('NO')
			noyes = False
			break
		d[(ll[i] + i + 1) % size] += 1
	if noyes:
		print('YES')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def solve(n, A):
	s = set()
	for (i, a) in enumerate(A):
		s.add((i + a) % n)
	if len(s) == n:
		return 'YES'
	return 'NO'

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		A = tuple(map(int, input().split()))
		ans = solve(n, A)
		sys.stdout.write(ans + '\n')
main()


import sys
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	rooms = set()
	ok = True
	for k in range(n):
		newRoom = (k + a[k]) % n
		if newRoom in rooms:
			ok = False
			break
		rooms.add(newRoom)
	if ok == False:
		print('NO')
	else:
		print('YES')


t = int(input())
for test in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	rem_dict = {}
	flag = 0
	for i in range(len(a)):
		temp = (a[i] + i) % n
		if temp in rem_dict:
			print('NO')
			flag = 1
			break
		else:
			rem_dict[temp] = 1
	if flag == 0:
		print('YES')


import sys
input = sys.stdin.buffer.readline
t = int(input())
buf = []
for _ in range(t):
	n = int(input())
	aaa = [a % n for a in map(int, input().split())]
	move = [0] * n
	for (i, a) in enumerate(aaa):
		move[(i + a) % n] += 1
	if all(move):
		buf.append('YES')
	else:
		buf.append('NO')
print('\n'.join(buf))


def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	visit = {}
	visit2 = {}
	count = 0
	for i in range(n):
		curr = i + arr[count]
		if curr not in visit:
			visit[curr] = 0
		else:
			return 'NO'
		count += 1
	for i in visit.keys():
		curr = int(i) % n
		if curr not in visit2:
			visit2[curr] = 0
		else:
			return 'NO'
	return 'YES'
numcases = int(input())
for i in range(numcases):
	print(solve())


t = int(input())
while t != 0:
	n = int(input())
	list1 = list(map(int, input().split()))
	dict = {}
	f1 = 0
	for i in range(n):
		p = (i + list1[i]) % n
		try:
			dict[p] += 1
			f1 = 1
		except Exception as e:
			dict[p] = 1
		if f1 == 1:
			break
	if f1 == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = tuple(map(int, input().split()))
	ok = True
	s = set()
	for (i, ai) in enumerate(a):
		t = (i + ai) % n
		if t in s:
			ok = False
			break
		else:
			s.add(t)
	if ok:
		print('YES')
	else:
		print('NO')


import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def read_float_line():
	return [float(v) for v in sys.stdin.readline().split()]
t = read_int()
for i in range(t):
	n = read_int()
	a = read_int_line()
	d = {}
	for i in range(n):
		d[i] = (i + a[i]) % n
	l = list(d.values())
	d = {}
	for i in l:
		if i in d:
			d[i] += 1
		else:
			d[i] = 1
	l = list(d.values())
	l.sort(reverse=True)
	if l[0] > 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	t = int(input())
	ar = [int(k) for k in input().split()]
	ans = []
	for s in range(t):
		ans.append((s + ar[s]) % t)
	ans.sort()
	if ans == [j for j in range(t)]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	rem = [0] * n
	for (idx, val) in enumerate(a):
		new_val = idx + val
		rem[new_val % n] += 1
	if any((i > 1 for i in rem)):
		print('NO')
	else:
		print('YES')