You are given a sequence of $n$ integers $a_1, \, a_2, \, \dots, \, a_n$.

Does there exist a sequence of $n$ integers $b_1, \, b_2, \, \dots, \, b_n$ such that the following property holds?

For each $1 \le i \le n$, there exist two (not necessarily distinct) indices $j$ and $k$ ($1 \le j, \, k \le n$) such that $a_i = b_j - b_k$.


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 20$) — the number of test cases. Then $t$ test cases follow.

The first line of each test case contains one integer $n$ ($1 \le n \le 10$).

The second line of each test case contains the $n$ integers $a_1, \, \dots, \, a_n$ ($-10^5 \le a_i \le 10^5$).


-----Output-----

For each test case, output a line containing YES if a sequence $b_1, \, \dots, \, b_n$ satisfying the required property exists, and NO otherwise.


-----Examples-----

Input
5
5
4 -7 -1 5 10
1
0
3
1 10 100
4
-3 2 10 2
9
25 -171 250 174 152 242 100 -205 -258
Output
YES
YES
NO
YES
YES


-----Note-----

In the first test case, the sequence $b = [-9, \, 2, \, 1, \, 3, \, -2]$ satisfies the property. Indeed, the following holds:

$a_1 = 4 = 2 - (-2) = b_2 - b_5$;

$a_2 = -7 = -9 - (-2) = b_1 - b_5$;

$a_3 = -1 = 1 - 2 = b_3 - b_2$;

$a_4 = 5 = 3 - (-2) = b_4 - b_5$;

$a_5 = 10 = 1 - (-9) = b_3 - b_1$.

In the second test case, it is sufficient to choose $b = [0]$, since $a_1 = 0 = 0 - 0 = b_1 - b_1$.

In the third test case, it is possible to show that no sequence $b$ of length $3$ satisfies the property.

Difficulty: MEDIUM_HARD

Solutions:
from itertools import chain, combinations
T = int(input())
for _ in range(T):
	N = int(input())
	arr = [int(x) for x in input().split()]
	powerSet = chain.from_iterable((combinations(arr, r) for r in range(N + 1)))
	powerSetSums = set([sum(i) for i in powerSet])
	if len(powerSetSums) < 2 ** N:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	x = 2 ** n - 1
	d = []
	an = 'NO'
	for i in range(x + 1):
		c = sum([a[j] for j in range(n) if i & 1 << j])
		if c in d:
			an = 'YES'
			break
		else:
			d.append(c)
	print(an)
num_inp = lambda : int(input())
arr_inp = lambda : list(map(int, input().split()))
sp_inp = lambda : map(int, input().split())
str_inp = lambda : input()


import collections
import math
import itertools
import sys
import time

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

def ints_input():
	return list((int(x) for x in input().split()))

def solve():
	n = int(input())
	a = [abs(x) for x in ints_input()]
	possible_sums = set()
	for x in a:
		new_sums = set()
		for p in list(possible_sums):
			new_sums.add(p - x)
			new_sums.add(p + x)
		possible_sums = possible_sums.union(new_sums)
		possible_sums.add(x)
	if 0 in possible_sums:
		print('YES')
	else:
		print('NO')
if True:
	for _ in range(int(input())):
		solve()
else:
	solve()


import math
import random
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
import threading
from collections import defaultdict
threading.stack_size(10 ** 8)
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
sys.setrecursionlimit(300000)
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')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=2 * 10 ** 9, func=lambda a, b: min(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)

class SegmentTree:

	def __init__(self, data, default=-1, func=lambda a, b: max(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)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

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

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater

class TrieNode:

	def __init__(self):
		self.children = [None] * 26
		self.isEndOfWord = False

class Trie:

	def __init__(self):
		self.root = self.getNode()

	def getNode(self):
		return TrieNode()

	def _charToIndex(self, ch):
		return ord(ch) - ord('a')

	def insert(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				pCrawl.children[index] = self.getNode()
			pCrawl = pCrawl.children[index]
		pCrawl.isEndOfWord = True

	def search(self, key):
		pCrawl = self.root
		length = len(key)
		for level in range(length):
			index = self._charToIndex(key[level])
			if not pCrawl.children[index]:
				return False
			pCrawl = pCrawl.children[index]
		return pCrawl != None and pCrawl.isEndOfWord

class Node:

	def __init__(self, data):
		self.data = data
		self.count = 0
		self.left = None
		self.right = None

class BinaryTrie:

	def __init__(self):
		self.root = Node(0)

	def insert(self, pre_xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = pre_xor & 1 << i
			if val:
				if not self.temp.right:
					self.temp.right = Node(0)
				self.temp = self.temp.right
				self.temp.count += 1
			if not val:
				if not self.temp.left:
					self.temp.left = Node(0)
				self.temp = self.temp.left
				self.temp.count += 1
		self.temp.data = pre_xor

	def query(self, xor):
		self.temp = self.root
		for i in range(31, -1, -1):
			val = xor & 1 << i
			if not val:
				if self.temp.left and self.temp.left.count > 0:
					self.temp = self.temp.left
				elif self.temp.right:
					self.temp = self.temp.right
			elif self.temp.right and self.temp.right.count > 0:
				self.temp = self.temp.right
			elif self.temp.left:
				self.temp = self.temp.left
			self.temp.count -= 1
		return xor ^ self.temp.data
for ik in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))

	def find(l):
		l = set(l)
		if 0 in l:
			print('YES')
			return
		if len(l) < n:
			print('YES')
			return
		l = sorted(l)
		for i in range(n):
			k = l[:i] + l[i + 1:]
			for z in range(pow(2, len(k))):
				k1 = []
				for y in range(len(k)):
					if z & 1 << y > 0:
						k1.append(k[y])
				for j in range(pow(2, len(k1))):
					ans = 0
					for t in range(len(k1)):
						if j & 1 << t > 0:
							ans += k1[t]
						else:
							ans -= k1[t]
					if ans == l[i]:
						print('YES')
						return
		print('NO')
	find(l)


from itertools import product
from sys import stdin, gettrace
if gettrace():

	def inputi():
		return input()
else:

	def input():
		return next(stdin)[:-1]

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

def solve():
	n = int(input())
	aa = [int(a) for a in input().split()]
	if 0 in aa:
		print('YES')
		return
	bbb = [[-a, 0, a] for a in aa]
	ppp = product(*bbb)
	for pp in ppp:
		if sum(pp) == 0 and pp != (0,) * n:
			print('YES')
			return
	print('NO')

def main():
	t = int(input())
	for _ in range(t):
		solve()
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	x = 2 ** n - 1
	d = []
	an = 'NO'
	for i in range(x + 1):
		c = sum([a[j] for j in range(n) if i & 1 << j])
		if c in d:
			an = 'YES'
			break
		else:
			d.append(c)
	print(an)


import sys
import math
input = sys.stdin.readline
imp = 'IMPOSSIBLE'
t = int(input())
for test in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	jo = False
	if 0 in a:
		jo = True
	for i in range(n):
		for j in range(i + 1, n):
			if a[i] == a[j]:
				jo = True
				break
		if jo:
			break
	if not jo:
		ss = []
		for i in range(2 ** n):
			ii = i
			aa = [0 for u in range(n)]
			for j in range(n):
				aa[j] = ii % 2
				ii //= 2
			su = 0
			for k in range(n):
				su = su + a[k] * aa[k]
			ss.append(su)
		ss.sort()
		for k in range(len(ss) - 1):
			if ss[k] == ss[k + 1]:
				jo = True
				break
	if jo:
		print('YES')
	else:
		print('NO')


def r(arr, pos=0, sum_=0):
	if arr[pos] == sum_:
		return True
	if pos == len(arr) - 1:
		return False
	return any((r(arr, pos + 1, sum_ + x) for x in [0, arr[pos], -arr[pos]]))
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print('YES' if r(a) else 'NO')


import sys
from bisect import bisect_left as lb
from collections import deque
from queue import PriorityQueue as pq
from math import *
input_ = lambda : sys.stdin.readline().strip('\r\n')
ii = lambda : int(input_())
il = lambda : list(map(int, input_().split()))
ilf = lambda : list(map(float, input_().split()))
ip = lambda : input_()
fi = lambda : float(input_())
ap = lambda ab, bc, cd: ab[bc].append(cd)
li = lambda : list(input_())
pr = lambda x: print(x)
prinT = lambda x: print(x)
f = lambda : sys.stdout.flush()
inv = lambda x: pow(x, mod - 2, mod)
mod = 10 ** 9 + 7
for _ in range(ii()):
	n = ii()
	a = il()
	t = 1
	fl = 0
	for i in range(n):
		t *= 3
	for i in range(1, t):
		k = i
		s = 0
		for j in range(n):
			s1 = k % 3
			k = k // 3
			if s1 == 2:
				s1 = -1
			s += s1 * a[j]
		if s == 0:
			fl = 1
			break
	if fl:
		print('YES')
	else:
		print('NO')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def gettot(index, pre, arr, ans, pick):
	if ans[0]:
		return
	if index == len(arr):
		if pre == 0 and pick > 0:
			ans[0] = True
		return
	gettot(index + 1, pre + arr[index], arr, ans, pick + 1)
	gettot(index + 1, pre - arr[index], arr, ans, pick + 1)
	gettot(index + 1, pre, arr, ans, pick)

def main(t):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = [False]
	gettot(0, 0, arr, ans, 0)
	if ans[0]:
		print('YES')
	else:
		print('NO')
T = int(input())
t = 1
while t <= T:
	main(t)
	t += 1


import os, sys
from io import BytesIO, IOBase

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, 8192))
			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, 8192))
			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')

class dict(dict):

	def __missing__(self, key):
		return 0
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp = lambda dtype: dtype(input().strip())
inp_d = lambda dtype: [dtype(x) for x in input().split()]
inp_2d = lambda dtype, n: [inp(dtype) for _ in range(n)]
inp_2ds = lambda dtype, n: [inp_d(dtype) for _ in range(n)]
inp_enu = lambda dtype: [(i, x) for (i, x) in enumerate(inp_d(dtype))]
inp_enus = lambda dtype, n: [[i] + [inp_d(dtype)] for i in range(n)]
ceil1 = lambda a, b: (a + b - 1) // b
get_bit = lambda x, i: x >> i & 1
for _ in range(inp(int)):
	(n, a, flag, ans) = (inp(int), inp_d(int), False, ('NO', 'YES'))
	for i in range(1, pow(3, n)):
		(num, su) = (i, 0)
		for bit in range(n):
			(div, mod) = divmod(num, 3)
			if mod == 2:
				su -= a[bit]
			else:
				su += a[bit] * mod
			num = div
		flag |= su == 0
	print(ans[flag])


import sys
from itertools import product

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

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

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

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

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

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

def LS2():
	return list(sys.stdin.readline().rstrip())
t = I()
for _ in range(t):
	n = I()
	A = LI()
	Y = set()
	for X in product([0, 1], repeat=n):
		b = 0
		for i in range(n):
			a = A[i]
			if X[i] == 0:
				continue
			else:
				b += a
		if b in Y:
			print('YES')
			break
		Y.add(b)
	else:
		print('NO')


def find_common(a1, a2):
	list_len = len(a1)
	list_len2 = len(a2)
	a3 = []
	iz = jz = 0
	while iz < list_len and jz < list_len2:
		if a1[iz] < a2[jz]:
			iz += 1
		elif a2[jz] < a1[iz]:
			jz += 1
		else:
			a3.append(a1[iz])
			iz += 1
			jz += 1
	return a3
t = int(input())
for i in range(t):
	y = 0
	n = int(input())
	a = list(map(int, input().split()))
	if 0 in a:
		print('YES')
	elif n <= 5:
		for j in range(1, 3 ** n):
			tz = 0
			for k in range(n):
				if j // 3 ** k % 3 == 1:
					tz += a[k]
				elif j // 3 ** k % 3 == 2:
					tz -= a[k]
			if tz == 0:
				y = 1
				break
		if y == 0:
			print('NO')
		else:
			print('YES')
	else:
		l = []
		for j in range(1, 3 ** 5):
			tz = 0
			for k in range(5):
				if j // 3 ** k % 3 == 1:
					tz += a[k]
				elif j // 3 ** k % 3 == 2:
					tz -= a[k]
			l.append(abs(tz))
		l = list(set(l))
		l.sort()
		a = a[5:]
		ln = []
		for j in range(1, 3 ** len(a)):
			tz = 0
			for k in range(len(a)):
				if j // 3 ** k % 3 == 1:
					tz += a[k]
				elif j // 3 ** k % 3 == 2:
					tz -= a[k]
			ln.append(tz)
		ln = list(set(ln))
		ln.sort()
		if find_common(l, ln):
			print('YES')
		elif 0 in ln:
			print('YES')
		elif 0 in l:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline
for nt in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	curr = [0]
	for i in range(n):
		b = []
		for j in curr:
			b.append(a[i] + j)
		for j in curr:
			b.append(j - a[i])
		curr.extend(b)
	if curr.count(0) > 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	sums = set([a[0], -a[0]])
	for i in range(1, n):
		current_sums = sums.copy()
		sums.add(a[i])
		for s in current_sums:
			sums.add(s + a[i])
			sums.add(s - a[i])
	print('YES' if 0 in sums else 'NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	x = 2 ** n - 1
	d = []
	an = 'NO'
	for i in range(x + 1):
		c = 0
		for j in range(n):
			if i & 1 << j:
				c += a[j]
		if c in d:
			an = 'YES'
			break
		else:
			d.append(c)
	print(an)


from math import *
from decimal import *
from decimal import Decimal as D
from string import ascii_lowercase as lc
from string import ascii_uppercase as uc
from itertools import *
from itertools import permutations as perm
from itertools import product as prod
from sys import *
ip = input
ra = lambda : list(map(int, input().split()))
ri = lambda : int(input())
rd = lambda : map(int, input().split())
MOD = 10 ** 9 + 7
MOD2 = 998244353
maxn = 10 ** 6 + 10
N = 10 ** 5 + 10
N2 = 2 * 10 ** 5
getcontext().prec = 20

def debug(*a):
	stderr.write(' '.join(map(str, a)) + '\n')

def fp(x, p, m):
	r = 1
	while p:
		if p % 2:
			r = r * x % m
			p -= 1
		else:
			x = x * x % m
			p //= 2
	return r

def fact(x, m):
	r = 1
	for i in range(2, x + 1):
		r = r * i % m
	return r

def C(n, k, m):
	return fact(n, m) * fp(fact(n - k, m), m - 2, m) % m * fp(fact(k, m), m - 2, m) % m

class SegmentTree:

	def f(self, a, b):
		return a + b

	def __init__(self, n, a):
		self.tree = [0] * (2 * n)
		self.n = n
		for i in range(n):
			self.tree[n + i] = a[i]
		for i in range(n - 1, 0, -1):
			self.tree[i] = self.f(self.tree[2 * i], self.tree[2 * i + 1])

	def q(self, l, r):
		l += self.n
		r += self.n
		res = 0
		while r > 1:
			if l % 2:
				res = self.f(res, self.tree[l])
				l += 1
			if r % 2:
				r -= 1
				res = self.f(res, self.tree[r])
			r //= 2
			l //= 2
		return res

	def u(self, index, value):
		index += self.n
		self.tree[index] = value
		index //= 2
		while index > 0:
			self.tree[index] = self.f(self.tree[2 * index], self.tree[2 * index + 1])
			index //= 2

def z_function(s):
	(l, r, n) = (0, 0, len(s))
	z = [0] * n
	z[0] = 0
	for i in range(1, n):
		if r >= i:
			z[i] = min(z[i - l], r - i + 1)
		while z[i] + i < n and s[z[i]] == s[z[i] + i]:
			z[i] += 1
		if i + z[i] - 1 > r:
			l = i
			r = l + z[i] - 1
	return z

def pc_pre(a):
	n = len(a)
	r = [0] * (n + 1)
	for i in range(n):
		r[i + 1] = r[i] + a[i]
	return r

def pc_suf(a):
	n = len(a)
	r = [0] * (n + 1)
	for i in range(n - 1, -1, -1):
		r[i] = r[i + 1] + a[i]
	return r

def bsloe(a, v):
	(l, h) = (-1, len(a))
	while h - l > 1:
		m = (h + l) // 2
		if a[m] > v:
			h = m
		else:
			l = m
	return l

def bsh(a, v):
	(l, h) = (-1, len(a))
	while h - l > 1:
		m = (h + l) // 2
		if a[m] > v:
			h = m
		else:
			l = m
	return h

def precalc_fact(n):
	global F
	F = [1] * (n + 1)
	for i in range(2, n + 1):
		F[i] = F[i - 1] * i

def precalc_fact_mod(n, m):
	global F
	F = [1] * (n + 1)
	for i in range(2, n + 1):
		F[i] = F[i - 1] * i % m

def test():
	a = [1, 2, 3]
	s = 'abcabcab'
	assert C(3, 2, 5) == 3
	assert pc_pre(a) == [0, 1, 3, 6]
	assert pc_suf(a) == [6, 5, 3, 0]
	assert z_function(s) == [0, 0, 0, 5, 0, 0, 2, 0]
	assert fp(2, 3, 5) == 3
	assert fact(3, 5) == 1
	t = SegmentTree(3, a)
	assert t.q(1, 3) == t.f(a[1], a[2])
	t.u(0, 5)
	assert t.q(0, 2) == t.f(5, a[1])
	assert bsh(a, 3) == 3
	assert bsloe(a, 3) == 2
	debug('tests passed')
test()

def calcsums(a):
	r = set([0])
	for i in a:
		nr = set()
		for j in r:
			nr.add(j)
			nr.add(j + i)
			nr.add(j - i)
		r = nr
	return r

def chk(a, i):
	b = a[:i] + a[i + 1:]
	return a[i] in calcsums(b)

def solve(n, a):
	(*a,) = map(abs, a)
	for i in range(n):
		if chk(a, i):
			print('YES')
			return
	print('NO')
(t,) = rd()
for _ in range(t):
	(n,) = rd()
	a = ra()
	solve(n, a)


import bisect
import heapq
import math
import collections
import sys
import copy
from functools import reduce
import decimal
from io import BytesIO, IOBase
import os
import itertools
import functools
from types import GeneratorType
sys.setrecursionlimit(10 ** 9)
decimal.getcontext().rounding = decimal.ROUND_HALF_UP
graphDict = collections.defaultdict
queue = collections.deque

def bootstrap(f, stack=[]):

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

class Graphs:

	def __init__(self):
		self.graph = graphDict(set)

	def add_edge(self, u, v):
		self.graph[u].add(v)
		self.graph[v].add(u)

	def dfs_utility(self, nodes, visited_nodes, psf):
		global ans
		if len(visited_nodes.keys()) == n:
			ans = psf
			return
		visited_nodes[nodes] = None
		for neighbour in self.graph[nodes]:
			if neighbour not in visited_nodes:
				self.dfs_utility(neighbour, visited_nodes, psf + [neighbour])
		visited_nodes.pop(nodes)
		return

	def dfs(self, node):
		global ans
		Visited = collections.OrderedDict()
		self.dfs_utility(node, Visited, [node])

	def bfs(self, node):
		visited = set()
		if node not in visited:
			queue.append(node)
			visited.add(node)
		while queue:
			parent = queue.popleft()
			print(parent)
			for item in self.graph[parent]:
				if item not in visited:
					queue.append(item)
					visited.add(item)

class Tree:

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

def inorder(node, lis):
	if node:
		inorder(node.left, lis)
		lis.append(node.data)
		inorder(node.right, lis)
	return lis

def leaf_node_sum(root):
	if root is None:
		return 0
	if root.left is None and root.right is None:
		return root.data
	return leaf_node_sum(root.left) + leaf_node_sum(root.right)

def hight(root):
	if root is None:
		return -1
	if root.left is None and root.right is None:
		return 0
	return max(hight(root.left), hight(root.right)) + 1

def rounding(n):
	return int(decimal.Decimal(f'{n}').to_integral_value())

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

def p_sum(array):
	return list(itertools.accumulate(array))
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, **kwargs):
		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))

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

def map_inp(v_type):
	return map(v_type, inp().split())

def list_inp(v_type):
	return list(map_inp(v_type))
for _ in range(int(inp())):
	n = int(inp())
	arr = list_inp(int)
	flag = 0
	dic = set()
	for i in range(1, n + 1):
		for it in itertools.combinations(arr, i):
			temp = sum(it)
			if temp == 0:
				flag = 1
				break
			elif temp in dic:
				flag = 1
				break
			else:
				dic.add(temp)
		if flag == 1:
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


from itertools import *
for s in [*open(0)][2::2]:
	(*a,) = map(int, s.split())
	n = len(a)
	print('YNEOS'[len({*map(sum, combinations(a + [0] * n, n))}) >> n::2])


from math import floor, gcd, sqrt, ceil
from collections import Counter, defaultdict
from itertools import combinations
from heapq import heapify, heappop, heappush

def chk(a, n):
	l = []
	for i in range(1, n + 1):
		l.append(list(combinations(a, i)))
	ans = [0]
	for i in l:
		for j in i:
			ans.append(sum(list(j)))
	return len(ans) != len(set(ans))

def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		if 0 in a or len(set(a)) < n or chk(a, n):
			print('YES')
		else:
			print('NO')
main()


from itertools import *
for s in [*open(0)][2::2]:
	a = (*map(int, s.split()),)
	n = len(a)
	print('YNEOS'[len({sum((x * y for (x, y) in zip(a, p))) for p in product((0, 1), repeat=n)}) >> n::2])


T = int(input())
for _ in range(T):
	N = int(input())
	A = [abs(int(a)) for a in input().split()]
	L = []
	for i in range(1 << N):
		s = 0
		for j in range(N):
			if i >> j & 1:
				s += A[j]
		L.append(s)
	print('YES' if len(set(L)) < 1 << N else 'NO')


import heapq
import sys
from math import *
import threading
from heapq import *
from itertools import count
from pprint import pprint
from collections import defaultdict
from heapq import heapify, heappop, heappush
mod = 10 ** 9 + 7
inf = 10 ** 15
decision = ['NO', 'YES']
yes = 'YES'
no = 'NO'
import os
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')

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

	def npr(self, n, k):
		if k < 0 or n < k:
			return 0
		f = self.factorial
		return f.calc(n) * f.invFactorial(n - k) % self.MOD

def lower_bound(li, num):
	answer = len(li)
	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 = len(li)
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			start = middle + 1
		else:
			answer = middle
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val):
	ans = -1
	lb = 0
	ub = len(li) - 1
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = mid
			break
	return ans

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

def SieveOfEratosthenes(n):
	prime = [{1, i} for i in range(n + 1)]
	p = 2
	while p <= n:
		for i in range(p * 2, n + 1, p):
			prime[i].add(p)
		p += 1
	return prime

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

def prod(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def sumk(a, b):
	print('called for', a, b)
	ans = a * (a + 1) // 2
	ans -= b * (b + 1) // 2
	return ans

def sumi(n):
	ans = 0
	if len(n) > 1:
		for x in n:
			ans += int(x)
		return ans
	else:
		return int(n)

def checkwin(x, a):
	if a[0][0] == a[1][1] == a[2][2] == x:
		return 1
	if a[0][2] == a[1][1] == a[2][0] == x:
		return 1
	if len(set(a[0])) == 1 and a[0][0] == x or (len(set(a[1])) == 1 and a[1][0] == x) or (len(set(a[2])) == 1 and a[2][0] == x):
		return 1
	if len(set(a[0][:])) == 1 and a[0][0] == x or (len(set(a[1][:])) == 1 and a[0][1] == x) or (len(set(a[2][:])) == 1 and a[0][0] == x):
		return 1
	return 0
inf = 10 ** 9 + 7

def main():
	karmanya = int(input())
	while karmanya != 0:
		karmanya -= 1
		n = int(input())
		a = list(map(int, input().split()))
		a = set(a)
		f = 0
		if 0 in a:
			print(yes)
		elif len(a) < n:
			print(yes)
		else:
			a = sorted(a)
			for i in range(n):
				b = a[:i] + a[i + 1:]
				for k in range(2 ** len(b)):
					temp = []
					for taker in range(len(b)):
						if k & 1 << taker > 0:
							temp += [b[taker]]
					m = len(temp)
					for sign in range(2 ** m):
						ans = 0
						for taker in range(m):
							if sign & 1 << taker > 0:
								ans += temp[taker]
							else:
								ans -= temp[taker]
						if ans == a[i]:
							f = 1
							break
					if f:
						break
				if f:
					break
			print(decision[f])
main()


import sys
import bisect
from bisect import bisect_left as lb
from bisect import bisect_right as rb
input_ = lambda : sys.stdin.readline().strip('\r\n')
from math import log
from math import gcd
from math import atan2, acos
from random import randint
sa = lambda : input_()
sb = lambda : int(input_())
sc = lambda : input_().split()
sd = lambda : list(map(int, input_().split()))
sflo = lambda : list(map(float, input_().split()))
se = lambda : float(input_())
sf = lambda : list(input_())
flsh = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
mod1 = 998244353
gp = []
cost = []
dp = []
mx = []
ans1 = []
ans2 = []
special = []
specnode = []
a = 0
kthpar = []

def dfs2(root, par):
	if par != -1:
		dp[root] = dp[par] + 1
	for i in range(1, 20):
		if kthpar[root][i - 1] != -1:
			kthpar[root][i] = kthpar[kthpar[root][i - 1]][i - 1]
	for child in gp[root]:
		if child == par:
			continue
		kthpar[child][0] = root
		dfs(child, root)
ans = 0
b = []
vis = []
tot = 0
time = []
time1 = []
adj = []
mx = -1

def dfs(a, b, p, c):
	if a == b:
		return c
	for (i, j) in adj[a]:
		if i == p:
			continue
		temp = dfs(i, b, a, c + j)
		if dfs(i, b, a):
			mx = max(i, mx)
			return 1
a = []
n = 0

def recur(ind, s, c):
	if ind == n:
		if s == 0 and c == 1:
			return True
		else:
			return False
	if recur(ind + 1, s, c):
		return True
	if recur(ind + 1, s + a[ind], 1):
		return True
	if recur(ind + 1, s - a[ind], 1):
		return True
	return False

def hnbhai(tc):
	global a, n
	n = sb()
	a = sd()
	if recur(0, 0, 0):
		print('YES')
		return
	print('NO')

def dfs(root):
	global tot, vis, gp
	for child in gp[root]:
		if vis[child] == 0:
			tot += 1
			vis[child] = 1
			dfs(child)
for _ in range(sb()):
	hnbhai(_ + 1)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))

	def f(i, s, c):
		if i == n:
			if s == 0 and c != n:
				return True
			return False
		if f(i + 1, s, c + 1) or f(i + 1, s + l[i], c) or f(i + 1, s - l[i], c):
			return True
		return False
	if f(0, 0, 0):
		print('YES')
	else:
		print('NO')


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

def sums(values):
	ret = [(0, 0)]
	for v in values:
		plus = [(v + x, cnt + 1) for (x, cnt) in ret]
		minus = [(v - x, cnt + 1) for (x, cnt) in ret]
		ret.extend(plus)
		ret.extend(minus)
	return ret

def solve():
	n = int(input())
	a = readline()
	return any((v == 0 for (v, cnt) in sums(a) if cnt))
t = int(input())
for __ in range(t):
	print('YES' if solve() else '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')
from collections import defaultdict as dd
for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	if len(l) != len(set(l)):
		print('YES')
		continue
	a = 2 ** len(l)
	ans = 'NO'
	for i in range(a):
		j = 0
		c = 0
		x = i
		l1 = [0] * len(l)
		d = 0
		l2 = [0]
		while x:
			if x & 1:
				c += l[j]
				l1[j] = 1
				y = len(l2)
				for k in range(y - 1, y - 2 ** d - 1, -1):
					l2.append(l2[k] + l[j])
					l2.append(l2[k] - l[j])
				d += 1
			j += 1
			x = x >> 1
		d1 = dd(int)
		for j in range(len(l2) - 1, len(l2) - 2 ** d - 1, -1):
			d1[l2[j]] = 1
		for j in range(len(l)):
			if not l1[j]:
				if d1[l[j]]:
					ans = 'YES'
					break
		if ans == 'YES':
			break
	print(ans)


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	z = int(3 ** n)
	an = 'NO'
	for i in range(1, z):
		temp = 0
		i1 = i
		for j in range(n):
			x = i1 % 3
			if x == 1:
				temp += l[j]
			elif x == 2:
				temp -= l[j]
			i1 //= 3
		if temp == 0:
			an = 'YES'
			break
	print(an)


import sys
t = int(sys.stdin.readline())

def f(k, su, w):
	if w and su == 0:
		return True
	if k < n:
		if f(k + 1, su + nums[k], True):
			return True
		if f(k + 1, su - nums[k], True):
			return True
		if w:
			if f(k + 1, su, True):
				return True
		elif f(k + 1, su, False):
			return True
for _ in range(t):
	n = int(sys.stdin.readline())
	nums = list(map(int, sys.stdin.readline().split()))
	q = f(0, 0, False)
	if q:
		print('YES')
	else:
		print('NO')


def find(i, total, k):
	if i == n:
		if total == 0 and k > 0:
			return True
		return False
	return find(i + 1, total + a[i], k + 1) or find(i + 1, total - a[i], k + 1) or find(i + 1, total, k)

def sex(n, a):
	if n == 1:
		if a[0] == 0:
			return 'YES'
		return 'NO'
	a = [abs(a[i]) for i in range(n)]
	a.sort()
	for i in range(n - 1):
		if a[i] == a[i + 1]:
			return 'YES'
	if find(0, 0, 0):
		return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(sex(n, a))


import io
import os
import itertools
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
	n = int(input())
	a = sorted(map(int, input().split()))
	for modes in itertools.product([-1, 0, +1], repeat=n):
		total = 0
		count = 0
		for (i, mode) in enumerate(modes):
			count += abs(mode)
			total += a[i] * mode
		if count and total == 0:
			print('YES')
			return
	print('NO')
t = int(input())
for _ in range(t):
	solve()


import math
import os
import sys
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import accumulate, combinations, permutations, combinations_with_replacement, product
from collections import *
import random
M = 10 ** 9 + 7
import heapq
from bisect import *
from functools import lru_cache
from queue import PriorityQueue
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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')

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 fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def luckynumber(x, n, a):
	if x > 0:
		a.append(x)
	if x > 10 ** 9:
		return a
	elif x < 1000000000000.0:
		luckynumber(x * 10 + 4, n, a)
		luckynumber(x * 10 + 7, n, a)

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

def query1(l, r):
	if l >= r:
		return -1
	print('?', l + 1, r + 1)
	sys.stdout.flush()
	return int(input()) - 1

def answer(p):
	print('!', p + 1)
	sys.stdout.flush()
	exit()

def rse(arr, n):
	stack = []
	ans = []
	for i in range(n - 1, -1, -1):
		if len(stack) == 0:
			ans.append(n)
		else:
			while len(stack) != 0:
				if stack[-1][0] >= arr[i]:
					stack.pop()
				else:
					break
			if len(stack) == 0:
				ans.append(n)
			else:
				ans.append(stack[-1][1])
		stack.append([arr[i], i])
	ans.reverse()
	return ans

def lse(arr, n):
	stack = []
	ans = []
	for i in range(n):
		if len(stack) == 0:
			ans.append(-1)
		else:
			while len(stack) != 0:
				if stack[-1][0] >= arr[i]:
					stack.pop()
				else:
					break
			if len(stack) == 0:
				ans.append(-1)
			else:
				ans.append(stack[-1][1])
		stack.append([arr[i], i])
	return ans

def mah(arr):
	max1 = 0
	p = rse(arr, len(arr))
	q = lse(arr, len(arr))
	for i in range(len(arr)):
		a = (p[i] - q[i] - 1) * arr[i]
		max1 = max(a, max1)
	return max1

def maxSumIS(arr, n):
	msis = arr.copy()
	for i in range(1, n):
		for j in range(i):
			if arr[i] > arr[j] and msis[i] < msis[j] + arr[i]:
				msis[i] = msis[j] + arr[i]
	c = max(msis)
	p = 5
	return c

def binarysearch2(arr, target):
	lo = 0
	hi = len(arr) - 1
	while lo <= hi:
		mid = (lo + hi) // 2
		if arr[mid] == target:
			if mid != len(arr) - 1:
				if arr[mid + 1] != target:
					return mid
				else:
					lo += 1
			else:
				return mid
			continue
		if arr[mid] > target:
			hi = mid - 1
		else:
			lo = mid + 1

def nge(arr, n):
	stack = []
	ans = []
	for i in range(n - 1, -1, -1):
		if len(stack) == 0:
			ans.append(-1)
		else:
			while len(stack) > 0:
				if stack[-1][0] < arr[i]:
					stack.pop()
				else:
					break
			if len(stack) == 0:
				ans.append(-1)
			else:
				ans.append(stack[-1][1])
		stack.append([arr[i], i])
	ans.reverse()
	return ans

def alperm(nums, path, result):
	if not nums:
		result.add(tuple(path))
		return
	for i in range(0, len(nums)):
		alperm(nums[:i] + nums[i + 1:], path + [nums[i]], result)
	return result

def minsum(arr, n, m, res, l):
	if n == 1 and m == 1:
		res += arr[0][0]
		l.append(res)
	else:
		if n != 1:
			p = res + arr[n - 1][m - 1]
			minsum(arr, n - 1, m, p, l)
		if m != 1:
			p = res + arr[n - 1][m - 1]
			minsum(arr, n, m - 1, p, l)
	return min(l)

def subset(arr, n, ans, c):
	if n == 0:
		print(c)
		ans.add(tuple(sorted(c)))
		return
	else:
		op = c + [arr[n - 1]]
		subset(arr, n - 1, ans, op)
		subset(arr, n - 1, ans, c)

def catalan(n):
	if n == 0 or n == 1:
		return 1
	catalan = [0] * (n + 1)
	catalan[0] = 1
	catalan[1] = 1
	for i in range(2, n + 1):
		for j in range(i):
			catalan[i] += catalan[j] * catalan[i - j - 1]
	return catalan[n]

def isP(p, i, j):
	if j <= i:
		return True
	if p[i] != p[j]:
		return False
	return isP(p, i + 1, j - 1)

def BFS(adj, src, dist, paths, n):
	visited = [False] * n
	dist[src] = 0
	paths[0] = 1
	q = [src]
	visited[src] = True
	while q:
		p = q.pop(0)
		for j in adj[p]:
			if not visited[j]:
				q.append(j)
				visited[j] = True
			if dist[j] > dist[p] + 1:
				dist[j] = dist[p] + 1
				paths[j] = paths[p]
			elif dist[j] == dist[p] + 1:
				paths[j] += paths[p]
	return paths

def fun(x, y, l):
	res = 0
	for i in range(5):
		if l[x][i] <= l[y][i]:
			res += 1
	if res >= 3:
		return x
	else:
		return y

def main():
	t = 1
	for _ in range(t):
		for _ in range(int(input())):
			n = inpu()
			l = lis()

			def f(i, s, c):
				if i == n:
					if s == 0 and c != n:
						return True
					return False
				if f(i + 1, s, c + 1) or f(i + 1, s + l[i], c) or f(i + 1, s - l[i], c):
					return True
				return False
			if f(0, 0, 0):
				print('YES')
			else:
				print('NO')
main()


from os import path
from io import BytesIO, IOBase
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, Counter, defaultdict as dd
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().rstrip()

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

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('0')
file = 1

def ceil(a, b):
	return (a + b - 1) // b

def solve():
	for _ in range(ii()):
		n = ii()
		a = li()
		s = set()
		ok = False
		for i in range(1 << n):
			sum = 0
			for j in range(n):
				if i >> j & 1:
					sum += a[j]
			if sum in s:
				ok = True
				break
			s.add(sum)
		print('YES' if ok else 'NO')
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


import sys
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())
for _ in range(inp()):
	n = inp()
	a = inara()
	for i in range(n):
		a[i] = abs(a[i])
	a.sort()
	flag = False
	for i in range(1, n):
		if a[i] == a[i - 1]:
			flag = True
	for i in range(n):
		if a[i] == 0:
			flag = True
	subset = []
	for mask in range(1, 1 << n):
		tot = 0
		for bit in range(n):
			if mask & 1 << bit:
				tot += a[bit]
		subset.append(tot)
	subset.sort()
	for i in range(1, len(subset)):
		if subset[i] == subset[i - 1]:
			flag = True
	print('YES' if flag else 'NO')


from itertools import *
for s in [*open(0)][2::2]:
	a = (*map(int, s.split()),)
	n = len(a)
	print('YNEOS'[len({*map(sum, chain(*(combinations(a, i) for i in range(n + 1))))}) >> n::2])


import sys

def read():
	line = sys.stdin.readline().strip()
	return map(int, line.split())

def dfs(l, r, dpt):
	if dpt == 0:
		return [0]
	lst = []
	for i in range(l, r):
		for j in dfs(i + 1, r, dpt - 1):
			lst.append(arr[i] + j)
	return lst

def solver(N):
	if 0 in arr or len(set(arr)) != N:
		return 'YES'
	lst = []
	for i in range(1, N + 1):
		lst.extend(dfs(0, N, i))
	if len(set(lst)) != (1 << N) - 1:
		return 'YES'
	return 'NO'
(T,) = read()
for t in range(T):
	(N,) = read()
	arr = sorted(list(map(lambda x: abs(x), list(read()))))
	print(solver(N))
sys.exit()


import random
import math
from collections import defaultdict
import itertools
from sys import stdin, stdout
import sys
import operator
from decimal import Decimal
p2D = lambda x: print(*x, sep='\n')

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

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

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

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

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()

def li():
	return [int(i) for i in input().split()]

def lli(rows):
	return [li() for _ in range(rows)]

def si():
	return input()

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

def ins():
	return input().split()

def main():
	for _ in range(ii()):
		n = ii()
		a = li()
		if 0 in a:
			print('YES')
		elif n == 1:
			print('NO')
		else:
			all_ta = []
			for r in range(1, n + 1):
				for c in itertools.combinations(a, r):
					tmp = list(c)
					ta = sum(tmp)
					all_ta.append(ta)
			set_ta = set(all_ta)
			if 0 in all_ta:
				print('YES')
			elif len(set_ta) != len(all_ta):
				print('YES')
			else:
				print('NO')
main()


import sys
import math
mod = 10 ** 9 + 7
LI = lambda : [int(k) for k in input().split()]
input = lambda : sys.stdin.readline().rstrip()
IN = lambda : int(input())
S = lambda : input()
r = range
for t in r(IN()):
	n = IN()
	li = LI()
	if 0 in li:
		print('YES')
		continue
	uli = [abs(li[i]) for i in range(n)]
	uli = set(uli)
	if len(li) != len(uli):
		print('YES')
		continue
	dif = [0]
	for i in range(n):
		ndif = []
		for j in range(len(dif)):
			ndif += [li[i] - dif[j]]
			ndif += [dif[j] + li[i]]
		if 0 in ndif:
			print('YES')
			break
		dif += ndif
	else:
		print('NO')


import sys, math, cmath, time, collections
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import nsmallest, nlargest, heapify, heappop, heappush, heapreplace
from math import ceil, floor, log, log2, sqrt, gcd, factorial, pow, pi
from bisect import bisect_left, bisect_right
start_time = time.time()

def solve(a, n):
	cur = [0]
	for i in range(n):
		cur = cur + [x + a[i] for x in cur] + [x - a[i] for x in cur]
	print('YES' if sum((x == 0 for x in cur)) > 1 else 'NO')

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	solve(arr, n)
testcases = int(input())
for i in range(testcases):
	main()


def process(A):
	n = len(A)
	A = [abs(x) for x in A]
	A = sorted(set(A))
	if len(A) < n:
		return 'YES'
	if n == 1:
		if A == [0]:
			return 'YES'
		return 'NO'
	if n == 2:
		if A[0] == 0:
			return 'YES'
		return 'NO'
	sums = set([0])
	for i in range(n):
		if A[i] in sums:
			return 'YES'
		sums2 = set([])
		for x in sums:
			sums2.add(x)
			sums2.add(x + A[i])
		sums = sums2
	if len(sums) == 2 ** n:
		return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	A = [int(x) for x in input().split()]
	print(process(A))


from itertools import combinations
T = int(input())
for i in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	if n == 1:
		if arr[0] != 0:
			print('NO')
		else:
			print('YES')
		continue
	h = dict()
	t = 0
	for j in range(1, n + 1):
		for k in combinations(arr, j):
			l = sum(k)
			if l == 0:
				t = 1
				print('YES')
				break
			elif l in h:
				t = 1
				print('YES')
				break
			else:
				h[l] = 1
		if t == 1:
			break
	if t != 1:
		print('NO')


import sys
from os import path
if path.exists('Input.txt'):
	sys.stdin = open('Input.txt', 'r')
	sys.stdout = open('Output.txt', 'w')
input = lambda : sys.stdin.readline().rstrip()

def solve_tc():
	n = int(input())
	s = list(map(int, input().split()))
	b = set()
	b.add(0)
	for i in range(n):
		a = set()
		for k in b:
			c = k + s[i]
			if c in b or c in a:
				return 'YES'
			else:
				a.add(c)
		b = b.union(a)
	return 'NO'
t = int(input())
for _ in range(t):
	sys.stdout.write(solve_tc() + '\n')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	f = False
	for i in range(1, 3 ** n):
		m = i
		s = []
		while m > 0 or len(s) < n:
			r = m % 3
			if r == 0:
				s.append(0)
			elif r == 1:
				s.append(-1)
			else:
				s.append(1)
			m //= 3
		val = 0
		for j in range(n):
			val += a[j] * s[j]
		if val == 0:
			f = True
	if f:
		print('YES')
	else:
		print('NO')


def f(l, i, s):
	if s == 0:
		return 1
	if i >= len(l):
		return 0
	if s == -1:
		return f(l, i + 1, l[i]) or f(l, i + 1, -1) or f(l, i + 1, -l[i])
	else:
		return f(l, i + 1, s + l[i]) or f(l, i + 1, s) or f(l, i + 1, s - l[i])
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	print('YES' if f(l, 0, -1) else 'NO')


ans = []
for _ in range(int(input())):
	n = int(input())
	u = list(map(int, input().split()))
	if 0 in u:
		ans.append('YES')
		continue
	for i in range(n):
		if u[i] < 0:
			u[i] = -u[i]
	u.sort()
	for i in range(1, n):
		if u[i] == u[i - 1]:
			ans.append('YES')
			break
	else:
		for msk1 in range(2 ** n):
			cnt = 0
			st = set()
			for i in range(n):
				if msk1 & 2 ** i:
					cnt += 1
				else:
					st.add(u[i])
			for msk2 in range(2 ** cnt):
				sm = 0
				cnt = 0
				for i in range(n):
					if msk1 & 2 ** i:
						if msk2 & 2 ** cnt:
							sm += u[i]
						else:
							sm -= u[i]
						cnt += 1
				if cnt > 1 and sm in st:
					ans.append('YES')
					break
			else:
				continue
			break
		else:
			ans.append('NO')
print('\n'.join(ans))


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
from bisect import bisect_left as lower_bound, bisect_right as upper_bound

def so():
	return int(input())

def st():
	return input()

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

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

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

def lebe():
	return list(map(int, input()))

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()

def joro(L):
	return ''.join(map(str, L))

def decimalToBinary(n):
	return bin(n).replace('0b', '')

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

def npr(n, r):
	return factorial(n) // factorial(n - r) if n >= r else 0

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

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 tir(a, b, c):
	if 0 == c:
		return 1
	if len(a) <= b:
		return 0
	if c != -1:
		return tir(a, 1 + b, c + a[b]) or tir(a, b + 1, c - a[b]) or tir(a, 1 + b, c)
	else:
		return tir(a, 1 + b, a[b]) or tir(a, b + 1, -a[b]) or tir(a, 1 + b, -1)

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = -1
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = mid
			break
	return ans

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

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

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

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

def tr(n):
	return n * (n + 1) // 2

def iu():
	import re
	import sys
	input = sys.stdin.readline
	import math as my
	m = so()
	L = le()
	if tir(L, 0, -1) != 0:
		print('YES')
	else:
		print('NO')

def main():
	for i in range(so()):
		iu()
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()


from sys import stdin, stdout
from itertools import combinations, chain

def powerset(s):
	return chain.from_iterable((combinations(s, r) for r in range(len(s) + 1)))
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = [abs(int(x)) for x in stdin.readline().split()]
	check_0 = False
	for i in range(n):
		if a[i] == 0:
			check_0 = True
	check_repeat = False
	for i in range(n):
		for j in range(i + 1, n):
			if a[i] == a[j]:
				check_repeat = True
	if check_0 or check_repeat:
		stdout.write('YES\n')
	else:
		answer = 'NO'
		check = set()
		for s in powerset(a):
			s1 = sum(s)
			if s1 in check:
				answer = 'YES'
				break
			else:
				check.add(s1)
		stdout.write(answer + '\n')


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


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

def sums(values):
	sums_ = [0]
	for v in values:
		new = list()
		for s in sums_:
			new.extend((s + v, s - v))
		yield from new
		sums_.extend(new)

def solve():
	input()
	a = readline()
	print('YES' if 0 in sums(a) else 'NO')
t = int(input())
for __ in range(t):
	solve()


import math
from os import terminal_size

def lerp(val, lb, ub, lv, uv):
	return lv + (val - lb) * (uv - lv) / (ub - lb)

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

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

def matrix(fill, w, h):
	return [[fill] * w for i in range(h)]
for _ in range(int(input())):
	N = int(input())
	a = get_ints()
	d = {}
	possible = False
	for i in a:
		if i in d or i == 0:
			possible = True
			break
		else:
			d[i] = 1
	if possible:
		print('YES')
		continue
	d = {0: 1}
	for i in range(N):
		if -a[i] in d:
			possible = True
			break
		created = []
		for ele in d:
			if ele == a[i] or ele == -a[i]:
				possible = True
				break
			created.append(ele + a[i])
			created.append(ele - a[i])
		if possible:
			break
		for new_val in created:
			d[new_val] = 1
	if possible:
		print('YES')
	else:
		print('NO')


t = int(input())
for o in range(t):
	n = int(input())
	l = list(map(int, input().strip().split()))
	zeros = 0
	can = False
	for i in l:
		if i == 0:
			zeros += 1
	if zeros > 1:
		print('YES')
		continue
	mx = 1
	bit = 2 ** n
	sums = {}
	powers = []
	k = 1
	for i in range(n):
		powers.append(k)
		k *= 2
	for i in range(bit):
		ones = []
		for j in range(n):
			if i & powers[j]:
				ones.append(j)
		tot = 0
		for ind in ones:
			tot += l[ind]
		if tot not in sums:
			sums[tot] = 1
		else:
			sums[tot] += 1
		if sums[tot] > mx:
			print('YES')
			can = True
			break
	if can == False:
		print('NO')


import sys
input = iter(sys.stdin.read().splitlines()).__next__

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	a = set(map(abs, a))
	a.discard(0)
	if len(a) < n:
		return 'YES'
	elements = sorted(a)
	elements_minus_i = [elements[:i] + elements[i + 1:] for i in range(n)]
	for q in range(3 ** (n - 1)):
		sum_elements_minus_i = [0] * n
		for j in range(n - 1):
			(q, r) = divmod(q, 3)
			if r == 1:
				for i in range(n):
					sum_elements_minus_i[i] += elements_minus_i[i][j]
			elif r == 2:
				for i in range(n):
					sum_elements_minus_i[i] -= elements_minus_i[i][j]
		for (element, other_combo) in zip(elements, sum_elements_minus_i):
			if element == other_combo:
				return 'YES'
	return 'NO'
t = int(input())
output = []
for _ in range(t):
	output.append(solve())
print(*output, sep='\n')


import sys
input = sys.stdin.readline

def rec(i, w, s, a, n):
	if i == n:
		for i in range(n):
			if w[i] == 0 and a[i] == s:
				return True
		return False
	w[i] = 1
	if rec(i + 1, w, s + a[i], a, n):
		return True
	w[i] = 0
	if rec(i + 1, w, s, a, n):
		return True
	w[i] = -1
	if rec(i + 1, w, s - a[i], a, n):
		return True
	return False

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	w = [0] * n
	if rec(0, w, 0, a, n):
		print('YES')
	else:
		print('NO')
for i in range(int(input())):
	solve()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	for i in range(n):
		s = [0]
		for j in range(n):
			if i != j:
				for k in range(len(s)):
					s.append(s[k] + a[j])
					s.append(s[k] - a[j])
		if a[i] in s:
			print('YES')
			break
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = 0
	for i in range(1, 3 ** n):
		s = []
		m = i
		while m > 0 or len(s) < n:
			r = m % 3
			if r == 2:
				s.append(-1)
			else:
				s.append(r)
			m //= 3
		count = 0
		for j in range(n):
			count += arr[j] * s[j]
		if count == 0:
			flag = 1
			break
	if flag:
		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')
from math import ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	n = int(input())
	a = list(map(int, input().split()))
	if 0 in a or len(a) != len(set(a)):
		print('YES')
		continue
	total = [0] * (1 << n)
	for i in range(1 << n):
		x = 0
		for j in range(n):
			if i & 1 << j:
				x += a[j]
		total[i] = x
	pos = False
	for i in range(1, 1 << n):
		for j in range(1, 1 << n):
			if i & j == 0 and total[i] == total[j] or total[i] == 0:
				pos = True
				break
		if pos:
			break
	print('YES' if pos else 'NO')


from sys import stdin, stdout
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	A = list(map(int, stdin.readline().split()))
	B = set()
	B.add(0)
	found = False
	for i in range(n):
		added = set()
		for k in B:
			c = k + A[i]
			if c in B:
				found = True
				break
			elif c in added:
				found = True
				break
			else:
				added.add(c)
			if found:
				break
		B = B.union(added)
		if found:
			break
	if found:
		print('YES')
	else:
		print('NO')


import random
import collections
import string
import math
import copy
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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
mo = int(1000000000.0 + 7)

def exgcd(a, b):
	if not b:
		return (1, 0)
	(y, x) = exgcd(b, a % b)
	y -= a // b * x
	return (x, y)

def getinv(a, m):
	(x, y) = exgcd(a, m)
	return -1 if x == 1 else x % m

def comb(n, b):
	res = 1
	b = min(b, n - b)
	for i in range(b):
		res = res * (n - i) * getinv(i + 1, mo) % mo
	return res % mo

def quickpower(a, n):
	res = 1
	while n:
		if n & 1:
			res = res * a % mo
		n >>= 1
		a = a * a % mo
	return res

def dis(a, b):
	return abs(a[0] - b[0]) + abs(a[1] - b[1])

def getpref(x):
	if x > 1:
		return x * (x - 1) >> 1
	else:
		return 0

def orafli(upp):
	primes = []
	marked = [False for i in range(upp + 3)]
	prvs = [i for i in range(upp + 3)]
	for i in range(2, upp):
		if not marked[i]:
			primes.append(i)
		for j in primes:
			if i * j >= upp:
				break
			marked[i * j] = True
			prvs[i * j] = j
			if i % j == 0:
				break
	return (primes, prvs)

def lower_ord(c: str) -> int:
	return ord(c) - 97

def upper_ord(c: str) -> int:
	return ord(c) - 65

def read_list():
	return [int(i) for i in input().split()]

def read_int():
	s = input().split()
	if len(s) == 1:
		return int(s[0])
	else:
		return map(int, s)

def ask(s):
	print(f'? {s}', flush=True)

def answer(s):
	print(f'{s}', flush=True)
import functools
import itertools
from fractions import Fraction

def lowbit(x):
	return -x & x

def pref(x):
	return x * (x + 1) >> 1

def solve():
	n = read_int()
	arr = read_list()
	if 0 in arr:
		print('YES')
		return
	for bak in arr:
		barr = copy.deepcopy(arr)
		barr.remove(bak)
		s = {0}
		for i in barr:
			tss = set()
			for j in s:
				tss.add(i + j)
				tss.add(i - j)
				tss.add(j - i)
			s = s.union(tss)
		if bak in s or -bak in s:
			print('YES')
			return
	print('NO')
T = int(input())
for ti in range(T):
	solve()


import sys
input = sys.stdin.readline

def main():
	n = int(input())
	alst = list(map(int, input().split()))
	for bit in range(1, 3 ** n):
		tot = 0
		for b in alst:
			if bit % 3 == 1:
				tot += b
			elif bit % 3 == 2:
				tot -= b
			bit //= 3
		if tot == 0:
			print('YES')
			return
	print('NO')
for _ in range(int(input())):
	main()


import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	n = int(input())
	a = [abs(int(i)) for i in input().split()]
	a1 = set(a)
	if 0 in a1 or len(a1) < n:
		print('YES')
		continue
	a = list(a1)
	a.sort()
	b = [0]
	flag = 0
	for i in range(len(a)):
		for j in range(1, len(b)):
			for k in range(j - 1):
				if b[j] - b[k] == a[i]:
					flag = 1
					break
			if flag:
				break
		if flag:
			break
		for j in range(len(b)):
			b.append(b[j] + a[i])
		b.sort()
	if flag:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if 0 in a:
		print('YES')
	else:
		for i in range(n):
			c = [0]
			for j in range(n):
				if i != j:
					for k in range(len(c)):
						c.append(c[k] - a[j])
						c.append(c[k] + a[j])
			if a[i] in c or -a[i] in c:
				print('YES')
				break
		else:
			print('NO')


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()))
	if 0 in X:
		print('YES')
		continue
	for k in range(N):
		ff = 0
		for j in range(3 ** (N - 1)):
			l = []
			for _ in range(N - 1):
				(j, m) = divmod(j, 3)
				l.append(m)
			r = 0
			f = 0
			for i in range(N - 1):
				if i == k:
					f = 1
					continue
				if l[i] == 1:
					r += X[i + f]
				elif l[i] == 2:
					r -= X[i + f]
			if r == X[k]:
				ff = 1
				print('YES')
				break
		if ff:
			break
	else:
		print('NO')


import sys, os
from io import BytesIO, IOBase
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, 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')
(stdin, stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = pow(10, 9) + 7
mod2 = 998244353

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

def iinp():
	return int(inp())

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

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

def lmp():
	return list(mp())

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

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

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

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
for _ in range(iinp()):
	n = iinp()
	arr = lmp()
	ansl = []
	md = {}
	flg = False
	for i in range(1 << n):
		sm = 0
		for j in range(n):
			if i & 1 << j:
				sm += arr[j]
		if sm in md:
			flg = True
			break
		md[sm] = 1
	print('YES' if flg else 'NO')


from sys import stdin, setrecursionlimit
input = stdin.readline
setrecursionlimit(10 ** 8)

def solve(i, value, took):
	if i == n:
		if took and value == 0:
			return True
		return False
	return solve(i + 1, value, took) | solve(i + 1, value + a[i], took + 1) | solve(i + 1, value - a[i], took + 1)

def answer():
	if solve(0, 0, 0) == True:
		return 'YES'
	else:
		return 'NO'
for T in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(answer())


import os, sys
from io import BytesIO, IOBase

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, 8192))
			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, 8192))
			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')

class dict(dict):

	def __missing__(self, key):
		return 0
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp = lambda dtype: dtype(input().strip())
inp_d = lambda dtype: [dtype(x) for x in input().split()]
inp_2d = lambda dtype, n: [inp(dtype) for _ in range(n)]
inp_2ds = lambda dtype, n: [inp_d(dtype) for _ in range(n)]
inp_enu = lambda dtype: [(i, x) for (i, x) in enumerate(inp_d(dtype))]
inp_enus = lambda dtype, n: [[i] + [inp_d(dtype)] for i in range(n)]
ceil1 = lambda a, b: (a + b - 1) // b
get_bit = lambda x, i: x >> i & 1
for _ in range(inp(int)):
	(n, a, ans, flag) = (inp(int), inp_d(int), ('NO', 'YES'), 0)
	if n == 1:
		print(ans[a[0] == 0])
	elif 0 in a:
		print('YES')
	else:
		for msk in range(1 << n):
			(a1, a2) = ([], [])
			for bit in range(n):
				if get_bit(msk, bit):
					a1.append(a[bit])
				else:
					a2.append(a[bit])
			(mem1, mem2) = (dict(), dict())
			for msk in range(1, 1 << len(a1)):
				mem1[abs(sum([a1[bit] for bit in range(len(a1)) if get_bit(msk, bit)]))] += 1
			for msk in range(1, 1 << len(a2)):
				mem2[abs(sum([a2[bit] for bit in range(len(a2)) if get_bit(msk, bit)]))] += 1
			for i in mem1.keys():
				if mem2[i]:
					flag = 1
		print(ans[flag])


import sys
from sys import stdin
tt = int(stdin.readline())
for loop in range(tt):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	for i in range(n):
		a[i] = abs(a[i])
	a.sort()
	aset = set(a)
	ans = 'NO'
	if 0 in a or len(aset) != n:
		ans = 'YES'
		print(ans)
		continue
	for i in range(n):
		ts = set([0])
		for j in range(n):
			newlis = []
			if j != i:
				for v in ts:
					newlis.append(v + a[j])
					newlis.append(v - a[j])
			for x in newlis:
				ts.add(x)
		if a[i] in ts:
			ans = 'YES'
			break
	print(ans)


import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	a = list(map(int, input().split()))

	def possible(j, target):
		ans = set([0])
		for k in range(j, n):
			to = set()
			for x in ans:
				to.add(x - a[k])
				to.add(x + a[k])
			ans |= to
		return target in ans
	for i in range(n):
		target = a[i]
		if possible(i + 1, target):
			print('YES')
			return
	print('NO')
	return
for nt in range(int(input())):
	solve()


import sys
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import itertools
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	flag = False
	x = tuple([0] * n)
	for p in itertools.product(range(-1, 2), repeat=n):
		if p == x:
			continue
		s = 0
		for i in range(n):
			s += p[i] * A[i]
		if s == 0:
			flag = True
			break
	if flag:
		print('YES')
	else:
		print('NO')


from math import log
from collections import Counter

def decomp(x):
	L = []
	while x > 0:
		L.append(x % 2)
		x //= 2
	return L

def poss(n, L):
	l = []
	l.append([0])
	for i in range(1, 2 ** n):
		l.append(decomp(i))
	if 0 in L:
		return True
	g = []
	for i in range(1, 2 ** n):
		x = l[i]
		j = i
		while j % 2 == 0:
			j //= 2
		if j != 1:
			s = 0
			m = len(x)
			for k in range(m):
				if x[k] == 1:
					s += L[k]
			if s in L:
				return True
			if s == 0:
				return True
			g.append(s)
	ti = Counter(g)
	for x in ti:
		if ti[x] > 1:
			return True
	ls = Counter(L)
	for x in ls:
		if ls[x] > 1:
			return True
	return False
t = int(input())
for _ in range(t):
	n = int(input())
	L = [int(x) for x in input().split()]
	if poss(n, L):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	N = int(input())
	lis = list(map(int, input().split()))
	sums = set([lis[0], -lis[0]])
	for i in range(1, N):
		cur_sums = sums.copy()
		sums.add(lis[i])
		for m in cur_sums:
			sums.add(m + lis[i])
			sums.add(m - lis[i])
	print('YES' if 0 in sums else 'NO')


def possible(a):
	sums = [0]
	for v in a:
		cands = []
		for sum_ in sums:
			cands_ = [sum_ + v, sum_ - v]
			if 0 in cands_:
				return True
			cands.extend(cands_)
		sums.extend(cands)
	return False
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if possible(a):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split()))
	found = False
	for mask in range(1, 3 ** N):
		sm = 0
		for i in range(N):
			rem = mask % 3
			mask //= 3
			if rem == 2:
				rem = -1
			sm += rem * A[i]
		if sm == 0:
			found = True
			break
	if found:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = [abs(int(x)) for x in input().split()]
	if 0 in arr:
		print('YES')
		continue
	look = set()
	found = False
	for i in range(1, 2 ** n):
		s = bin(i)[2:]
		s = '0' * (n - len(s)) + s
		curr = 0
		for i in range(n):
			if s[i] == '1':
				curr += arr[i]
		if curr not in look:
			look.add(curr)
		else:
			found = True
			break
	print('YES' if found else 'NO')


for __ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	c = [0]
	ans = 'NO'
	for i in range(n):
		a = []
		for j in c:
			a.append(j + s[i])
			a.append(j - s[i])
		c.extend(a)
		if c.count(0) > 1:
			ans = 'YES'
			break
	print(ans)


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	z = 1 << n
	d = set()
	an = 'NO'
	for i in range(z):
		s = sum([l[j] for j in range(n) if i & 1 << j])
		if s in d:
			an = 'YES'
			break
		else:
			d.add(s)
	print(an)


from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
import io
import os
import math
import bisect

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

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 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

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

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

def mapin():
	return [int(x) for x in input().split()]
t = int(input())
for _ in range(t):
	n = int(input())
	l = mapin()
	tt = 3 ** n
	fl = 0
	for k in range(1, tt):
		temp = k
		sum = 0
		for i in range(n):
			s = temp % 3
			temp //= 3
			if s == 2:
				s = -1
			sum += s * l[i]
		if sum == 0:
			fl = 1
			break
	if fl:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
from itertools import combinations
t = int(input())
for j in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	flag = False
	for i in range(n):
		if a[i] == 0:
			flag = True
			break
		temp = a.copy()
		temp.pop(i)
		if a[i] in temp or -a[i] in temp:
			flag = True
			break
	if flag:
		print('YES')
		continue
	for x in range(3, n + 1):
		temp = list(combinations(a, x))
		for y in temp:
			y = list(y)
			t_sum = sum(y)
			sums = [t_sum]
			suml = 1
			for z in range(x):
				ty = suml
				for w in range(ty):
					sums.append(sums[w] - 2 * y[z])
					suml += 1
			if 0 in sums:
				flag = True
				break
		if flag == True:
			break
	if flag:
		print('YES')
	else:
		print('NO')


def naiveSolve():
	return

def main():
	t = int(input())
	allans = []
	for _ in range(t):
		n = int(input())
		a = readIntArr()
		ans = 'NO'
		for mask1 in range(1, 1 << n):
			summ1 = 0
			for i in range(n):
				if mask1 & 1 << i > 0:
					summ1 += a[i]
			if summ1 == 0:
				ans = 'YES'
			for mask2 in range(1, 1 << n):
				if mask1 & mask2 > 0:
					continue
				summ2 = 0
				for i in range(n):
					if mask2 & 1 << i > 0:
						summ2 += a[i]
				if summ1 == summ2:
					ans = 'YES'
		allans.append(ans)
	multiLineArrayPrint(allans)
	return
import sys
input = sys.stdin.buffer.readline

def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))

def multiLineArrayPrint(arr):
	print('\n'.join([str(x) for x in arr]))

def multiLineArrayOfArraysPrint(arr):
	print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))

def readIntArr():
	return [int(x) for x in input().split()]

def makeArr(defaultValFactory, dimensionArr):
	dv = defaultValFactory
	da = dimensionArr
	if len(da) == 1:
		return [dv() for _ in range(da[0])]
	else:
		return [makeArr(dv, da[1:]) for _ in range(da[0])]

def queryInteractive(l, r):
	print('? {} {}'.format(l, r))
	sys.stdout.flush()
	return int(input())

def answerInteractive(x):
	print('! {}'.format(x))
	sys.stdout.flush()
inf = float('inf')
MOD = 10 ** 9 + 7
from math import gcd, floor, ceil
for _abc in range(1):
	main()


def su(uni):
	result = [[]]
	for i in range(len(uni)):
		for j in range(len(result)):
			result.append(result[j] + [uni[i]])
	return result

def summ(a):
	S = 0
	for i in a:
		S += i
	return S

def fun(x):
	return abs(int(x))
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(fun, input().split()))
	starry = su(a)
	sumarry = set()
	flag = 0
	for i in range(len(starry)):
		x = summ(starry[i])
		if x in sumarry:
			flag = 1
			break
		sumarry.add(x)
	if flag == 0:
		print('NO')
	else:
		print('YES')


def main():
	t = int(input())
	for i in range(t):
		c = int(input())
		s = set()
		k = 999999
		for j in map(int, input().split()):
			s.add(abs(j))
			k = min(abs(j), k)
		if len(s) < c or k == 0:
			print('YES')
			continue
		m = list(s)
		k = 1 << c
		k += 1
		flag = False
		for j in range(k):
			t = 0
			L = 0
			for h in range(c):
				if 1 << h & j != 0:
					t += m[h]
					L += 1
			if t in s and L > 1:
				flag = True
				break
			s.add(t)
		if flag:
			print('YES')
		else:
			print('NO')
main()


def su(uni):
	result = [[]]
	for i in range(len(uni)):
		for j in range(len(result)):
			result.append(result[j] + [uni[i]])
	return result

def summ(a):
	S = 0
	for i in a:
		S += i
	return S
t = int(input())
for _ in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	a = []
	for temp1 in num:
		a.append(abs(temp1))
	starry = su(a)
	sumarry = []
	for i in range(len(starry)):
		sumarry.append(summ(starry[i]))
	flag = 0
	sumarry.sort()
	N = len(sumarry)
	count = 0
	while count < N - 1:
		if sumarry[count] == sumarry[count + 1]:
			flag = 1
			break
		count += 1
	if flag == 0:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	if n == 1:
		if A[0] == 0:
			print('YES')
		else:
			print('NO')
		continue
	if 0 in A:
		print('YES')
		continue
	X = [A[0]]
	for i in range(1, n):
		a = A[i]
		Y = [a]
		for x in X:
			Y.append(x + a)
			Y.append(x - a)
		X += Y
	if 0 in X:
		print('YES')
	else:
		print('NO')


def r(a, suma, cerca):
	if suma == cerca:
		return True
	if not a:
		return False
	last = a.pop()
	possible = r(a, suma + last, cerca) or r(a, suma - last, cerca) or r(a, suma, cerca)
	a.append(last)
	return possible
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print('YES' if any((r(a[:i] + a[i + 1:], 0, a[i]) for i in range(n))) else 'NO')


from sys import stdin, stdout

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

def num1in():
	return int(stdin.readline())

def num2in():
	(a, b) = map(int, stdin.readline().split())
	return (a, b)

def num3in():
	(a, b, c) = map(int, stdin.readline().split())
	return (a, b, c)

def num4in():
	(a, b, c, d) = map(int, stdin.readline().split())
	return (a, b, c, d)

def num5in():
	(a, b, c, d, e) = map(int, stdin.readline().split())
	return (a, b, c, d, e)

def recur(i, arr, visited, s, f):
	if s == f:
		return True
	if i == len(arr):
		return False
	if visited[i]:
		return recur(i + 1, arr, visited, s, f)
	return recur(i + 1, arr, visited, s, f) or recur(i + 1, arr, visited, s + arr[i], f) or recur(i + 1, arr, visited, s - arr[i], f)
t = num1in()
for test in range(t):
	n = num1in()
	arr = arrin()
	visited = [False for x in range(n)]
	flag = 0
	for i in range(n):
		visited[i] = True
		ans = recur(0, arr, visited, 0, arr[i])
		if ans == True:
			print('YES')
			flag = 1
			break
		visited[i] = False
	if flag == 0:
		print('NO')


import sys, os
from math import *
from bisect import *
from heapq import *
from collections import *
from itertools import combinations
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		n = int(input())
		arr = list(MI())
		if 0 in arr:
			print('YES')
			continue

		def process(mask):
			temp = []
			for i in range(n):
				if 1 << i & mask:
					temp.append(arr[i])
			k = len(temp)
			for i in range(2 ** k):
				val = 0
				for j in range(k):
					if 1 << j & i:
						val += temp[j]
					else:
						val -= temp[j]
				if val == 0:
					return True
			return False

		def select(i, mask):
			if i == n:
				if mask:
					return process(mask)
				return False
			return select(i + 1, mask | 1 << i) | select(i + 1, mask)
		if select(0, 0):
			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')

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

def outP(var):
	sys.stdout.write(str(var) + '\n')
MOD = 10 ** 9 + 7
mod = 998244353
main()


import os, sys
from io import BytesIO, IOBase
from math import log2, ceil, sqrt, gcd
from _collections import deque
import heapq as hp
from bisect import bisect_left, bisect_right
from math import cos, sin
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')
mod = 10 ** 9 + 7
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = set()
	ans = 'NO'
	for i in range(0, 1 << n):
		ct = 0
		for j in range(n):
			if i & 1 << j:
				ct += a[j]
		if ct in s:
			ans = 'YES'
			break
		s.add(ct)
	print(ans)


mod = 10 ** 9 + 7

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

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

def solve(t_id):
	n = int(input())
	a = list(map(int, input().split()))
	ok = False
	for i in range(1, 3 ** n):
		sm = 0
		k = i
		for j in range(n):
			if k % 3 == 1:
				sm += a[j]
			elif k % 3 == 2:
				sm -= a[j]
			k //= 3
		if sm == 0:
			ok = True
	print('YES' if ok else 'NO')
t = 1
t = int(input())
for i in range(t):
	solve(i + 1)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	zai = [0] * n
	ans = 0
	for i in range(1 << n):
		t = []
		if ans == 1:
			break
		ind = 0
		while i > 0:
			if i & 1 == 1:
				t.append(a[ind])
			ind += 1
			i = i >> 1
		res = 0
		if sum(t) % 2 == 1 or len(t) == 0:
			continue
		else:
			mb = sum(t) // 2
			m = len(t)
			for j in range(1 << m):
				r = 0
				ind = 0
				while j > 0:
					if j & 1 == 1:
						r += t[ind]
					ind += 1
					j = j >> 1
				if r == mb:
					ans = 1
					break
	if ans == 1:
		print('YES')
	else:
		print('NO')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	cur = [0]
	for i in range(n):
		cur = cur + [x + a[i] for x in cur] + [x - a[i] for x in cur]
	print('YES' if sum((x == 0 for x in cur)) > 1 else 'NO')


import os
import sys
import math
from io import BytesIO, IOBase
import io
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
from collections import deque
from collections import Counter
import threading
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')

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: max(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)

class SegmentTree1:

	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)
MOD = 10 ** 9 + 7

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD
mod = 10 ** 9 + 7
omod = 998244353
prime = [True for i in range(10001)]
prime[0] = prime[1] = False

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

class DSU:

	def __init__(self, R, C):
		self.par = range(R * C + 1)
		self.rnk = [0] * (R * C + 1)
		self.sz = [1] * (R * C + 1)

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

	def union(self, x, y):
		(xr, yr) = (self.find(x), self.find(y))
		if xr == yr:
			return
		if self.rnk[xr] < self.rnk[yr]:
			(xr, yr) = (yr, xr)
		if self.rnk[xr] == self.rnk[yr]:
			self.rnk[xr] += 1
		self.par[yr] = xr
		self.sz[xr] += self.sz[yr]

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

	def top(self):
		return self.size(len(self.sz) - 1) - 1

class LazySegTree:

	def __init__(self, _op, _e, _mapping, _composition, _id, v):

		def set(p, x):
			assert 0 <= p < _n
			p += _size
			for i in range(_log, 0, -1):
				_push(p >> i)
			_d[p] = x
			for i in range(1, _log + 1):
				_update(p >> i)

		def get(p):
			assert 0 <= p < _n
			p += _size
			for i in range(_log, 0, -1):
				_push(p >> i)
			return _d[p]

		def prod(l, r):
			assert 0 <= l <= r <= _n
			if l == r:
				return _e
			l += _size
			r += _size
			for i in range(_log, 0, -1):
				if l >> i << i != l:
					_push(l >> i)
				if r >> i << i != r:
					_push(r >> i)
			sml = _e
			smr = _e
			while l < r:
				if l & 1:
					sml = _op(sml, _d[l])
					l += 1
				if r & 1:
					r -= 1
					smr = _op(_d[r], smr)
				l >>= 1
				r >>= 1
			return _op(sml, smr)

		def apply(l, r, f):
			assert 0 <= l <= r <= _n
			if l == r:
				return
			l += _size
			r += _size
			for i in range(_log, 0, -1):
				if l >> i << i != l:
					_push(l >> i)
				if r >> i << i != r:
					_push(r - 1 >> i)
			l2 = l
			r2 = r
			while l < r:
				if l & 1:
					_all_apply(l, f)
					l += 1
				if r & 1:
					r -= 1
					_all_apply(r, f)
				l >>= 1
				r >>= 1
			l = l2
			r = r2
			for i in range(1, _log + 1):
				if l >> i << i != l:
					_update(l >> i)
				if r >> i << i != r:
					_update(r - 1 >> i)

		def _update(k):
			_d[k] = _op(_d[2 * k], _d[2 * k + 1])

		def _all_apply(k, f):
			_d[k] = _mapping(f, _d[k])
			if k < _size:
				_lz[k] = _composition(f, _lz[k])

		def _push(k):
			_all_apply(2 * k, _lz[k])
			_all_apply(2 * k + 1, _lz[k])
			_lz[k] = _id
		_n = len(v)
		_log = _n.bit_length()
		_size = 1 << _log
		_d = [_e] * (2 * _size)
		_lz = [_id] * _size
		for i in range(_n):
			_d[_size + i] = v[i]
		for i in range(_size - 1, 0, -1):
			_update(i)
		self.set = set
		self.get = get
		self.prod = prod
		self.apply = apply
MIL = 1 << 20

def makeNode(total, count):
	return total * MIL + count

def getTotal(node):
	return math.floor(node / MIL)

def getCount(node):
	return node - getTotal(node) * MIL
nodeIdentity = makeNode(0.0, 0.0)

def nodeOp(node1, node2):
	return node1 + node2
	return makeNode(getTotal(node1) + getTotal(node2), getCount(node1) + getCount(node2))
identityMapping = -1

def mapping(tag, node):
	if tag == identityMapping:
		return node
	count = getCount(node)
	return makeNode(tag * count, count)

def composition(mapping1, mapping2):
	return mapping1 if mapping1 != identityMapping else mapping2

def memodict(f):

	class memodict(dict):

		def __missing__(self, key):
			ret = self[key] = f(key)
			return ret
	return memodict().__getitem__

def pollard_rho(n):
	if n & 1 == 0:
		return 2
	if n % 3 == 0:
		return 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			prev = p
			p = p * p % n
			if p == 1:
				return math.gcd(prev - 1, n)
			if p == n - 1:
				break
		else:
			for i in range(2, n):
				(x, y) = (i, (i * i + 1) % n)
				f = math.gcd(abs(x - y), n)
				while f == 1:
					(x, y) = ((x * x + 1) % n, (y * y + 1) % n)
					y = (y * y + 1) % n
					f = math.gcd(abs(x - y), n)
				if f != n:
					return f
	return n

@memodict
def prime_factors(n):
	if n <= 1:
		return Counter()
	f = pollard_rho(n)
	return Counter([n]) if f == n else prime_factors(f) + prime_factors(n // f)

def distinct_factors(n):
	factors = [1]
	for (p, exp) in prime_factors(n).items():
		factors += [p ** i * factor for factor in factors for i in range(1, exp + 1)]
	return factors

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	if small[-1] == large[-1]:
		large.pop()
	large.reverse()
	small.extend(large)
	return small

def binarySearch(arr, n, i, key):
	left = 0
	right = n - 1
	mid = 0
	res = n
	while left <= right:
		mid = (right + left) // 2
		if arr[mid][i] > key:
			res = mid
			right = mid - 1
		else:
			left = mid + 1
	return res

def binarySearch1(arr, n, i, key):
	left = 0
	right = n - 1
	mid = 0
	res = -1
	while left <= right:
		mid = (right + left) // 2
		if arr[mid][i] > key:
			right = mid - 1
		else:
			res = mid
			left = mid + 1
	return res
t = 1
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = set(a)
	ch = 0

	def dfs(i, curr, el):
		c = 0
		if i == n:
			if curr == el:
				c = 1
			return c
		c = c or dfs(i + 1, curr + a[i], el)
		c = c or dfs(i + 1, curr - a[i], el)
		c = c or dfs(i + 1, curr, el)
		return c
	for i in range(n):
		el = a[i]
		a[i] = 0
		ch = ch or dfs(0, 0, el)
		a[i] = el
	if len(s) < n or 0 in a:
		ch = 1
	if ch:
		print('YES')
	else:
		print('NO')


def divisors(M):
	d = []
	i = 1
	while M >= i ** 2:
		if M % i == 0:
			d.append(i)
			if i ** 2 != M:
				d.append(M // i)
		i = i + 1
	return d

def popcount(x):
	x = x - (x >> 1 & 1431655765)
	x = (x & 858993459) + (x >> 2 & 858993459)
	x = x + (x >> 4) & 252645135
	x = x + (x >> 8)
	x = x + (x >> 16)
	return x & 127

def eratosthenes(n):
	res = [0 for i in range(n + 1)]
	prime = set([])
	for i in range(2, n + 1):
		if not res[i]:
			prime.add(i)
			for j in range(1, n // i + 1):
				res[i * j] = 1
	return prime

def factorization(n):
	res = []
	for p in prime:
		if n % p == 0:
			while n % p == 0:
				n //= p
			res.append(p)
	if n != 1:
		res.append(n)
	return res

def euler_phi(n):
	res = n
	for x in range(2, n + 1):
		if x ** 2 > n:
			break
		if n % x == 0:
			res = res // x * (x - 1)
			while n % x == 0:
				n //= x
	if n != 1:
		res = res // n * (n - 1)
	return res

def ind(b, n):
	res = 0
	while n % b == 0:
		res += 1
		n //= b
	return res

def isPrimeMR(n):
	d = n - 1
	d = d // (d & -d)
	L = [2, 3, 5, 7, 11, 13, 17]
	for a in L:
		t = d
		y = pow(a, t, n)
		if y == 1:
			continue
		while y != n - 1:
			y = y * y % n
			if y == 1 or t == n - 1:
				return 0
			t <<= 1
	return 1

def findFactorRho(n):
	from math import gcd
	m = 1 << n.bit_length() // 8
	for c in range(1, 99):
		f = lambda x: (x * x + c) % n
		(y, r, q, g) = (2, 1, 1, 1)
		while g == 1:
			x = y
			for i in range(r):
				y = f(y)
			k = 0
			while k < r and g == 1:
				ys = y
				for i in range(min(m, r - k)):
					y = f(y)
					q = q * abs(x - y) % n
				g = gcd(q, n)
				k += m
			r <<= 1
		if g == n:
			g = 1
			while g == 1:
				ys = f(ys)
				g = gcd(abs(x - ys), n)
		if g < n:
			if isPrimeMR(g):
				return g
			elif isPrimeMR(n // g):
				return n // g
			return findFactorRho(g)

def primeFactor(n):
	i = 2
	ret = {}
	rhoFlg = 0
	while i * i <= n:
		k = 0
		while n % i == 0:
			n //= i
			k += 1
		if k:
			ret[i] = k
		i += 1 + i % 2
		if i == 101 and n >= 2 ** 20:
			while n > 1:
				if isPrimeMR(n):
					(ret[n], n) = (1, 1)
				else:
					rhoFlg = 1
					j = findFactorRho(n)
					k = 0
					while n % j == 0:
						n //= j
						k += 1
					ret[j] = k
	if n > 1:
		ret[n] = 1
	if rhoFlg:
		ret = {x: ret[x] for x in sorted(ret)}
	return ret

def divisors(n):
	res = [1]
	prime = primeFactor(n)
	for p in prime:
		newres = []
		for d in res:
			for j in range(prime[p] + 1):
				newres.append(d * p ** j)
		res = newres
	res.sort()
	return res

def xorfactorial(num):
	if num == 0:
		return 0
	elif num == 1:
		return 1
	elif num == 2:
		return 3
	elif num == 3:
		return 0
	else:
		x = baseorder(num)
		return 2 ** x * ((num - 2 ** x + 1) % 2) + function(num - 2 ** x)

def xorconv(n, X, Y):
	if n == 0:
		res = [X[0] * Y[0] % mod]
		return res
	x = [X[i] + X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	y = [Y[i] + Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	z = [X[i] - X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	w = [Y[i] - Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	res1 = xorconv(n - 1, x, y)
	res2 = xorconv(n - 1, z, w)
	former = [(res1[i] + res2[i]) * inv for i in range(2 ** (n - 1))]
	latter = [(res1[i] - res2[i]) * inv for i in range(2 ** (n - 1))]
	former = list(map(lambda x: x % mod, former))
	latter = list(map(lambda x: x % mod, latter))
	return former + latter

def merge_sort(A, B):
	(pos_A, pos_B) = (0, 0)
	(n, m) = (len(A), len(B))
	res = []
	while pos_A < n and pos_B < m:
		(a, b) = (A[pos_A], B[pos_B])
		if a < b:
			res.append(a)
			pos_A += 1
		else:
			res.append(b)
			pos_B += 1
	res += A[pos_A:]
	res += B[pos_B:]
	return res

class UnionFindVerSize:

	def __init__(self, N):
		self._parent = [n for n in range(0, N)]
		self._size = [1] * N
		self.group = N

	def find_root(self, x):
		if self._parent[x] == x:
			return x
		self._parent[x] = self.find_root(self._parent[x])
		stack = [x]
		while self._parent[stack[-1]] != stack[-1]:
			stack.append(self._parent[stack[-1]])
		for v in stack:
			self._parent[v] = stack[-1]
		return self._parent[x]

	def unite(self, x, y):
		gx = self.find_root(x)
		gy = self.find_root(y)
		if gx == gy:
			return
		self.group -= 1
		if self._size[gx] < self._size[gy]:
			self._parent[gx] = gy
			self._size[gy] += self._size[gx]
		else:
			self._parent[gy] = gx
			self._size[gx] += self._size[gy]

	def get_size(self, x):
		return self._size[self.find_root(x)]

	def is_same_group(self, x, y):
		return self.find_root(x) == self.find_root(y)

class WeightedUnionFind:

	def __init__(self, N):
		self.parent = [i for i in range(N)]
		self.size = [1 for i in range(N)]
		self.val = [0 for i in range(N)]
		self.flag = True
		self.edge = [[] for i in range(N)]

	def dfs(self, v, pv):
		stack = [(v, pv)]
		new_parent = self.parent[pv]
		while stack:
			(v, pv) = stack.pop()
			self.parent[v] = new_parent
			for (nv, w) in self.edge[v]:
				if nv != pv:
					self.val[nv] = self.val[v] + w
					stack.append((nv, v))

	def unite(self, x, y, w):
		if not self.flag:
			return
		if self.parent[x] == self.parent[y]:
			self.flag = self.val[x] - self.val[y] == w
			return
		if self.size[self.parent[x]] > self.size[self.parent[y]]:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[x] += self.size[y]
			self.val[y] = self.val[x] - w
			self.dfs(y, x)
		else:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[y] += self.size[x]
			self.val[x] = self.val[y] + w
			self.dfs(x, y)

class Dijkstra:

	class Edge:

		def __init__(self, _to, _cost):
			self.to = _to
			self.cost = _cost

	def __init__(self, V):
		self.G = [[] for i in range(V)]
		self._E = 0
		self._V = V

	@property
	def E(self):
		return self._E

	@property
	def V(self):
		return self._V

	def add_edge(self, _from, _to, _cost):
		self.G[_from].append(self.Edge(_to, _cost))
		self._E += 1

	def shortest_path(self, s):
		import heapq
		que = []
		d = [10 ** 15] * self.V
		d[s] = 0
		heapq.heappush(que, (0, s))
		while len(que) != 0:
			(cost, v) = heapq.heappop(que)
			if d[v] < cost:
				continue
			for i in range(len(self.G[v])):
				e = self.G[v][i]
				if d[e.to] > d[v] + e.cost:
					d[e.to] = d[v] + e.cost
					heapq.heappush(que, (d[e.to], e.to))
		return d

def Z_algorithm(s):
	N = len(s)
	Z_alg = [0] * N
	Z_alg[0] = N
	i = 1
	j = 0
	while i < N:
		while i + j < N and s[j] == s[i + j]:
			j += 1
		Z_alg[i] = j
		if j == 0:
			i += 1
			continue
		k = 1
		while i + k < N and k + Z_alg[k] < j:
			Z_alg[i + k] = Z_alg[k]
			k += 1
		i += k
		j -= k
	return Z_alg

class BIT:

	def __init__(self, n, mod=0):
		self.BIT = [0] * (n + 1)
		self.num = n
		self.mod = mod

	def query(self, idx):
		res_sum = 0
		mod = self.mod
		while idx > 0:
			res_sum += self.BIT[idx]
			if mod:
				res_sum %= mod
			idx -= idx & -idx
		return res_sum

	def update(self, idx, x):
		mod = self.mod
		while idx <= self.num:
			self.BIT[idx] += x
			if mod:
				self.BIT[idx] %= mod
			idx += idx & -idx
		return

class dancinglink:

	def __init__(self, n, debug=False):
		self.n = n
		self.debug = debug
		self._left = [i - 1 for i in range(n)]
		self._right = [i + 1 for i in range(n)]
		self.exist = [True for i in range(n)]

	def pop(self, k):
		if self.debug:
			assert self.exist[k]
		L = self._left[k]
		R = self._right[k]
		if L != -1:
			if R != self.n:
				(self._right[L], self._left[R]) = (R, L)
			else:
				self._right[L] = self.n
		elif R != self.n:
			self._left[R] = -1
		self.exist[k] = False

	def left(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._left[res]
			if res == -1:
				break
			k -= 1
		return res

	def right(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._right[res]
			if res == self.n:
				break
			k -= 1
		return res

class SparseTable:

	def __init__(self, A, merge_func, ide_ele):
		N = len(A)
		n = N.bit_length()
		self.table = [[ide_ele for i in range(n)] for i in range(N)]
		self.merge_func = merge_func
		for i in range(N):
			self.table[i][0] = A[i]
		for j in range(1, n):
			for i in range(0, N - 2 ** j + 1):
				f = self.table[i][j - 1]
				s = self.table[i + 2 ** (j - 1)][j - 1]
				self.table[i][j] = self.merge_func(f, s)

	def query(self, s, t):
		b = t - s + 1
		m = b.bit_length() - 1
		return self.merge_func(self.table[s][m], self.table[t - 2 ** m + 1][m])

class BinaryTrie:

	class node:

		def __init__(self, val):
			self.left = None
			self.right = None
			self.max = val

	def __init__(self):
		self.root = self.node(-10 ** 15)

	def append(self, key, val):
		pos = self.root
		for i in range(29, -1, -1):
			pos.max = max(pos.max, val)
			if key >> i & 1:
				if pos.right is None:
					pos.right = self.node(val)
					pos = pos.right
				else:
					pos = pos.right
			elif pos.left is None:
				pos.left = self.node(val)
				pos = pos.left
			else:
				pos = pos.left
		pos.max = max(pos.max, val)

	def search(self, M, xor):
		res = -10 ** 15
		pos = self.root
		for i in range(29, -1, -1):
			if pos is None:
				break
			if M >> i & 1:
				if xor >> i & 1:
					if pos.right:
						res = max(res, pos.right.max)
					pos = pos.left
				else:
					if pos.left:
						res = max(res, pos.left.max)
					pos = pos.right
			elif xor >> i & 1:
				pos = pos.right
			else:
				pos = pos.left
		if pos:
			res = max(res, pos.max)
		return res

def solveequation(edge, ans, n, m):
	x = [0] * m
	used = [False] * n
	for v in range(n):
		if used[v]:
			continue
		y = dfs(v)
		if y != 0:
			return False
	return x

	def dfs(v):
		used[v] = True
		r = ans[v]
		for (to, dire, id) in edge[v]:
			if used[to]:
				continue
			y = dfs(to)
			if dire == -1:
				x[id] = y
			else:
				x[id] = -y
			r += y
		return r

class SegmentTree:

	def __init__(self, init_val, segfunc, ide_ele):
		n = len(init_val)
		self.segfunc = segfunc
		self.ide_ele = ide_ele
		self.num = 1 << (n - 1).bit_length()
		self.tree = [ide_ele] * 2 * self.num
		self.size = n
		for i in range(n):
			self.tree[self.num + i] = init_val[i]
		for i in range(self.num - 1, 0, -1):
			self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

	def update(self, k, x):
		k += self.num
		self.tree[k] = x
		while k > 1:
			self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
			k >>= 1

	def query(self, l, r):
		if r == self.size:
			r = self.num
		res = self.ide_ele
		l += self.num
		r += self.num
		while l < r:
			if l & 1:
				res = self.segfunc(res, self.tree[l])
				l += 1
			if r & 1:
				res = self.segfunc(res, self.tree[r - 1])
			l >>= 1
			r >>= 1
		return res

	def bisect_l(self, l, r, x):
		l += self.num
		r += self.num
		Lmin = -1
		Rmin = -1
		while l < r:
			if l & 1:
				if self.tree[l] <= x and Lmin == -1:
					Lmin = l
				l += 1
			if r & 1:
				if self.tree[r - 1] <= x:
					Rmin = r - 1
			l >>= 1
			r >>= 1
		if Lmin != -1:
			pos = Lmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		elif Rmin != -1:
			pos = Rmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		else:
			return -1
import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations
from math import gcd, log
input = lambda : sys.stdin.readline().rstrip()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
for _ in range(int(input())):
	n = int(input())
	A = li()
	S = [0 for i in range(1 << n)]
	for i in range(n):
		t = 2 ** i
		for j in range(t, 2 * t):
			S[j] = S[j - t] + A[i]
	val = set(S)
	if len(val) != 2 ** n:
		print('YES')
	else:
		print('NO')