You are given the array $a$ consisting of $n$ positive (greater than zero) integers.

In one move, you can choose two indices $i$ and $j$ ($i \ne j$) such that the absolute difference between $a_i$ and $a_j$ is no more than one ($|a_i - a_j| \le 1$) and remove the smallest of these two elements. If two elements are equal, you can remove any of them (but exactly one).

Your task is to find if it is possible to obtain the array consisting of only one element using several (possibly, zero) such moves or not.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 1000$) — the number of test cases. Then $t$ test cases follow.

The first line of the test case contains one integer $n$ ($1 \le n \le 50$) — the length of $a$. The second line of the test case contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 100$), where $a_i$ is the $i$-th element of $a$.


-----Output-----

For each test case, print the answer: "YES" if it is possible to obtain the array consisting of only one element using several (possibly, zero) moves described in the problem statement, or "NO" otherwise.


-----Example-----
Input
5
3
1 2 2
4
5 5 5 5
3
1 2 4
4
1 3 4 4
1
100

Output
YES
YES
NO
NO
YES



-----Note-----

In the first test case of the example, we can perform the following sequence of moves:  choose $i=1$ and $j=3$ and remove $a_i$ (so $a$ becomes $[2; 2]$);  choose $i=1$ and $j=2$ and remove $a_j$ (so $a$ becomes $[2]$). 

In the second test case of the example, we can choose any possible $i$ and $j$ any move and it doesn't matter which element we remove.

In the third test case of the example, there is no way to get rid of $2$ and $4$.

Source: codeforces | Difficulty: EASY
Tags: Sorting

Greedy algorithms


Solutions:
x = int(input())
i = 1
while i <= x:
	a = int(input())
	b = str(input())
	c = b.split(' ')
	odd = 0
	pair = 0
	for y in range(len(c)):
		if int(c[y]) % 2 == 0:
			pair += 1
		else:
			odd += 1
	if pair == a:
		print('NO')
	elif odd == a and a % 2 == 0:
		print('NO')
	else:
		print('YES')
	i += 1


import math
t = int(input())
for g in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	ans = 'YES'
	for i in range(1, n):
		if A[i] - A[i - 1] >= 2:
			ans = 'NO'
			break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	b.sort()
	st = 'YES'
	for i in range(n - 1):
		if b[i + 1] - b[i] > 1:
			st = 'NO'
			break
		else:
			st = 'YES'
	print(st)


def res(l, n):
	if n == 1:
		return 1
	flag = 0
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) <= 1:
			flag = 1
		else:
			return 0
	if flag == 1:
		return 1
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ans = res(l, n)
	if ans == 1:
		print('YES')
	else:
		print('NO')


import sys

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

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

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

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

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

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

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

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

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7

def check1(A):
	for a in A:
		if a % 2 == 1:
			return True
	return False

def check2(A):
	if len(A) % 2 == 1:
		return True
	for a in A:
		if a % 2 == 0:
			return True
	return False
for _ in range(INT()):
	N = INT()
	A = LIST()
	if not check1(A) or not check2(A):
		No()
	else:
		Yes()


import sys
ii = lambda : sys.stdin.readline().strip()
idata = lambda : [int(x) for x in ii().split()]

def solve():
	n = int(ii())
	data = idata()
	data.sort()
	for i in range(1, n):
		if data[i] - data[i - 1] > 1:
			print('NO')
			return
	print('YES')
	return
for t in range(int(ii())):
	solve()


def check_array(arr):
	return all([b - a <= 1 for (a, b) in zip(list(sorted(arr))[:-1], list(sorted(arr))[1:])])

def main():
	t = int(input())
	for i in range(t):
		input()
		arr = list(map(int, input().split()))
		print('YES' if check_array(arr) else 'NO')
main()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	f = 0
	l.sort()
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	(n, con) = (int(input()), 1)
	a = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			print('NO')
			con = 0
			break
	if con:
		print('YES')


def main():
	q = int(input())
	for _ in range(q):
		n = int(input())
		tab = list(map(int, input().split()))
		a = sum(tab)
		if a % 2 != 0:
			print('YES')
			continue
		f = False
		for x in range(n):
			for y in range(n):
				if x != y and (tab[x] + tab[y]) % 2 != 0:
					print('YES')
					f = True
					break
			if f:
				break
		if not f:
			print('NO')
main()


for _ in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	f = 0
	if n == 1:
		print('YES')
	else:
		for i in range(1, len(arr)):
			if arr[i] - arr[i - 1] <= 1:
				f = 1
			else:
				f = 0
				break
		if f == 1:
			print('YES')
		else:
			print('NO')


def func(A):
	if len(A) == 1:
		return 'YES'
	A.sort()
	for i in range(1, len(A)):
		if A[i] == A[i - 1] or abs(A[i - 1] - A[i]) == 1:
			continue
		else:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	print(func(A))


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(ele) for ele in input().split()]
	a.sort()
	i = 0
	while i < n - 1:
		if abs(a[i] - a[i + 1]) <= 1:
			if a[i] < a[i + 1]:
				a.remove(a[i])
			else:
				a.remove(a[i + 1])
			i -= 1
			n -= 1
		i += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	k = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2 == 1:
			c += 1
	if c == 0:
		print('NO')
	elif c == len(l) and c % 2 == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = [int(j) for j in input().split()]
	c = 0
	l.sort(reverse=True)
	for i in range(0, n - 1):
		if l[i] - l[i + 1] > 1:
			c = 1
			break
	if c:
		print('NO')
	else:
		print('YES')


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
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')
for i in range(int(input())):
	n = int(input())
	a = set(list(map(int, input().rstrip().split())))
	a = list(a)
	a.sort()
	flag = True
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] != 1:
			flag = False
			break
	if flag == False:
		print('NO')
	else:
		print('YES')


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


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(arr[i] - arr[i + 1]) > 1:
				print('NO')
				break
		else:
			print('YES')


n = int(input())
for i in range(n):
	k = int(input())
	a = [int(i) for i in input().split()]
	c = 0
	for j in a:
		if j % 2 != 0:
			c += 1
	if sum(a) % 2 == 0 and 0 < c < k:
		print('YES')
	elif sum(a) % 2 != 0 and 0 < c <= k:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		ele = list(map(int, input().split()))
		if len(ele) == 1:
			print('YES')
		else:
			ele.sort()
			l = n
			for i in range(n - 1):
				if ele[i + 1] - ele[i] <= 1:
					l -= 1
			if l == 1:
				print('YES')
			else:
				print('NO')
main()


t = int(input())
answers = []
for ti in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for any in a:
		if any % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd == 0:
		answers.append('NO')
		continue
	if len(a) % 2 == 1:
		answers.append('YES')
		continue
	if even > 0:
		answers.append('YES')
		continue
	answers.append('NO')
for a in answers:
	print(a)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	nums = list(map(int, stdin.readline().split()))
	nums.sort()
	ans = 'YES\n'
	for i in range(n - 1):
		if nums[i + 1] - nums[i] > 1:
			ans = 'NO\n'
			break
	stdout.write(ans)


t = int(input())
for i in range(t):
	n = int(input())
	arr = set(map(int, input().split()))
	if max(arr) - min(arr) < len(arr):
		print('YES')
	else:
		print('NO')


t = eval(input())
for i in range(t):
	n = eval(input())
	a = input().split()
	for j in range(n):
		a[j] = int(a[j])
	odd = False
	even = False
	for j in range(n):
		if a[j] & 1:
			odd = True
		else:
			even = True
	if n & 1:
		if odd:
			print('YES')
		else:
			print('NO')
	elif odd and even:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	totalElement = int(input())
	if totalElement == 0:
		print('NO')
		break
	array = list(map(int, input().split()))
	array.sort()
	first = 0
	last = 1
	for j in range(totalElement):
		if len(array) == 1:
			print('YES')
			break
		if abs(array[first] - array[last]) <= 1:
			array.remove(array[first])
		else:
			print('NO')
			break


count = int(input())
for c in range(count):
	size = int(input())
	data = [int(i) for i in input().split()]
	sortt = sorted(data)
	ans = 'YES'
	for i in range(size - 1):
		if sortt[i + 1] - sortt[i] > 1:
			ans = 'NO'
			break
	print(ans)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
		continue
	g = []
	for i in range(n - 1):
		x = l[i + 1] - l[i]
		g.append(x)
	y = max(g)
	if y >= 2:
		print('NO')
	else:
		print('YES')


def inp(*, cf=lambda x: x):
	return cf(input())

def inpint():
	return inp(cf=int)

def inp_line(*, cf=lambda x: x, s=' '):
	return list(map(cf, input().split(s)))

def inpints():
	return inp_line(cf=int)

def intstostr(l):
	return ' '.join([str(x) for x in l])

def listtostr(l):
	return ' '.join(l)

def test_case(case):
	n = inpint()
	a = inpints()
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			return 'NO'
	return 'YES'

def main():
	T = inpint()
	for t in range(1, T + 1):
		print(test_case(t))
main()


a = int(input())
for i in range(a):
	x = int(input())
	z = list(map(int, input().split()))
	odd = 0
	for i in range(len(z)):
		if z[i] % 2 == 1:
			odd = odd + 1
	if x % 2 == 1:
		if odd > 0:
			print('YES')
		else:
			print('NO')
	elif odd > 0 and odd < x:
		print('YES')
	else:
		print('NO')


def small(a, b):
	length = len(a)
	n = a[0]
	for j in range(0, b):
		if abs(a[j] - n) > 1:
			return 'NO'
		n = a[j]
	return 'YES'
for i in range(int(input())):
	b = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	print(small(arr, b))


def main():
	for _ in range(int(input())):
		n = int(input())
		arr = list(map(int, input().split(' ')))
		if sum(arr) % 2 != 0:
			print('YES')
			continue
		elif n <= 1:
			print('NO')
			continue
		else:
			j = 1
			flag = False
			while j < n:
				if arr[0] % 2 == 0 and arr[j] % 2 != 0:
					flag = True
					break
				elif arr[0] % 2 != 0 and arr[j] % 2 == 0:
					flag = True
					break
				j += 1
			print('YES' if flag else 'NO')
			continue
main()


t = int(input())
for i in range(t):
	n = int(input())
	L = list(map(int, input().split()))
	s = sum(L)
	if s % 2 != 0:
		print('YES')
	else:
		k = 0
		o = 0
		for i in range(0, len(L)):
			if L[i] % 2 != 0:
				k = L[i]
				break
		for i in range(0, len(L)):
			if L[i] % 2 == 0:
				o = L[i]
				break
		if o == 0:
			print('NO')
		elif (sum(L) - o + k) % 2 != 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(set(map(int, input().split())))
	if a[0] + len(a) - 1 == a[-1]:
		print('YES')
	else:
		print('NO')


t = int(input())
for twst in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	s = set()
	for val in arr:
		s.add(val)
	if len(s) == 1:
		print('YES')
	else:
		l = []
		flag = 0
		for val in s:
			l.append(val)
		l = sorted(l)
		for i in range(1, len(l)):
			if l[i] - l[i - 1] <= 1:
				continue
			else:
				flag = 1
				break
		if flag == 0:
			print('YES')
		else:
			print('NO')


def lol(l, n):
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			return 'NO'
	return 'YES'
for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	print(lol(l, n))


def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	arr = list(set(arr))
	ans = True
	if len(arr) == 1:
		ans = True
	arr.sort(reverse=True)
	for i in range(0, len(arr) - 1):
		if arr[i] - arr[i + 1] <= 1:
			continue
		else:
			ans = False
			break
	if ans == True:
		print('YES')
	else:
		print('NO')
	return
tc = int(input())
for i in range(tc):
	solve()


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	z = 0
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			z = 1
	if z == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	e = 0
	o = 0
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e == n or (o == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for qw in range(t):
	x = input()
	ar = list(map(int, input().split()))
	if sum(ar) % 2 != 0:
		print('Yes')
	else:
		o = 0
		for i in range(len(ar)):
			if ar[i] % 2 != 0:
				o += 1
		if o != 0 and o < len(ar):
			print('Yes')
		else:
			print('No')


t = int(input())

def process(arr):
	odd = False
	even = False
	for j in arr:
		if j % 2 == 0:
			even = True
		else:
			odd = True
	return odd and even
answer = []
for a in range(t):
	n = int(input())
	line = [int(i) for i in input().split()]
	if sum(line) % 2 == 1:
		answer.append('YES')
	elif process(line):
		answer.append('YES')
	else:
		answer.append('NO')
for b in answer:
	print(b)


def no_odd(a):
	count = 0
	for i in a:
		if i % 2 == 1:
			count += 1
	return count
t = int(input())
while bool(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = 'NO'
	if sum(a) % 2 == 1:
		ans = 'YES'
	elif no_odd(a) < len(a):
		if no_odd(a) != 0:
			ans = 'YES'
	print(ans)
	t -= 1


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	s = set(l)
	temp = list(s)
	temp.sort()
	flag = 0
	for i in range(1, len(temp)):
		if temp[i] - temp[i - 1] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')
	t = t - 1


for q in range(int(input())):
	n = int(input())
	line = list(map(int, input().split()))
	i = 0
	while i < n and line[i] % 2 == 0:
		i += 1
	if i == n:
		print('NO')
	elif i == 0:
		while i < n and line[i] % 2 == 1:
			i += 1
		if i == n and sum(line) % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
for b in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		a.sort()
		for i in range(n - 1):
			r = abs(a[i] - a[i + 1])
			if r > 1:
				print('NO')
				break
		else:
			print('YES')


import sys, math, collections
from collections import defaultdict

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

def get_array():
	l = list(map(int, input().split()))
	return l

def get_2_ints():
	(a, b) = map(int, input().split())
	return (a, b)

def get_3_ints():
	(a, b, c) = map(int, input().split())
	return (a, b, c)

def sod(n):
	(n, c) = (str(n), 0)
	for i in n:
		c += int(i)
	return c

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

def getFloor(A, x):
	(left, right) = (0, len(A) - 1)
	floor = -1
	while left <= right:
		mid = (left + right) // 2
		if A[mid] == x:
			return A[mid]
		elif x < A[mid]:
			right = mid - 1
		else:
			floor = A[mid]
			left = mid + 1
	return floor

def floorSqrt(x):
	if x == 0 or x == 1:
		return x
	start = 1
	end = x
	while start <= end:
		mid = (start + end) // 2
		if mid * mid == x:
			return mid
		if mid * mid < x:
			start = mid + 1
			ans = mid
		else:
			end = mid - 1
	return ans

def main():
	for tt in range(int(input())):
		n = int(input())
		l = get_array()
		l.sort()
		if n == 1:
			print('YES')
			continue
		c = 0
		for i in range(1, n):
			if l[i] - l[i - 1] > 1:
				c = 1
				break
		if c:
			print('NO')
		else:
			print('YES')
main()


t = int(input())
for i in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	d = 0
	e = 0
	for i in l:
		if i % 2 != 0:
			d = d + 1
		else:
			e = e + 1
	if d % 2 != 0:
		print('YES')
	elif d % 2 == 0 and d > 0 and (e > 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	ev = 0
	od = 0
	int(input())
	for i in input().split():
		if int(i) % 2:
			od += 1
		else:
			ev += 1
	if od * ev:
		print('YES')
	elif ev == 0 and od % 2:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = 0
	for i in l:
		if i & 1:
			s += 1
	if s >= 1:
		if n % 2 == 0:
			if s == n:
				print('NO')
			else:
				print('YES')
		else:
			print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	flag = False
	for i in range(n - 1):
		if abs(a[i + 1] - a[i]) > 1:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')


import sys
import heapq
import math
from collections import deque
from collections import defaultdict
from collections import Counter
modH = int(10 ** 9) + 7
I = lambda : list(map(int, input().split(' ')))

def PRINT(lst, sep=' '):
	print(sep.join(map(str, lst)))
for _ in range(int(input())):
	n = int(input())
	lst = I()
	lst.sort()
	flag = 1
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if lst[i + 1] - lst[i] <= 1:
				continue
			else:
				flag = 0
				break
		if flag:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	all_odd = all_even = True
	for elem in map(int, input().split()):
		if elem % 2 == 0:
			all_odd = False
		else:
			all_even = False
	if all_even or (all_odd and n % 2 == 0):
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	n1 = int(input())
	n2 = list(map(int, input().split()))
	b = 0
	for j in n2:
		b += j % 2
	if b == 0 or (b % 2 == 0 and b == n1):
		print('NO')
	else:
		print('YES')


t = int(input())
for testcase in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	f = True
	for i in range(1, len(arr)):
		if arr[i] > arr[i - 1] + 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


a = int(input())
for j in range(a):
	b = int(input())
	c = [int(x) for x in input().split()]
	flag = True
	c.sort()
	for i in range(1, len(c)):
		if c[i] - c[i - 1] == 1 or c[i - 1] == c[i]:
			pass
		else:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
t = 2 * t
for testcase in range(t):
	try:
		number_of_elements_in_a = int(input())
		a = [int(x) for x in input().split()]
		imparcount = False
		parcount = False
		for element in a:
			if element % 2 != 0:
				imparcount = True
			else:
				parcount = True
		if imparcount is True and (number_of_elements_in_a % 2 != 0 or parcount is True):
			print('YES')
		else:
			print('NO')
	except EOFError:
		break


def solve(n, arr):
	arr.sort()
	flag = True
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('No')
test = int(input())
while test != 0:
	n1 = int(input())
	arr1 = list(map(int, input().split(' ')))
	solve(n1, arr1)
	test -= 1


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in range(n):
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 == 1:
		print('YES')
	elif odd >= 1 and even >= 1:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for ai in a:
		if ai % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == n:
		print('NO')
	elif odd == n and odd % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	lis = list(map(int, input().split()))
	lis.sort()
	temp = []
	for i in range(n):
		temp.append(lis[i])
	for i in range(1, n):
		if lis[i] - lis[i - 1] <= 1:
			temp.remove(lis[i - 1])
	if len(temp) == 1:
		print('YES')
	else:
		print('NO')


for gg in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr = sorted(arr)
	ans = 'YES'
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			ans = 'NO'
	print(ans)


t = int(input())
for i in range(t):
	guessFlag = 0
	n = int(input())
	if n == 1:
		print('YES')
		guessFlag = 1
	a = sorted(list(map(int, input().split())))
	if guessFlag == 0:
		greatestDiff = 0
		greatestDiff = [a[i + 1] - a[i] for i in range(len(a) - 1) if a[i + 1] - a[i] >= greatestDiff]
		greatestDiff = max(greatestDiff)
		if greatestDiff > 1:
			print('NO')
		else:
			print('YES')


for i in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a)
	flag = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('No')
			flag = 1
			break
	if flag == 0:
		print('yes')


def main():
	n = int(input())
	a = list(map(int, input().split()))
	cnte = 0
	cnto = 0
	for i in range(len(a)):
		if a[i] % 2 == 0:
			cnte += 1
		else:
			cnto += 1
	if sum(a) % 2 != 0:
		print('YES')
	elif cnte > 0 and cnto > 0:
		print('YES')
	else:
		print('NO')
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	a.sort()
	ans = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans = 'NO'
			break
	print(ans)


totLoop = int(input())
for x in range(totLoop):
	z = int(input())
	y = list(map(int, input().split()))
	y.sort()
	if len(y) > 1:
		flag = 1
		for i in range(len(y) - 1):
			if y[i + 1] - y[i] <= 1:
				pass
			else:
				flag = 0
				break
		if flag:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		a.sort()
		ans = True
		for i in range(1, n):
			if abs(a[i] - a[i - 1]) > 1:
				ans = False
				break
		if ans:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	o = 0
	e = 0
	for x in a:
		if x & 1:
			o += 1
		else:
			e += 1
	if o and e:
		print('Yes')
	elif o and n & 1:
		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')

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

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

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

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

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	n = int(ri())
	a = Ri()
	summ = sum(a)
	(odd, even) = (False, False)
	for i in a:
		if i % 2 == 0:
			even = True
		else:
			odd = True
	if summ % 2 == 1:
		YES()
	elif n % 2 == 0 and even and odd:
		YES()
	elif n % 2 == 1 and odd:
		YES()
	else:
		NO()


def answer(n, A):
	if n == 1:
		return 'YES'
	A.sort()
	for i in range(1, n):
		if A[i] - A[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(answer(n, a))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	f1 = 0
	for i in range(0, n - 1):
		if abs(l[i + 1] - l[i]) > 1:
			f1 = 1
			break
	if f1 == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	t = int(input())
	L = list(map(int, input().split()))
	L.sort()
	flag = False
	for j in range(1, t):
		if L[j] - L[j - 1] > 1:
			print('NO')
			flag = True
			break
	if not flag:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	posi = [0, 0]
	for i in a:
		if i & 1 == 0:
			posi[0] += 1
		else:
			posi[1] += 1
	if posi[0] != 0 and posi[1] != 0:
		print('YES')
	elif posi[1] != 0:
		if n % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	array = sorted(list(map(int, input().split())))
	count = 0
	flag = 0
	for i in range(len(array) - 1):
		if array[i + 1] - array[i] <= 1:
			count += 1
		if n - count == 1:
			flag = 1
			break
	if flag:
		print('YES')
	elif n == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	c = 0
	arr = [int(i) for i in input().split()]
	if sum(arr) % 2 == 0:
		for i in range(len(arr)):
			if arr[i] % 2 != 0:
				c = c + 1
		if c > 0 and c != len(arr):
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = [int(i) for i in input().split()]
	l.sort()
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


def fun(a, n):
	m = a[0]
	for i in range(1, n):
		if a[i] - m > 1:
			return 'NO'
		m = a[i]
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	print(fun(a, n))


t = int(input())
for g in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	m = list(set(l))
	m.sort()
	c = 0
	for i in range(len(m) - 1):
		x = abs(m[i] - m[i + 1])
		if x == 0 or x == 1:
			pass
		else:
			c = 1
			break
	if c == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	eve = odd = 0
	for i in lis:
		if i % 2 == 0:
			eve += 1
		else:
			odd += 1
	if eve == n:
		print('NO')
	elif odd == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = False
	odd = False
	countOdd = 0
	flag = 0
	for i in range(n):
		if a[i] % 2 != 0:
			odd = True
			countOdd += 1
		if a[i] % 2 == 0:
			even = True
		if even == True and odd == True:
			flag = 1
			print('YES')
			break
	if flag == 1:
		continue
	if countOdd % 2 == 0 and even == False:
		print('NO')
	elif countOdd % 2 != 0 and even == False:
		print('YES')
	elif odd == False:
		print('NO')


for i1 in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = 0
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


def sol(lis):
	lis.sort()
	if len(lis) == 1:
		return 'YES'
	stack = [lis[0]]
	for i in range(1, len(lis)):
		if abs(stack[-1] - lis[i]) <= 1:
			stack[-1] = lis[i]
		else:
			stack.append(lis[i])
	if len(stack) == 1:
		return 'YES'
	return 'NO'
k = int(input())
for i in range(k):
	input()
	lis = list(map(int, input().split(' ')))
	print(sol(lis))


def odd_sum(arr):
	odd_numbers = 0
	for i in arr:
		if i % 2 != 0:
			odd_numbers += 1
	if len(arr) % 2 != 0 and odd_numbers > 0:
		return True
	elif len(arr) % 2 == 0 and len(arr) > odd_numbers > 0:
		return True
	return False
n = int(input())
for _ in range(n):
	i = int(input())
	arr = list(map(int, input().split()))
	result = odd_sum(arr)
	print('YES' if result else 'NO')


t = int(input())
for queries in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	Danger = False
	Danger2 = False
	for aa in a:
		if aa % 2 == 1:
			Danger = True
		if aa % 2 == 0:
			Danger2 = True
	if sum(a) % 2 == 1:
		print('YES')
	elif Danger and Danger2:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in range(n):
		if ar[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif odd == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	L = list(map(int, input().split()))
	S = []
	for i in L:
		S.append(i % 2)
	if sum(S) == 0 or (sum(S) == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	a.sort()
	chk = 0
	for x in range(n - 1):
		if abs(a[x] - a[x + 1]) > 1:
			chk = 1
	if chk == 1:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	st = []
	st.append(l[0])
	for i in range(1, len(l)):
		if abs(st[-1] - l[i]) <= 1:
			st.remove(st[-1])
			st.append(l[i])
		else:
			st.append(l[i])
	print('YES' if len(st) == 1 else 'NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	x = a[0:]
	x.sort()
	flag = 0
	if n == 1:
		print('YES')
	else:
		for i in range(len(x) - 1):
			if abs(x[i] - x[i + 1]) > 1:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	input()
	arr = [int(x) for x in input().split()]
	arr = sorted(arr)
	flag = False
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			flag = True
			break
	print('YES' if not flag else 'NO')


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().rstrip().split()))
	chk = True
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			chk = False
			break
	if chk:
		print('YES')
	else:
		print('NO')


from sys import *
from bisect import bisect_left as bl, bisect_right as br, bisect
from math import *
from time import clock as cl
from itertools import zip_longest as zl
from itertools import groupby as gb
from itertools import combinations as comb
from itertools import combinations_with_replacement as cwr
from collections import defaultdict as dd
from collections import deque as dq
from collections import Counter as c
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return input()

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

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

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

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

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

def l2d(n, m, val=0):
	return [[val for i in range(n)] for j in range(m)]
for _ in range(int(data())):
	n = int(data())
	arr = l()
	s = sum(arr)
	(even, odd) = (0, 0)
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if s % 2 == 1:
		print('YES')
	elif s % 2 == 0 and odd == 0 or odd == n:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	c = 0
	array = [int(x) for x in input().split()]
	for i in array:
		if i % 2 == 0:
			c += 1
	if n == c or (c == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for t in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	if sum(arr) % 2 == 0:
		oddEl = False
		evenEl = False
		i = 0
		while not (oddEl == True and evenEl == True) and i < len(arr):
			if arr[i] % 2 != 0:
				oddEl = True
				i += 1
			else:
				evenEl = True
				i += 1
		print(['NO', 'YES'][oddEl == True and evenEl == True])
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	input_string = input()
	input_data = input_string.split(' ')
	a = [int(x) for x in input_data]
	left_block = 0
	a.sort()
	k = 0
	newList = []
	flag = 0
	while k < n - 1:
		if a[k + 1] - a[k] > 1:
			print('NO')
			flag = 3
			break
		k = k + 1
	if flag == 0:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l1 = list(map(int, input().split()))
	x = sum(l1) % 2
	if x % 2 == 0:
		flag1 = 0
		flag2 = 0
		for a in l1:
			if a % 2 == 0:
				flag1 = 1
			else:
				flag2 = 1
		if flag1 == 1 and flag2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def possible(s):
	s.sort()
	while True:
		bool = False
		n = len(s)
		for i in range(n - 1, 0, -1):
			if abs(s[i] - s[i - 1]) <= 1:
				del s[i]
				bool = True
		if not bool:
			if len(s) == 1:
				return 'YES'
			return 'NO'
for _ in range(int(input())):
	input()
	print(possible(list(map(int, input().split()))))


def check(l):
	for i in range(0, len(l)):
		if l[i] % 2 != 0:
			print('YES')
			return
	print('NO')
	return

def check1(l):
	flage = 0
	flagod = 0
	for i in range(0, len(l)):
		if flagod == 0 and l[i] % 2 != 0:
			flagod = 1
		if flage == 0 and l[i] % 2 == 0:
			flage = 1
		if flagod == 1 and flage == 1:
			print('YES')
			return
	print('NO')
	return
t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split(' ')))
	if n % 2 == 0 and n != 2:
		check1(l)
	elif n == 2 or n == 1:
		s = sum(l)
		if s % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		check(l)
	t = t - 1


from itertools import permutations
t = int(input())
for _ in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	rm = False
	if len(a) == 1:
		print('Yes')
	else:
		i = 0
		j = len(a)
		while True:
			m = min(a)
			a.remove(m)
			b = [x for x in a if abs(x - m) <= 1]
			if len(b) > 0:
				rm = True
			else:
				a.append(m)
				rm = False
				break
			i += 1
			if i == j or rm == False or len(a) == 1:
				break
		if rm:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	book = 0
	if len(a) == 1:
		print('YES')
	else:
		for i in range(len(a) - 1):
			if a[i + 1] - a[i] > 1:
				book = 1
				print('NO')
				break
	if book == 0 and len(a) != 1:
		print('YES')


import math

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		numl = [int(n) for n in input().split()]
		if n == 1:
			print('YES')
		else:
			numl = sorted(numl)
			flag = 0
			for j in range(len(numl) - 1):
				if math.fabs(numl[j + 1] - numl[j]) > 1:
					print('NO')
					flag = 1
					break
			if flag == 0:
				print('YES')
main()


for i in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	c = 0
	s = 0
	if n % 2 == 0:
		for i in A:
			if i % 2 == 0:
				c += 1
			else:
				s += 1
		if c == n or s == n:
			print('NO')
		else:
			print('YES')
	else:
		for i in A:
			if i % 2 == 1:
				c += 1
		if c > 0:
			print('YES')
		else:
			print('NO')


for t in range(int(input())):
	n = int(input())
	ar = [int(num) for num in input().split(' ')]
	count = 0
	lenofar = len(ar)
	for h in ar:
		if h % 2 != 0:
			count = count + 1
	if count % 2 != 0 or (count < lenofar and count != 0):
		print('Yes')
	else:
		print('No')


def solve(arr, n):
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			return False
	return True
T = int(input())
for t in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if solve(arr, n):
		print('YES')
	else:
		print('NO')


(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, dgraphs, mod) = (lambda : sorted(zz()), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
num = int(z())
for _ in range(num):
	n = int(z())
	l = szz()
	x = l[0]
	c = 0
	for i in l[1:]:
		if i - x > 1:
			c = 1
			break
		x = i
	if c == 0:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	k = int(input())
	l = list(set(map(int, input().split())))
	l.sort()
	b = min(l)
	c = max(l) + 1
	if l == list(range(b, c)):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	count = 0
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	if n > 1:
		for i in range(n - 1):
			if abs(arr[i + 1] - arr[i]) <= 1:
				count += 1
		if count == n - 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
possibilities = []
for _ in range(t):
	n = int(input())
	cases = map(int, input().split())
	odd = [i % 2 for i in cases]
	possible = False
	if 1 in odd:
		if 0 in odd:
			possible = True
		else:
			possible = bool(len(odd) % 2)
	possibilities.append('YES' if possible else 'NO')
for p in possibilities:
	print(p)


n = int(input())
for i in range(n):
	num = int(input())
	rlist = list(map(int, input().split()))
	rlist.sort()
	it = 0
	for i in range(0, len(rlist)):
		for j in range(i + 1, len(rlist)):
			if abs(rlist[i] - rlist[j]) <= 1:
				it += 1
				break
	if it >= num - 1:
		print('YES')
	else:
		print('NO')


import math

def fun(a):
	count = 0
	for i in range(0, n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			count += 1
		if count > 0:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	print(fun(a))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	o = 0
	e = 0
	s = 0
	for j in a:
		if j % 2 != 0:
			o = o + 1
		else:
			e = e + 1
		s = s + j
	if s % 2 != 0 or s == 1:
		print('YES')
	elif o != 0 and e != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split()
	for i in range(n):
		a[i] = int(a[i])
	a = sorted(a)
	if n != 1:
		for i in range(n - 1):
			if a[i + 1] - a[i] >= 2:
				print('NO')
				break
			if i == len(a) - 2:
				print('YES')
				break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	evens = odds = s = 0
	s = sum(a)
	if s % 2 == 1:
		print('YES')
	else:
		for i in range(n):
			if a[i] % 2 == 0:
				evens += 1
			else:
				odds += 1
		if odds == n and s % 2 == 0 or evens == n:
			print('NO')
		else:
			print('YES')


a = int(input())
for i in range(a):
	b = int(input())
	l = list(map(int, input().split()))
	for i in range(b):
		l[i] = abs(l[i])
	l.sort()
	boo = True
	for i in range(1, b):
		if l[i] - l[i - 1] > 1:
			boo = False
			break
	if boo:
		print('YES')
	else:
		print('NO')


def solve(n, d):
	(has_even, has_odd) = (False, False)
	for i in d:
		if i % 2 == 0:
			has_even = True
		else:
			has_odd = True
	if n % 2 == 0:
		return has_even and has_odd
	else:
		return has_odd

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		d = input()
		d = [int(i) for i in d.split()]
		ans = solve(n, d)
		if ans:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	l = []
	l = list(map(int, input().strip().split()))
	counto = 0
	counte = 0
	sum = 0
	for i in range(n):
		if l[i] % 2 == 0:
			counte += 1
		elif l[i] % 2 != 0:
			counto += 1
		sum += l[i]
	if sum % 2 != 0:
		ans.append('YES')
	elif counto == n:
		ans.append('NO')
	elif counte == n:
		ans.append('NO')
	else:
		ans.append('YES')
for i in ans:
	print(i)


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	(odd_cnt, even_cnt) = (0, 0)
	for x in a:
		if x % 2 == 1:
			odd_cnt += 1
		else:
			even_cnt += 1
	if odd_cnt == 0:
		print('NO')
	elif even_cnt == 0:
		if n % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	solve()


inp = lambda cast=int: [cast(x) for x in input().split()]
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)
(t,) = inp()
for _ in range(t):
	(n,) = inp()
	A = list(set(inp()))
	A = sorted(A)
	ok = True
	for i in range(len(A)):
		if A[i] != A[0] + i:
			ok = False
			break
	print('YES' if ok else 'NO')


for _ in range(int(input())):
	input()
	a = set(map(int, input().split()))
	print('YNEOS'[len(a) <= max(a) - min(a)::2])


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ec = 0
	oc = 0
	for i in l:
		if i % 2 == 0:
			ec = ec + 1
		else:
			oc = oc + 1
	if ec == 0 and n % 2 == 0:
		print('NO')
	elif oc % 2 != 0:
		print('YES')
	elif oc >= 1 and n % 2 != 0:
		print('YES')
	elif oc == 0:
		print('NO')
	else:
		print('YES')


import math
for test in range(int(input())):
	n = int(input())
	A = list(map(int, input('').split()))
	A.sort()
	flag = 0
	for i in range(1, n):
		if abs(A[i] - A[i - 1]) > 1:
			flag = 1
			break
	if flag:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	e = 0
	o = 0
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0:
		print('NO')
	elif e == 0:
		if o % 2 > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


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


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	b = True
	for i in range(n - 1):
		if l[i + 1] - l[i] <= 1:
			continue
		else:
			print('NO')
			b = False
			break
	if b:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	small_a = []
	for i in range(0, n - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			small = min(a[i], a[i + 1])
			small_a.append(small)
	for i in range(len(small_a)):
		a.remove(small_a[i])
	if len(a) <= 1:
		print('YES')
	else:
		print('NO')


from sys import stdin
import sys
import functools
import heapq
from collections import *
sys.setrecursionlimit(100000)

def _input(type=int):
	return list(map(type, stdin.readline().split()))
for tc in range(_input()[0]):
	n = _input()[0]
	arr = deque(sorted(_input()))
	ans = True
	while len(arr) > 1:
		if arr[1] - arr[0] <= 1:
			arr.popleft()
		else:
			ans = False
			break
	print('YES' if ans else 'NO')


test = int(input())
for i in range(0, test):
	n = int(input())
	a = list(map(int, input().split()))
	leng = 0
	if n == 1:
		print('YES')
		continue
	else:
		a.sort()
		for i in range(0, n - 1):
			for j in range(i + 1, n):
				if i != j:
					if abs(a[i] - a[j]) <= 1:
						if a[i] < a[j]:
							del a[i]
							a.insert(i, -1)
						elif a[j] < a[i]:
							del a[j]
							a.insert(j, -1)
						elif a[i] == a[j]:
							del a[i]
							a.insert(i, -1)
		for j in a:
			if j > -1:
				leng += 1
		if leng == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	a = int(input())
	array = list(map(int, input().split()))
	s = sum(array)
	if s % 2 == 1:
		print('YES')
	else:
		chet = 0
		nechet = 0
		for b in array:
			chet += 1 - b % 2
			nechet += b % 2
			if bool(chet) & bool(nechet):
				print('YES')
				break
		else:
			print('NO')


n = int(input())
for j in range(n):
	count = int(input())
	nums = [int(x) for x in input().split()]
	nums.sort()
	res = None
	if any([abs(nums[i] - nums[i + 1]) > 1 for i in range(len(nums) - 1)]):
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(sorted(map(int, input().split())))
	c = 1
	for j in range(n - 1):
		if abs(a[j] - a[j + 1]) >= 2:
			c = 0
			break
	if c == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	x = [int(i) for i in input().split()]
	l = [0] * (max(x) + 1)
	p = min(x)
	q = max(x)
	for i in range(len(x)):
		l[x[i]] += 1
	for i in range(p, q + 1):
		if l[i] == 0:
			print('NO')
			break
	else:
		print('YES')


def check():
	f = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			f = 1
			break
	return f
for _ in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()))
	print('NO' if check() else 'YES')


import bisect
for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	od = 0
	for j in range(n):
		if a[j] % 2 == 1:
			od += 1
	if od % 2 == 1:
		print('YES')
	elif od == n:
		print('NO')
	elif od != 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if abs(a[i + 1] - a[i]) > 1:
			n = 0
	print('YES' if n != 0 else 'NO')


for _ in range(int(input())):
	n = int(input())
	numbers = [int(i) % 2 for i in input().split()]
	if sum(numbers) % 2 == 1:
		print('YES')
	elif 0 in numbers and 1 in numbers:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = [int(i) % 2 for i in input().split()][:n]
	if sum(l) % 2 != 0:
		print('YES')
	elif l.count(0) > 0 and l.count(1) > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	x = int(input())
	lst = list(map(int, input().split(' ')))
	flag = 0
	flag2 = 0
	for i in lst:
		if i % 2 != 0:
			flag = 1
		else:
			flag2 = 1
	print('YES' if flag == 1 and flag2 == 1 or (flag2 == 0 and x % 2 != 0) else 'NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ch = 0
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			ch = 1
			break
	if ch == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	x = a[0]
	for y in a[1:]:
		if y - x > 1:
			print('NO')
			break
		x = y
	else:
		print('YES')


tc = int(input())
for i in range(0, tc):
	n = int(input())
	lst = list(map(int, input().strip().split()))[:n]
	lst.sort()
	condition = False
	while True:
		if len(lst) == 1:
			condition = True
			break
		elif lst[1] - lst[0] <= 1 or lst[1] == lst[0]:
			lst.pop(0)
		else:
			break
	if condition == True:
		print('YES')
	else:
		print('NO')
	lst.clear()


def c():
	for i in range(len(r) - 1):
		if r[i] % 2 == 1 and r[i + 1] % 2 == 0 or (r[i] % 2 == 0 and r[i + 1] % 2 == 1):
			return True
	return False
g = int(input())
for _ in range(g):
	n = input()
	r = list(map(int, input().split()))
	if sum(r) % 2 == 1:
		print('YES')
	elif c():
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	h = True
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			h = False
	if h == False:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(0, n):
	m = int(input())
	l = list(map(int, input().split()))
	l.sort()
	i = 0
	if len(l) == 1:
		print('YES')
	else:
		while i < m - 1:
			if abs(l[i] - l[i + 1]) <= 1:
				if l[i] < l[i + 1]:
					l.pop(i)
					m = len(l)
					i = -1
					if len(l) == 1:
						print('YES')
						break
				elif l[i] > l[i + 1]:
					l.pop(i + 1)
					m = len(l)
					i = -1
					if len(l) == 1:
						print('YES')
						break
				else:
					l.pop(i)
					m = len(l)
					i = -1
					if len(l) == 1:
						print('YES')
						break
			i += 1
		if len(l) != 1:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	i = 0
	while i < n - 1:
		if arr[i + 1] - arr[i] <= 1:
			i += 1
		else:
			break
	if i == n - 1:
		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')
for j in range(int(input())):
	n = int(input())
	vals = list(map(int, input().split()))
	vals.sort()
	a1 = 0
	a2 = 0
	for s in range(1, n):
		if abs(vals[s] - vals[s - 1]) <= 1:
			a1 += 1
	for s in range(n - 2, -1, -1):
		if abs(vals[s] - vals[s + 1]) <= 1:
			a2 += 1
	if a1 == n - 1 or a2 == n - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = sum(l)
	e = 0
	o = 0
	if ans % 2 != 0:
		print('YES')
		continue
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e > 0 and o > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	sum = 0
	a = list(map(int, input().split()))
	odds = 0
	even = 0
	for j in range(n):
		sum += a[j]
		if a[j] % 2 == 0:
			even += 1
		else:
			odds += 1
	if sum % 2 == 0:
		if odds != 0 and even != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def create_list(arr):
	arr = list(set(arr))
	if len(arr) == 1:
		return 'Yes'
	else:
		sorted_list = sorted(arr)
		new_list = list(range(min(sorted_list), max(sorted_list) + 1))
		if sorted_list == new_list:
			return 'Yes'
		else:
			return 'No'
t = int(input())
for t_itr in range(t):
	n = int(input())
	arr = map(int, input().rstrip().split())
	result = create_list(arr)
	print(result)


test_cases = int(input())
for i in range(test_cases):
	input()
	nums = {int(n) for n in input().split()}
	if max(nums) - min(nums) + 1 == len(nums):
		print('YES')
	else:
		print('NO')


for q in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	odd = 0
	for i in range(n):
		if l[i] % 2 != 0:
			odd += 1
	if odd == 0 or (odd == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for x in a:
		if x % 2 == 0:
			even += 1
		else:
			odd += 1
	if n % 2 == 1:
		if odd > 0:
			print('Yes')
		else:
			print('No')
	elif odd > 0 and even > 0:
		print('Yes')
	else:
		print('No')


def removeSmallest(a: list) -> bool:
	if len(a) == 1:
		return True
	else:
		a.sort()
		i = 0
		while len(a) > 1:
			if a[i] == a[i + 1]:
				a.pop(i)
			elif abs(a[i + 1] - a[i]) == 1:
				a.pop(i)
			else:
				break
		if len(a) == 1:
			return True
		else:
			return False
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if removeSmallest(a):
		print('YES')
	else:
		print('NO')


t = int(input())
list_of_ans = []
for i in range(t):
	z = input()
	list1 = [int(i) for i in input().split()]
	list1_sort = sorted(list1)
	yes = 1
	for i in range(len(list1_sort) - 1):
		if list1_sort[i + 1] - list1_sort[i] <= 1:
			yes = 1
		else:
			yes = 0
			break
	if yes == 0:
		list_of_ans.append('NO')
	else:
		list_of_ans.append('YES')
for i in range(len(list_of_ans)):
	print(*list_of_ans[i], sep='')


def remove_min(a):
	a.sort()
	elem_cnt = len(a)
	curr_pos = 1
	prev_pos = 0
	while curr_pos < len(a) and elem_cnt > 1:
		if a[curr_pos] == a[prev_pos] or abs(a[curr_pos] - a[prev_pos]) <= 1:
			curr_pos += 1
			prev_pos += 1
			elem_cnt -= 1
		else:
			break
	return elem_cnt

def main():
	test_num = int(input())
	for _ in range(test_num):
		n = int(input())
		a = list(map(int, input().split()))
		print('YES' if remove_min(a) == 1 else 'NO')
main()


def func(t):
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		flag = True
		for i in range(len(a) - 1):
			if abs(a[i] - a[i + 1]) > 1:
				print('NO')
				flag = False
				break
		if flag:
			print('YES')
t = int(input())
func(t)


n = int(input())
for i in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	a.sort()
	j = 1
	l = len(a)
	if l == 1:
		print('YES')
	else:
		while j < l - 1 and a[j] - a[j - 1] <= 1:
			j += 1
		if a[j] - a[j - 1] <= 1:
			print('YES')
		else:
			print('NO')


def solve(n, a):
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	print(solve(n, a))
	t -= 1


t = input()
for i in range(int(t)):
	n = input()
	listA = []
	string = input()
	listB = string.split(' ')
	for item in listB:
		listA.append(int(item))
	listA.sort()
	import copy
	listB = copy.deepcopy(listA)
	for i in range(1, len(listA)):
		if abs(listA[i - 1] - listA[i]) <= 1:
			if listA[i - 1] <= listA[i]:
				listB.remove(listA[i - 1])
			else:
				listB.remove(listA[i])
	if len(listB) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	sum_mass = sum(a)
	if sum_mass % 2 != 0:
		print('YES')
	elif n == a.count(a[0]):
		print('NO')
	else:
		is_even = 0
		is_odd = 0
		for elem in range(n):
			if a[elem] % 2 == 0:
				is_even += 1
			else:
				is_odd += 1
		if is_odd == n:
			print('NO')
		elif is_even >= 1:
			if is_even < n:
				print('YES')
			else:
				print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = sorted(arr)
	flag = 0
	for i in range(n - 1):
		if arr[i] != arr[i + 1] and arr[i] + 1 != arr[i + 1]:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	result = 'YES'
	n = int(input())
	a = sorted(list(map(int, input().split())))
	k = 1
	while k < n:
		if a[k] - a[k - 1] >= 2:
			result = 'NO'
			break
		k += 1
	print(result)


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


x = int(input())
for _ in range(x):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
	else:
		flag = 0
		for i in range(1, n):
			if l[i] - l[i - 1] <= 1 and l[i] - l[i - 1] >= -1:
				continue
			else:
				flag = 1
				print('NO')
				break
		if flag == 0:
			print('YES')


for ii in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	f = False
	for jj in range(n - 1):
		if a[jj + 1] - a[jj] > 1:
			f = True
			break
	if f:
		print('NO')
	else:
		print('YES')


def solve(a):
	count = sum(map(lambda x: x % 2 == 1, a))
	if len(a) == count and count % 2 == 0:
		return False
	return count > 0
for i in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	print('YES' if solve(a) else 'NO')


import sys, math, cmath, time
start_time = time.time()

def solve():
	n = inp()
	a = inlt()
	a = a + [max(a)]
	a.sort()
	if max([abs(a[i + 1] - a[i]) for i in range(len(a) - 1)]) <= 1:
		print('YES')
	else:
		print('NO')

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

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

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

def insr():
	return input().strip()

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

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

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

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


def small(b, m):
	s = len(b)
	t = b[0]
	for i in range(0, m):
		if abs(b[i] - t) > 1:
			return 'NO'
		t = b[i]
	return 'YES'
for i in range(int(input())):
	m = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	print(small(arr, m))


for tin in range(int(input())):
	n = int(input())
	b = []
	c = []
	a = list(map(int, input().split()))
	for _ in range(len(a)):
		if a[_] % 2 == 0:
			b.append(a[_])
		else:
			c.append(a[_])
	if len(c) == 0 or (len(c) == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	data = input().split()
	for j in range(n):
		data[j] = int(data[j])
	d2 = []
	for j in data:
		if j not in d2:
			d2.append(j)
	d2.sort()
	while True:
		check = 1
		if len(d2) > 1:
			check = d2[1] - d2[0]
		if check == 1:
			d2.pop(0)
		else:
			ans.append('NO')
			break
		if len(d2) <= 1:
			ans.append('YES')
			break
for j in ans:
	print(j)


t = int(input())
for _ in range(t):
	n = int(input())
	a = input().split()
	l = []
	for i in a:
		l.append(int(i))
	res = []
	mino = 0
	mine = 0
	for i in l:
		if i % 2 == 0:
			mine += 1
		else:
			mino += 1
	res = sum(l)
	if res % 2 != 0:
		print('YES')
	elif mine == 0:
		if mino % 2 == 0:
			print('NO')
	elif mine > 0:
		if mino == 0:
			print('NO')
		elif mino > 0 and mino % 2 == 0:
			print('YES')


for i in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	nums = sorted(nums)
	big = 0
	for k in range(n - 1):
		if abs(nums[k] - nums[k + 1]) > 1:
			print('NO')
			big = 1
			break
	if big == 0:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ok = True
	p = bool(ok)
	for i in range(1, n):
		p &= a[i] - a[i - 1] <= 1
	if p:
		print('YES')
	else:
		print('NO')


import math
from sys import stdin, stdout
import bisect
m = 10 ** 9 + 7

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

def inpstr():
	return list(stdin.readline().strip())

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

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

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

def bexp(n, p):
	r = 1
	while p > 0:
		if p % 2:
			r = r * n
			p = p - 1
		else:
			n = n ** 2
			p = p // 2
	return r

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def sieve(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segs(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def code():
	n = inp()
	l = inpli()
	l.sort()
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')
	return
for _ in range(inp()):
	code()


t = int(input())
for _ in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	new = list(set(lst))
	new.sort()
	flag = 0
	for i in range(len(new) - 1):
		if abs(new[i] - new[i + 1]) > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


integer = int(input())
for i in range(integer):
	n = int(input())
	a = set(map(int, input().split()))
	if len(a) == max(a) - min(a) + 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = sorted([int(x) for x in input().split()])
	for j in range(n - 1):
		if abs(l[j] - l[j + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n % 2 == 1:
		q = False
		for x in a:
			if x % 2 == 1:
				q = True
				break
		if q:
			print('YES')
		else:
			print('NO')
	else:
		q = False
		s = a[0] % 2
		for x in a:
			if x % 2 != s:
				q = True
				break
		if q:
			print('YES')
		else:
			print('NO')


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

def main():
	t = int(input())
	for case in range(t):
		n = int(input())
		a = sorted(map(int, input().split()))
		for index in range(0, n - 1):
			if a[index + 1] - a[index] <= 1:
				n -= 1
		if n == 1:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

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


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


import math as mt
import sys, string
from collections import Counter, defaultdict
I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda : list(map(int, input().split()))

def printARR(arr):
	for e in arr:
		print(e, end=' ')
	print()

def main():
	n = I()
	a = ARR()
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			return
	print('YES')
tc = 1
tc = I()
for _ in range(tc):
	main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	mark = [1] * n
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] <= 1:
			mark[i] = 0
	flag = sum(mark)
	if flag == 1:
		print('YES')
	else:
		print('NO')


nums_cases = int(input())
i = 1
answer = []
while i <= nums_cases:
	lenght_array = int(input())
	list_of_integers = input().split()
	even = 0
	odd = 0
	for x in list_of_integers:
		if int(x) % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd == 0:
		answer.append('NO')
	elif odd % 2 == 0 and even == 0:
		answer.append('NO')
	else:
		answer.append('YES')
	i += 1
for k in answer:
	print(k)


t = int(input())
for o in range(0, t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	flag = 0
	for i in range(0, n - 1):
		if arr[i + 1] - arr[i] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	flag = True
	i = 0
	while i < len(arr) - 1:
		if arr[i + 1] - arr[i] >= 2:
			flag = False
			break
		i += 1
	if flag:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	m = sum(ar)
	if m % 2 != 0:
		print('YES')
	else:
		(c, d) = (0, 0)
		for i in ar:
			if i % 2 == 0:
				c += 1
			else:
				d += 1
		if c == 0 or d == 0:
			print('NO')
		else:
			print('YES')


from bisect import bisect_left
import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	l = int(input())
	m = list(map(int, input().split()))
	m.sort()
	if l == 1:
		print('YES')
	else:
		diff = 0
		for j in range(l - 1):
			diff = max(diff, abs(m[j] - m[j + 1]))
		if diff < 2:
			print('YES')
		else:
			print('NO')


import sys

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

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

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

def solve():
	n = II()
	l = LI()
	count = 0
	for _ in range(n):
		if l[_] % 2 == 1:
			count += 1
	if count % 2 == 1:
		print('YES')
	elif count % 2 == 0 and count > 0 and (count != n):
		print('YES')
	else:
		print('NO')
for _ in range(II()):
	solve()


x = int(input())
for _ in range(x):
	n = int(input())
	a = [int(i) % 2 for i in input().split()]
	if a.count(0) == n or (a.count(1) == n and n % 2 == 0):
		print('NO')
		continue
	print('YES')


for _ in range(int(input())):
	t = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2:
		print('YES')
		continue
	(odd, even) = (0, 0)
	for j in l:
		if j % 2:
			odd = 1
		else:
			even = 1
	if even == 0 or odd == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort()
	flag = 0
	for i in range(n - 1):
		if ls[i + 1] - ls[i] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for q in range(t):
	n = int(input())
	L = [int(i) for i in input().split()]
	L.sort()
	t = True
	for i in range(1, n):
		if L[i] - L[i - 1] > 1:
			t = False
			break
	if t:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	r = list(map(int, input().split()))
	if n == 1:
		if r[0] % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif n % 2 == 0:
		count = 0
		yt = 0
		for i in range(len(r)):
			if r[i] % 2 != 0:
				count += 1
			else:
				yt += 1
		if count == len(r) or yt == len(r):
			print('NO')
		else:
			print('YES')
	else:
		yt = 0
		for i in range(len(r)):
			if r[i] % 2 == 0:
				yt += 1
		if yt == len(r):
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = [0, 0]
	for j in range(n):
		if a[j] % 2 == 0:
			b[0] += 1
		else:
			b[1] += 1
	if b[1] == 0:
		print('NO')
	elif b[0] == 0 and len(a) % 2 == 0:
		print('NO')
	else:
		print('YES')


for test in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				print('NO')
				break
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2 == 1:
			c += 1
	if c == 0:
		print('NO')
		continue
	if c == len(l) and c & 1 == 0:
		print('NO')
		continue
	print('YES')


from sys import stdin, stdout
from collections import Counter
I = lambda : map(int, stdin.readline().split())
I1 = lambda : stdin.readline()
for _ in range(int(I1())):
	n = int(I1())
	a = list(I())
	a.sort()
	f = 0
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			f = 1
			break
	print('YES' if f == 0 else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	george_boole = False
	length = len(arr)
	arr.sort()
	if length == 1:
		print('YES')
	else:
		for j in range(1, length):
			if abs(arr[j] - arr[j - 1]) > 1:
				george_boole = True
				break
		if george_boole:
			print('NO')
		else:
			print('YES')


t = int(input())
for p in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	result = 'YES'
	if n == 1:
		pass
	else:
		a.sort()
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				result = 'NO'
				break
	print(result)


for _ in range(int(input())):
	n = int(input())
	a = sorted([int(x) for x in set(input().split())])
	d = len(a)
	for i in range(d - 1):
		if a[i + 1] - a[i] == 1:
			a[i] = 0
	print('YES' if len([x for x in a if x]) == 1 else 'NO')


t = int(input())
for j in range(t):
	n = int(input())
	list1 = sorted(list(map(int, input().split(' '))))
	ct = 0
	if n == 1:
		print('YES')
	else:
		for j in range(0, n - 1):
			if abs(list1[j + 1] - list1[j]) > 1:
				ct += 1
				print('NO')
				break
		if ct == 0:
			print('YES')


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


def main():
	for t in range(int(input())):
		n = int(input())
		a = sorted(list(map(int, input().split())))
		flag = True
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				flag = False
				break
		print('YES' if flag else 'NO')
main()


n = int(input())
l = []
for i in range(n):
	arrSize = int(input())
	a = list(map(int, input().split()))
	if arrSize == 1:
		l.append('YES')
	else:
		a.sort()
		isPossible = True
		for k in range(arrSize - 1):
			if a[k + 1] - a[k] <= 1:
				continue
			else:
				isPossible = False
				break
		if isPossible:
			l.append('YES')
		else:
			l.append('NO')
for s in l:
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	sum_ = 0
	even = 0
	odd = 0
	for i in range(n):
		sum_ += lst[i]
		if lst[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if sum_ % 2 == 1:
		print('YES')
	elif odd != 0 and even != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	input()
	arr = list(map(int, input().split()))
	even_flg = False
	odd_flg = False
	for a in arr:
		if a % 2 == 0:
			even_flg = True
		else:
			odd_flg = True
	if even_flg and odd_flg:
		print('YES')
	elif even_flg and (not odd_flg):
		print('NO')
	elif not even_flg and odd_flg:
		if len(arr) % 2 == 0:
			print('NO')
		else:
			print('YES')


for i in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	j = l[0]
	for i in l[1:]:
		if abs(i - j) <= 1:
			l.remove(j)
			j = i
	print('NYOE S'[len(l) == 1::2])


import math
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	count_odd = 0
	count_even = 0
	for i in range(n):
		if arr[i] % 2 == 0:
			count_even += 1
		else:
			count_odd += 1
	if count_even == n or (count_odd == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	main()


for _ in range(int(input())):
	even = 0
	odd = 0
	inp = int(input())
	l = [x for x in list(map(int, input().split()))]
	for num in l:
		if num % 2 == 0:
			even += 1
		else:
			odd += 1
	if inp % 2 == 0 and odd >= 1 and (even >= 1):
		print('YES')
	elif inp % 2 == 0 and odd == inp or (inp % 2 == 0 and even == inp):
		print('NO')
	elif inp % 2 != 0 and odd >= 1:
		print('YES')
	else:
		print('NO')


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
for case in range(1, itg() + 1):
	n = itg()
	arr = sorted(mpint())
	a = arr[0]
	ans = 'YES'
	for i in range(1, n):
		if abs(arr[i] - a) > 1:
			ans = 'NO'
			break
		a = arr[i]
	print(ans)


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


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	aman = False
	arr.sort()
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) <= 1:
			continue
		else:
			aman = True
			break
	if aman:
		print('No')
	else:
		print('Yes')


for t in range(int(input())):
	n = int(input())
	l = [int(i) for i in input().split()]
	l.sort()
	f = 1
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			f = 0
			break
	if f == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	input()
	numbers = list(map(int, input().split(' ')))
	odds = 0
	even = 0
	for i in numbers:
		if i % 2 == 0:
			even += 1
		else:
			odds += 1
	if odds != 0 and even != 0 or (even == 0 and odds % 2 != 0):
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	a = map(int, input().split())
	odd_count = len([x for x in a if x % 2 == 1])
	if odd_count == 0:
		print('NO')
		t -= 1
		continue
	if odd_count == n and odd_count % 2 == 0:
		print('NO')
		t -= 1
		continue
	print('YES')
	t -= 1


t = int(input())

def func(arr, n):
	even = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
	odd = n - even
	if even == 0:
		if odd % 2 == 0:
			return 'NO'
		else:
			return 'YES'
	if odd == 0:
		return 'NO'
	return 'YES'
while t:
	n = int(input())
	t -= 1
	arr = [int(i) for i in input().split(' ')]
	print(func(arr, n))


for i in range(int(input())):
	x = int(input())
	f = 1
	l = [int(i) for i in input().split()]
	l.sort()
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			f = 0
			break
	if f == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	c1 = 0
	c2 = 0
	if sum(a) % 2 == 0:
		for i in range(n):
			if c1 and c2:
				break
			elif a[i] % 2 == 0:
				c1 = 1
			else:
				c2 = 1
		if c1 and c2:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	c = 0
	for i in a:
		if i % 2 != 0:
			c += 1
	if c % 2 != 0:
		print('YES')
	elif n % 2 != 0 and c != 0:
		print('YES')
	else:
		rem = n - c
		if rem != 0 and rem != n:
			print('YES')
		else:
			print('NO')


ans = []
for _ in range(int(input())):
	b = 0
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans.append(0)
			break
		else:
			b += 1
	if b == n - 1:
		ans.append(1)
for __ in ans:
	if __ == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = input()
	l = list(map(int, input().split()))
	l.sort()
	l1 = []
	for i in range(len(l)):
		for j in range(i + 1, len(l), 1):
			if abs(l[i] - l[j]) <= 1:
				l1.append(l[i])
				break
	if len(l) - len(l1) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = len([0 for x in map(int, input().split()) if x % 2 != 0])
	print('NO' if s == 0 or (s == n and n % 2 == 0) else 'YES')


for test_case in range(int(input())):
	length = int(input())
	arr = sorted(list(map(int, input().split())))
	cnt = 0
	if length == 1:
		print('YES')
	else:
		for x in range(1, length):
			if abs(arr[x] - arr[x - 1]) <= 1:
				cnt += 1
		if cnt == length - 1:
			print('YES')
		else:
			print('NO')


T = int(input())
t = 0
while t < T:
	N = int(input())
	L = list(map(int, input().split()))
	n = 0
	somma = 0
	ri = L[0] % 2
	u = True
	while n < N:
		somma += L[n]
		if L[n] % 2 != ri:
			u = False
			break
		n += 1
	if somma % 2 == 1:
		print('YES')
	if somma % 2 == 0 and u == False:
		print('YES')
	if somma % 2 == 0 and u == True:
		print('NO')
	t = t + 1


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	lis = sorted(lis)
	last = lis[0]
	flag = 1
	for i in lis[1:]:
		if abs(i - last) <= 1:
			last = i
			continue
		else:
			flag = 0
	if flag == 1:
		print('YES')
	else:
		print('NO')


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


import sys
import math
mod = 10 ** 9 + 7
inf = float('inf')

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

def LI():
	return list(map(int, sys.stdin.readline().split()))
t = I()
for _ in range(t):
	n = I()
	a = LI()
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	if s % 2 != 0:
		print('YES')
	else:
		even = [num for num in a if num % 2 == 0]
		c2 = len(even)
		c1 = n - c2
		if c2 == n or (c1 == n and n % 2 == 0):
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(co, ce) = (0, 0)
	for i in a:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	if sum(a) % 2 != 0:
		print('YES')
	elif co >= 1 and ce >= 1:
		print('YES')
	elif n % 2 == 0 and co == n:
		print('NO')
	elif ce == n:
		print('NO')


t = int(input())
ret = []
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	s = 'YES'
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) >= 2:
			s = 'NO'
			break
	ret.append(s)
sol = '\n'.join([str(x) for x in ret])
print(sol)


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


t = int(input())
while t > 0:
	k = 0
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n > 1:
		for i in range(n - 1):
			if abs(l[i] - l[i + 1]) > 1:
				k = 1
				break
	if k == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


no = int(input())
res = []
for i in range(no):
	n = int(input())
	x = list(map(int, input().split()))
	even = 0
	odd = 0
	for i in x:
		if i % 2 == 0:
			even = 1
		else:
			odd = 1
		if even == 1 and odd == 1:
			break
	if odd == 0 or (even == 0 and n % 2 == 0):
		res.append('NO')
	else:
		res.append('YES')
for i in res:
	print(i)


from sys import stdin, exit, setrecursionlimit
from collections import deque
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	n = int(input())
	arr = lmi()
	arr.sort()
	bad = False
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			bad = True
	print('NO' if bad else 'YES')


t = int(input())
for _ in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	num.sort()
	flag = 0
	for i in range(1, n):
		if num[i] - num[i - 1] > 1:
			flag = 1
			print('NO')
			break
	if flag == 1:
		continue
	print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	temp = 0
	for i in range(n - 1, 0, -1):
		if arr[i] - arr[i - 1] <= 1:
			continue
		else:
			temp = 1
			break
	if temp == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for z in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		c1 = 0
		for i in range(len(a)):
			for j in range(i + 1, len(a)):
				if a[i] % 2 != a[j] % 2:
					a[j] = a[i]
					if sum(a) % 2 != 0:
						c1 += 1
						break
			if c1 > 0:
				break
		if c1 > 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	v = list(map(int, input().split()))
	v.sort()
	t = False
	for i in range(1, len(v)):
		if v[i] - v[i - 1] > 1:
			t = True
			break
	if t:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	d = 0
	g = 0
	List = [int(j) for j in input().split(' ')]
	for k in range(n):
		if List[k] % 2 == 1:
			d += 1
		else:
			g += 1
	if sum(List) % 2 == 1:
		print('YES')
	elif g >= 1 and d >= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	X = [int(x) for x in input().split()]
	X = sorted(X)
	cnt = 0
	for j in range(len(X) - 1):
		if abs(X[j + 1] - X[j]) <= 1:
			cnt += 1
	if cnt == n - 1:
		print('YES')
	else:
		print('NO')


def small(a, n):
	l = len(a)
	t = a[0]
	for i in range(0, n):
		if abs(a[i] - t) > 1:
			return 'NO'
		t = a[i]
	return 'YES'
for i in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	print(small(ar, n))


N = int(input())
for _ in range(N):
	n = int(input())
	ls = list(map(int, input().split()))
	found1 = False
	found2 = False
	for i in ls:
		if i % 2 == 1:
			found1 = True
		else:
			found2 = True
	if n % 2 == 0:
		if found1 and found2:
			print('YES')
		else:
			print('NO')
	elif found1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	s = 0
	for i in a:
		if i % 2 != 0:
			odd += 1
		s += i
	if odd == 0:
		print('NO')
	elif n % 2 != 0:
		print('YES')
	elif odd != n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	x = sum(a)
	if x % 2 == 1:
		print('YES')
	else:
		fo = 0
		fe = 0
		for j in a:
			if j % 2 == 0:
				fe = 1
			else:
				fo = 1
		if fo and fe:
			print('YES')
		else:
			print('NO')


from typing import List

def get_input():
	try:
		text = input()
		text = text.strip()
		if len(text) == 0:
			return None
		else:
			return text
	except EOFError:
		return None

def is_reducable(xs: List[int]):
	xs.sort()
	for (a, b) in zip(xs, xs[1:]):
		if b - a > 1:
			return False
	return True
total_cases = int(get_input())
for _ in range(total_cases):
	get_input()
	xs = list(map(int, get_input().split(' ')))
	if is_reducable(xs):
		print('YES')
	else:
		print('NO')


def solve(ar, n):
	for i in range(n - 1):
		if ar[i + 1] - ar[i] > 1:
			return 'NO'
	return 'YES'
for t in range(int(input())):
	n = int(input())
	ar = sorted(list(map(int, input().split())))
	print(solve(ar, n))


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
import math
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())
t = inp(1)
while t:
	t -= 1
	n = inp(1)
	l = inp()
	l = [x % 2 for x in l]
	if sum(l) == 0:
		print('NO')
	elif n % 2 == 0 and sum(l) == n:
		print('NO')
	else:
		print('YES')


test = int(input())
for _ in range(test):
	n = int(input())
	l = list(map(int, input().split()))
	o = []
	e = []
	if sum(l) % 2:
		print('YES')
	else:
		for i in l:
			if i % 2:
				o.append(i)
			else:
				e.append(i)
		if o and e:
			print('YES')
		else:
			print('NO')


def solve():
	n = int(input())
	alst = list(map(int, input().split()))
	alst.sort()
	bef = alst[0]
	for a in alst:
		if a - bef >= 2:
			print('NO')
			return
		bef = a
	print('YES')
	return
t = int(input())
for _ in range(t):
	solve()


print(*((lambda n, co: 'YES' if co > 0 and (co % 2 == 1 or n > co) else 'NO')(int(input()), sum((int(i) % 2 for i in input().split()))) for test in range(int(input()))), sep='\n')


for _ in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	last = arr[0]
	c = 0
	for el in arr:
		if el - last >= 2:
			c = 1
		last = el
	if c:
		print('NO')
	else:
		print('YES')


q = int(input())
for i in range(q):
	n = int(input())
	s = [int(d) for d in input().split()]
	(k, k1) = (0, 0)
	for i in s:
		if i % 2:
			k += 1
		else:
			k1 += 1
	if k > 0 and k1 > 0 or (k == n and n % 2 == 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	chet = False
	nechet = False
	for i in a:
		if i % 2 == 0:
			chet = True
		else:
			nechet = True
		if chet and nechet:
			break
	if chet and nechet:
		print('YES')
	elif chet:
		print('NO')
	elif nechet and len(a) % 2 != 0:
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	arr = sorted((int(v) for v in input().split()))
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for _ in range(t):
	solve()


for i in range(int(input())):
	input()
	a = list(map(int, input().split()))
	a.sort()
	if len(a) == 1:
		print('YES')
	else:
		b = True
		for j in range(len(a) - 1):
			if abs(a[j] - a[j + 1]) >= 2:
				b = False
				break
		if b:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()))
	if len(set(a)) == 1:
		print('YES')
	else:
		m = 'YES'
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				m = 'NO'
				break
		print(m)


i = int(input())
for _ in range(i):
	yep = True
	input()
	numbs = sorted(list(map(int, input().split())))
	for f in range(1, len(numbs)):
		if numbs[f - 1] - numbs[f] < -1:
			yep = False
			break
	if yep:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	ce = 0
	co = 0
	s = 0
	l = list(map(int, input().split()))
	for j in range(n):
		x = l[j]
		if x % 2 == 1:
			co = 1
		else:
			ce = 1
		if ce == 1 and co == 1:
			break
		s += x
	if s % 2 == 0:
		if ce == 1:
			if co == 1:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().strip().split()))[:n]
	lst.sort()
	check = 0
	for j in range(len(lst) - 1):
		if lst[j + 1] - lst[j] > 1:
			print('NO')
			check = 1
			break
	if check != 1:
		print('YES')


t = int(input())
for _ in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	a_sorted = a.sort()
	output = 'YES'
	for i in range(0, len(a) - 1):
		if a[i + 1] - a[i] > 1:
			output = 'NO'
	print(output)


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			flag = 'NO'
			break
	print(flag)


for _ in range(int(input())):
	i_liczb = int(input())
	liczby = sorted(set([int(x) for x in input().split()]))
	for x in range(len(liczby) - 1):
		if liczby[x + 1] - liczby[x] > 1:
			print('NO')
			break
	else:
		print('YES')


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().strip().split()))[:a]
	c = list(set(b))
	d = max(c)
	e = min(c)
	if d - e < len(c):
		print('YES')
	else:
		print('NO')


def fun():
	t = int(input())
	for _ in range(t):
		num = int(input())
		li = list(map(int, input().split()))
		flag = True
		if num == 1:
			print('YES')
			continue
		li.sort()
		flag = False
		for i in range(num - 1):
			if li[i] + 1 == li[i + 1] or li[i] == li[i + 1]:
				continue
			else:
				flag = True
		if flag:
			print('NO')
		else:
			print('YES')
fun()


a = int(input())
for i in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	c.sort()
	h = 0
	for j in range(b - 1):
		if abs(c[j] - c[j + 1]) > 1:
			h = 1
			print('NO')
			break
	if h == 0:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	l1 = list(map(int, input().strip().split()))
	l1.sort()
	flag = 0
	for i in range(0, n - 1):
		if l1[i + 1] - l1[i] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	elif flag == 0:
		print('YES')
	t -= 1


from collections import defaultdict as dfd
import math
import sys
import heapq

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

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

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

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

def main():
	for _ in range(int(input())):
		N = II()
		A = LI()
		A.sort()
		if N == 1:
			print('YES')
		else:
			val = 0
			for i in range(1, len(A)):
				if abs(A[i] - A[i - 1]) <= 1:
					val += 1
			if val == N - 1:
				print('YES')
			else:
				print('NO')
main()


import sys, math
for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	ans = 'YES'
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			ans = 'NO'
			break
	print(ans)


b = int(input())
for k in range(b):
	c = int(input())
	a = list(map(int, input().split()))
	odd = False
	even = False
	for j in a:
		if j % 2 == 0:
			even = True
		else:
			odd = True
		if even == True and odd == True:
			break
	if even == True and odd == False:
		print('NO')
	elif even == False and odd == True:
		if c % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


def rem():
	for i in range(len(sz) - 1):
		if sz[i] % 2 == 1 and sz[i + 1] % 2 == 0 or (sz[i] % 2 == 0 and sz[i + 1] % 2 == 1):
			return True
	return False
t = int(input())
for _ in range(t):
	n = input()
	sz = list(map(int, input().split()))
	if sum(sz) % 2 == 1:
		print('YES')
	elif rem():
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(0, a):
	b = int(input())
	c = [int(x) for x in input().split()]
	summ = 0
	odd = 0
	even = 0
	for j in range(0, b):
		summ += c[j]
		if c[j] % 2 == 0:
			even = 1
		else:
			odd = 1
	if summ % 2 != 0 or (even == 1 and odd == 1):
		print('YES')
	else:
		print('NO')


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	che = 0
	notch = 0
	for i in range(n):
		if a[i] % 2 == 0:
			che += 1
		else:
			notch += 1
	if sum(a) % 2 != 0 or (che >= 1 and notch >= 1):
		print('YES')
	else:
		print('NO')


def all_chet(l):
	for i in l:
		if i & 1:
			return False
	return True

def all_nechet(l):
	for i in l:
		if not i & 1:
			return False
	return True
t = int(input())
for i in range(t):
	n = int(input())
	arr = eval(input().replace(' ', ','))
	if n == 1:
		if not arr & 1:
			print('NO')
		else:
			print('YES')
	elif sum(arr) & 1:
		print('YES')
	elif all_chet(arr) or all_nechet(arr):
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	h = int(input())
	l = list(map(int, input().split()))
	c = 0
	for j in range(len(l)):
		if l[j] % 2 == 1:
			c = c + 1
	if c == len(l):
		if c % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif c != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
o = []
for each in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	c = 0
	if n > 1:
		for i in range(0, n - 1):
			if abs(a[i] - a[i + 1]) <= 1:
				c += 1
			else:
				break
		if c == n - 1:
			o.append('YES')
		else:
			o.append('NO')
	elif n == 1:
		o.append('YES')
for i in o:
	print(i)


n = int(input())
for i in range(n):
	x = int(input())
	l = list(map(int, input().split()))
	l.sort()
	a = 'YES'
	i = 0
	j = 1
	while j < len(l):
		if l[j] - l[i] > 1:
			a = 'NO'
			j = len(l) + 4
		else:
			i += 1
			j += 1
	print(a)


def solve(array):
	if len(array) == 1:
		return True
	array.sort()
	for index in range(0, len(array) - 1):
		(left, right) = (array[index], array[index + 1])
		if abs(left - right) > 1:
			return False
	return True
number_of_cases = int(input().strip())
for i in range(number_of_cases):
	try:
		array_len = int(input().strip())
		array = list(input().split())
		array = [int(n) for n in array if n != ' ' or n != '']
		if solve(array):
			print('YES')
		else:
			print('NO')
	except Exception as e:
		print(f'{e}')


tests = int(input())
for i in range(tests):
	length = int(input())
	l = list(map(int, input().split()))
	l.sort()
	j = 0
	if len(l) > 1:
		while len(l) != 2:
			if int(l[j + 1]) - int(l[j]) <= 1:
				l.remove(l[j])
			else:
				j += 1
			if j == len(l) - 1:
				break
		if len(l) == 2:
			if int(l[1]) - int(l[0]) <= 1:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('YES')


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
sys.setrecursionlimit(200000)
decimal.getcontext().prec = 46

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

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

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

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

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

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

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

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

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

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	maxint = 10 ** 10
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def solve():
	int(input())
	arr = sorted(list(set(list_input())))
	n = len(arr)
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			return
	print('YES')
t = 1
t = int(input())
for _ in range(t):
	solve()


def ques1(n, a):
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	ans = ques1(n, a)
	ans


for _ in range(int(input())):
	input()
	nums = list(map(int, input().split()))
	has_odd = any(map(lambda x: x & 1 == 1, nums))
	has_even = any(map(lambda x: x & 1 == 0, nums))
	if len(nums) & 1 == 0:
		print('YES' if has_odd and has_even else 'NO')
	else:
		print('YES' if has_odd else 'NO')


n = int(input())
for i in range(0, n):
	k = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	b = False
	for j in range(1, k):
		if arr[j] - arr[j - 1] > 1:
			b = True
			break
	if b:
		print('NO')
	else:
		print('YES')


def solve():
	n = int(input())
	nums = list(map(lambda x: int(x), input().split()))
	nums.sort()
	num_bef = nums[0]
	for i in range(1, n):
		num = nums[i]
		if num_bef + 1 < num:
			return 'NO'
		num_bef = num
	return 'YES'
n = int(input())
for i in range(n):
	result = solve()
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	p = list(map(int, input().split()))
	p.sort()
	a = 0
	if len(p) == 1:
		print('YES')
		continue
	else:
		for i in range(n - 1):
			p[i] = abs(p[i] - p[i + 1])
			if p[i] == 0 or p[i] == 1:
				a = 1
			else:
				a = 0
				break
	if a == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	numodd = 0
	for x in l:
		if x & 1 == 1:
			numodd += 1
	if numodd == 0:
		print('NO')
	elif numodd & 1 == 1:
		print('YES')
	elif n - numodd > 0:
		print('YES')
	else:
		print('NO')


import math
n = int(input(''))
for i in range(0, n):
	f = int(input(''))
	inp = list(map(int, input().split()))
	sum = 0
	count = 0
	for k in range(0, len(inp)):
		if inp[k] % 2 != 0:
			sum += inp[k]
			count += 1
	if count % 2 == 1 or 0 < count < f:
		print('YES')
	else:
		print('NO')


import sys
from collections import defaultdict
t = 1
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, sys.stdin.readline().strip().split()))
	a.sort()
	f = 0
	for j in range(1, n):
		if a[j] > a[j - 1] + 1:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(0, t):
	n = int(input())
	evencount = 0
	oddcount = 0
	a = [int(x) for x in input().split()]
	for j in range(0, n):
		if a[j] % 2 == 1:
			oddcount += 1
		else:
			evencount += 1
	if oddcount == 0:
		print('NO')
	elif oddcount == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	if sum(a) % 2 == 1:
		print('YES')
		continue
	b = [i % 2 for i in a]
	if sum(b) == 0 or sum(b) == n:
		print('NO')
	else:
		print('YES')


n = 0
l = []
d = 0
x = 0
k = []
t = int(input())
for i in range(t):
	n += int(input())
	l += list(map(int, input().split()))
	for j in l:
		if j % 2 == 1:
			d += 1
		else:
			x += 1
	if d % 2 == 0:
		if d == 0:
			k.append('NO')
		elif x % 2 == 0:
			if x == 0:
				k.append('NO')
			else:
				k.append('YES')
		else:
			k.append('YES')
	else:
		k.append('YES')
	n = 0
	l = []
	d = 0
	x = 0
for i in range(t):
	print(k[i])


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


for _ in range(int(input())):
	n = int(input())
	a = sorted([*map(int, input().split())])
	ok = 'Yes'
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			ok = 'No'
			break
	print(ok)


def check(a, n):
	a.sort()
	flag = 0
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			return False
	return True
t = int(input())
while t:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	if check(a, n):
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	flag = False
	for i in range(n - 1):
		if A[i + 1] - A[i] > 1:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	a = int(input())
	d = list(map(int, input().split()))
	d.sort()
	for i in range(a - 1):
		if d[i + 1] - d[i] > 1:
			print('NO')
			break
	else:
		print('YES')


def smallest(a, n):
	l = len(a)
	s = a[0]
	for i in range(0, n):
		if abs(a[i] - s) > 1:
			return 'NO'
		s = a[i]
	return 'YES'
for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	print(smallest(arr, n))


t = int(input())
for i in range(t):
	n = int(input())
	numbers = list(map(int, input().split()))
	oddflag = False
	evenflag = False
	for number in numbers:
		if number % 2:
			oddflag = True
		else:
			evenflag = True
		if oddflag and evenflag:
			break
	if oddflag and evenflag:
		print('YES')
	elif oddflag:
		if n % 2:
			print('YES')
		else:
			print('NO')
	elif evenflag:
		print('NO')


import sys
lines = []
for line in sys.stdin:
	if 'exit' == line.rstrip():
		break
	lines.append(line)
t = int(lines[0])
for case in range(1, 2 * t + 1, 2):
	n = int(lines[case])
	a = [int(x) for x in lines[case + 1].split(' ')]
	a = sorted(a)
	possible = True
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			possible = False
			print('NO')
			break
	if possible:
		print('YES')


t = int(input())
for i in range(t):
	o = 0
	e = 0
	n = int(input())
	x = list(map(int, input().split()))
	for k in range(0, n):
		if x[k] % 2 == 0:
			e = e + 1
		else:
			o = o + 1
	if o == n and x[0] % 2 != 0:
		if o % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif o > 0 and e > 0:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for t1 in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	l.sort()
	f = 0
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	size = int(input())
	array = tuple(map(int, input().split()))
	ev = False
	odd = False
	for j in array:
		if j % 2 == 0:
			ev = True
		else:
			odd = True
		if odd and ev:
			print('YES')
			break
	else:
		if odd and size % 2 == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	s = True
	n = int(input())
	a = map(int, input().split())
	a = sorted(list(set(a)))
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			s = False
			break
	print('YES' if s else 'NO')


def calc(a):
	if not a:
		return False
	a = sorted(a)
	for i in range(len(a) - 1):
		if a[i] < a[i + 1] - 1:
			return False
	return True
T = int(input())
for t in range(T):
	N = int(input())
	a = [int(x) for x in input().split()]
	assert len(a) == N
	r = calc(a)
	print('YES' if r else 'NO')


for _ in range(int(input())):
	(__, a, res) = (input(), sorted([int(i) for i in input().split()]), 'YES')
	for (i, e) in enumerate(a[:-1]):
		if a[i + 1] > e + 1:
			res = 'NO'
	print(res)


q = int(input())
for i in range(q):
	n = int(input())
	a = [int(i) for i in input().split()]
	k_n = 0
	for j in range(n):
		if a[j] & 1:
			k_n += 1
	if k_n == n and n % 2 == 0:
		print('NO')
	elif k_n == 0:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	istrue = False
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			istrue = True
			break
	if istrue:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	p = 1
	while len(a) > 1:
		if a[1] - a[0] > 1:
			p = 0
			break
		else:
			del a[0]
	if len(a) == 1 and p == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for w in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	c = 0
	for i in range(n):
		if a[i] % 2 != 0:
			c += 1
	if c > 0:
		if c == n and n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a) = (int(input()), sum(map(lambda x: int(x) % 2, input().split())))
	print(('NO', 'YES')[a != 0 and (a % 2 == 1 or a < n)])


for i in range(int(input())):
	n = input()
	a = list(map(int, input().split()))
	a.sort()
	c = 0
	for i in range(len(a) - 1):
		if abs(a[i + 1] - a[i]) > 1:
			c += 1
			print('NO')
			break
	if c == 0:
		print('YES')


import math
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
		continue
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) == 0 or abs(l[i] - l[i - 1]) == 1:
			continue
		else:
			print('NO')
			break
	else:
		print('YES')


def parse_array(array_str, n):
	array_str = array_str.split(sep=' ')
	arr = {}
	max_num = 0
	count = 0
	for i in range(0, n):
		num = int(array_str[i])
		if num > max_num:
			max_num = num
		if num in arr:
			continue
		arr[num] = num
		count = count + 1
	return (max_num, count, arr)

def one_element_possible(max_num, count, arr):
	ans = True
	for i in range(count, 0, -1):
		if max_num in arr:
			max_num = max_num - 1
			continue
		ans = False
		break
	return ans
test_cases = int(input(''))
for a in range(0, test_cases):
	n = int(input(''))
	array_str = input('')
	if n <= 0:
		print('NO')
		continue
	(max_num, count, arr) = parse_array(array_str, n)
	if count == 1:
		print('YES')
		continue
	ans = one_element_possible(max_num, count, arr)
	if ans == True:
		print('YES')
		continue
	print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	inp = [int(item) for item in input().split(' ')]
	inp.sort()
	if n == 1:
		print('YES')
	else:
		ans = 'YES'
		for j in range(0, n - 1):
			if inp[j + 1] - inp[j] > 1:
				ans = 'NO'
				break
		print(ans)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	has_even = has_odd = False
	for i in a:
		if i % 2 == 0:
			has_even = True
		else:
			has_odd = True
		if has_even and has_odd:
			break
	if has_even and has_odd:
		print('YES')
	elif has_odd and n % 2 == 1:
		print('YES')
	else:
		print('NO')


x = int(input())
li2 = []
for i in range(x):
	m = int(input())
	li = list(map(int, input().split()))
	li.sort()
	for i in range(len(li) - 1):
		if li[i + 1] - li[i] > 1:
			li2.append('No')
			break
	else:
		li2.append('Yes')
for i in range(len(li2)):
	print(li2[i])


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

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

	def In():
		return map(int, input().split())
else:

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

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

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		n = I()
		l = list(In())
		l.sort()
		flag = 0
		for i in range(1, n):
			if l[i] - l[i - 1] >= 2:
				flag = 1
				break
		if flag == 1:
			no()
		else:
			yes()
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


from sys import stdin
n = int(stdin.readline())
for _ in range(n):
	stdin.readline()
	nums = list(map(int, stdin.readline().rstrip().split(' ')))
	nums.sort()
	ans = True
	for i in range(len(nums) - 1):
		if nums[i + 1] - nums[i] >= 2:
			ans = False
			break
	print('YES' if ans else 'NO')


def check(n, a):
	if sum(a) % 2 == 1:
		return 'Yes'
	else:
		k = a[0] % 2
		for i in range(1, n):
			if a[i] % 2 != k:
				return 'Yes'
		else:
			return 'No'
t = int(input())
for i in range(t):
	n = int(input())
	a = input().split(' ')
	a = list(map(int, a))
	print(check(n, a))


def main():
	t = Iint()
	for _ in range(t):
		n = Iint()
		a = Ilist()
		a.sort()
		x = a[0]
		for i in range(1, n):
			if a[i] - x <= 1:
				x = a[i]
				continue
			else:
				print('NO')
				break
		else:
			print('YES')
FIO = 10

def I():
	return input()

def Iint():
	return int(input())

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

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

def Plist(li, s=' '):
	print(s.join(map(str, li)))
en = enumerate

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
if not FIO:
	if __name__ == '__main__':
		main()
		exit()
else:
	from io import BytesIO, IOBase
	import sys
	import os
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')
main()


n = int(input())
for _ in range(n):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			break
	else:
		print('Yes')


def add(n):
	o = 0
	e = 0
	sum = 0
	a = []
	a = list(map(int, input().split(' ')))
	for i in range(n):
		sum += a[i]
		if a[i] % 2 == 0:
			e = e + 1
		else:
			o = o + 1
	if sum % 2 == 0:
		if o == 0 or (o % 2 == 0 and e == 0):
			print('NO')
		else:
			print('YES')
	else:
		print('YES')
t = int(input())
for i in range(t):
	n = int(input())
	add(n)


t = int(input())
for x in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	y = 0
	while y <= n - 2:
		if abs(int(arr[y + 1]) - int(arr[y])) <= 1:
			pass
		else:
			print('NO')
			break
		y = y + 1
	if y == n - 1:
		print('YES')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	o = 0
	e = 0
	for i in a:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0:
		print('NO')
	elif e == 0:
		if o % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')
	t -= 1


def sol():
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr = sorted(arr)
	for i in range(n - 1):
		if abs(arr[i + 1] - arr[i]) > 1:
			print('NO')
			return
	print('YES')
for _ in range(int(input())):
	sol()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	count = 0
	i = 0
	for j in range(1, n):
		if abs(arr[j] - arr[i]) > 1:
			count += 1
		if count == 1:
			print('NO')
			break
		i += 1
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split(' ')))
	a_min = min(a)
	a_max = max(a)
	i = a_min
	flag = 1
	while i < a_max:
		if i + 1 not in a:
			flag = 0
			break
		else:
			i += 1
	if flag == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	r = 1
	for j in range(1, n):
		if a[j] - a[j - 1] > 1:
			r = 0
			break
	if r == 1:
		print('YES')
	else:
		print('NO')


import sys, math
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	n = inp()
	a = inlt()
	even_count = 0
	odd_count = 0
	for i in range(len(a)):
		if a[i] & 1 == 1:
			odd_count += 1
		else:
			even_count += 1
	if len(a) % 2 == 0 and odd_count >= 1 and (even_count >= 1):
		print('YES')
	elif len(a) % 2 != 0 and odd_count >= 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().strip().split(' ')))
	arr.sort()
	ans = 'YES'
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


a = int(input())
for i in range(a):
	b = int(input())
	c = [int(s) for s in input().split()]
	c.sort()
	ll = 'YES'
	for k in range(1, len(c)):
		if c[k] - c[k - 1] > 1:
			ll = 'NO'
			break
	print(ll)


t = int(input())
while t > 0:
	n = int(input())
	arr = [int(i) for i in input().split()]
	odd = 0
	even = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if n % 2 == 0 and odd >= 1 and (even >= 1):
		print('YES')
	elif n % 2 == 0 and odd == 0 and (even >= 1):
		print('NO')
	elif n % 2 == 0 and odd >= 1 and (even == 0):
		print('NO')
	elif n % 2 == 1 and odd >= 1:
		print('YES')
	elif n % 2 == 1 and odd == 0 and (even >= 1):
		print('NO')
	t -= 1


def SUM(l):
	s = 0
	for i in l:
		s = s + i
	return s
n = int(input())
l1 = []
for i in range(n):
	m = int(input())
	l = list(map(int, input().split()))
	s = SUM(l)
	if s % 2 != 0:
		l1.append('YES')
	elif m >= 2000:
		l1.append('NO')
	else:
		flag = 0
		for k in range(len(l)):
			if flag == 1:
				break
			for r in range(len(l) - 1):
				l2 = l
				l2[k] = l2[r]
				if SUM(l2) % 2 != 0:
					l1.append('YES')
					flag = 1
					break
		if flag == 0:
			l1.append('NO')
for i in l1:
	print(i)


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	cur = a[0]
	flag = 0
	for i in a[1:]:
		if i - cur > 1:
			flag = 1
		cur = i
	print(['YES', 'NO'][flag])


t = int(input())
for g in range(t):
	c = 0
	f = 0
	n = int(input())
	l = [int(x) for x in str(input()).split()]
	for i in l:
		if i % 2 == 1:
			f += 1
	if f == 0:
		print('NO')
		continue
	elif n % 2 != 0:
		print('YES')
		continue
	elif n == f:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	f = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			f = 0
	if f:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = 0
	n = int(input())
	arr = list(set(map(int, input().split())))
	arr.sort()
	for j in range(len(arr) - 1):
		if arr[j + 1] - arr[j] > 1:
			a += 1
	if a > 0:
		print('NO')
	else:
		print('YES')


class Solution:

	def solve(self, arr):
		n = len(arr)
		oddCount = 0
		evenCount = 0
		totalSum = 0
		for num in arr:
			if num % 2 != 0:
				oddCount += 1
			else:
				evenCount += 1
			totalSum += num
		if totalSum % 2 != 0:
			return True
		if oddCount == n and n % 2 == 0:
			return False
		if oddCount == 0:
			return False
		return True
sol = Solution()
t = int(input().strip())
for i in range(t):
	n = int(input().strip())
	arr = list(map(int, input().strip().split()))
	print('YES' if sol.solve(arr) else 'NO')


no = int(input())
for i in range(no):
	l = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	for i in range(0, l - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


for testcases in range(int(input())):
	num = int(input())
	a = list(map(int, input().split()))
	flag = 0
	a.sort()
	if num == 1:
		flag = 0
	else:
		test = 0
		while test != num - 1:
			if a[test + 1] - a[test] > 1:
				flag = 1
				break
			else:
				test += 1
	if flag == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	y = int(input())
	x = list(map(int, input().split()))
	x.sort()
	j = y
	while j > 0:
		if j == 1:
			break
		if abs(x[0] - x[1]) <= 1:
			x.remove(x[0])
			j -= 1
		else:
			break
	if len(x) == 1:
		print('Yes')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	while i < len(a):
		j = i + 1
		t = 0
		while j < len(a):
			if a[j] - a[i] == 1:
				a.remove(a[i])
				t = 67
				break
			elif a[j] - a[i] == -1:
				a.remove(a[j])
			elif a[j] == a[i]:
				a.remove(a[i])
			else:
				j = j + 1
		if t != 67:
			i = i + 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout

def isOddSum(array):
	sum = 0
	hasEven = False
	hasOdd = False
	for element in array:
		sum += element
		if element % 2 == 0:
			hasEven = True
		else:
			hasOdd = True
	if sum % 2 != 0 or (hasOdd and hasEven):
		return 'YES'
	return 'NO'

def main():
	testCases = int(stdin.readline())
	for _ in range(testCases):
		n = int(stdin.readline())
		array = list(map(int, stdin.readline().split()))
		stdout.write(f'{isOddSum(array)}\n')
main()


for ad in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l = list(set(l))
	n = len(l)
	l.sort()
	t = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			t = 1
			break
	if t == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for z in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	b = True
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			b = False
	if b:
		print('YES')
	else:
		print('NO')


t = int(input())

def rs(arr):
	for i in range(1, len(arr)):
		if abs(arr[i] - arr[i - 1]) <= 1:
			continue
		else:
			return 0
	return 1
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if len(arr) == 1:
		print('YES')
	elif rs(arr) == 1:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	l = list(set(list(map(int, input().split()))))
	l.sort()
	flag = True
	for i in range(len(l) - 1):
		if l[i] == l[i + 1] - 1:
			x = 0
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


entrada1 = int(input())
for _ in range(entrada1):
	entrada2 = int(input())
	oddNumber = 0
	evenNumber = 0
	entrada3 = str(input()).split(' ')
	tam = len(entrada3) - 1
	j = 0
	while j <= tam:
		if int(entrada3[j]) % 2 == 0:
			evenNumber = evenNumber + 1
		elif int(entrada3[j]) % 2 != 0:
			oddNumber = oddNumber + 1
		j = j + 1
	if oddNumber == entrada2 and entrada2 % 2 == 0:
		print('NO')
	elif entrada2 == evenNumber:
		print('NO')
	else:
		print('YES')


def main():

	def solve():
		n = int(input())
		aa = [int(a) for a in input().split()]
		ocount = 0
		for a in aa:
			if a % 2 == 1:
				ocount += 1
		if ocount % 2 == 1 or (ocount > 0 and ocount < n):
			print('YES')
		else:
			print('NO')
	q = int(input())
	for _ in range(q):
		solve()
main()


import sys

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


T = int(input())
for cs in range(T):
	n = int(input())
	a = map(int, input().split())
	foundo = False
	founde = False
	for x in a:
		if x & 1:
			foundo = True
		else:
			founde = True
	if n & 1:
		if foundo:
			print('YES')
		else:
			print('NO')
	elif founde and foundo:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ok = True
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			ok = False
	print('YES') if ok else print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	k = sum(a)
	if k % 2 == 1:
		print('YES')
	elif k % 2 == 0:
		b = list(filter(lambda x: x % 2, a))
		c = list(filter(lambda x: x % 2 - 1, a))
		if b == a or c == a:
			print('NO')
		else:
			print('YES')


T = int(input())
for case in range(T):
	n = int(input())
	a = list(map(int, input().strip().split()))
	cnt = 0
	for x in a:
		if x & 1 == 1:
			cnt += 1
	ok = cnt & 1
	if not ok:
		ok = cnt != n and cnt
	print('YES' if ok else 'NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = 0
	o = 0
	e = 0
	if len(l) == 1:
		if l[0] % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		for j in range(n):
			if l[j] % 2 == 0:
				e += 1
			else:
				o += 1
			s = s + l[j]
		if s % 2 != 0:
			print('YES')
		elif o != 0 and e != 0:
			print('YES')
		else:
			print('NO')


def print_result(x, y):
	y.sort()
	ok = True
	for i in range(1, len(y)):
		ok = ok and abs(y[i] - y[i - 1]) <= 1
	if ok == True:
		print('YES')
	else:
		print('NO')
n = int(input())
for i in range(n):
	x = int(input())
	y = list(map(int, input().split()))
	print_result(x, y)
	n -= 1


t = int(input())
for i in range(t):
	x = 0
	y = 0
	l = int(input())
	s = list(map(int, input().split()))
	if sum(s) % 2 == 1:
		print('YES')
	else:
		for j in range(len(s)):
			if s[j] % 2 == 1:
				y = y + 1
			else:
				x = x + 1
		if x == 0 or y == 0:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	if sum(l) % 2 != 0:
		print('yes')
	else:
		count = 0
		for i in range(n):
			if l[i] % 2 == 0:
				count += 1
		if count == 0 or count == n:
			print('no')
		else:
			print('yes')


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def solve(n, a):
	a = sorted(a)
	if len(a) == 1:
		return True
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			return False
	return True
for _ in tests():
	n = int_in()
	a = arr_in()
	bool_out(solve(n, a))


t = int(input())
for i in range(0, t):
	n = int(input())
	arr = []
	arr = list(map(int, input().strip().split()))
	arr.sort()
	done = 0
	for j in range(0, n - 1):
		if arr[j + 1] - arr[j] > 1:
			print('NO')
			done = 1
			break
	if done == 0:
		print('YES')


T = int(input())
while T > 0:
	size = int(input())
	array = []
	array = list(map(int, input().split()))
	array.sort()
	counter = 0
	for i in range(size - 1):
		if array[i + 1] - array[i] > 1:
			counter += 1
	print('YES') if counter == 0 else print('NO')
	T = T - 1


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	x.sort()
	if n == 1:
		print('YES')
		continue
	f = 0
	for i in range(1, n):
		if x[i] == x[i - 1] or x[i] == x[i - 1] + 1:
			continue
		else:
			f = 1
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
s = 0
while s < t:
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	res = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			res = 'NO'
	print(res)
	s = s + 1


for _ in range(int(input())):
	n = int(input())
	s = set(map(int, input().split()))
	print('YES' if max(s) - min(s) < len(s) else 'NO')


output = []
for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	if n == 1:
		output.append('YES')
	else:
		m = n
		for _ in range(n - 1):
			if abs(arr[_] - arr[_ + 1]) == 1 or abs(arr[_] - arr[_ + 1]) == 0:
				m -= 1
			else:
				output.append('NO')
				break
		if m == 1:
			output.append('YES')
for _ in output:
	print(_)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	ans = None
	l_new = set(l)
	if len(l_new) == 1:
		ans = 'YES'
	else:
		l_new = list(l_new)
		l_new.sort()
		while len(l_new) != 1:
			if l_new[1] - l_new[0] > 1:
				ans = 'NO'
				break
			else:
				ans = 'YES'
				del_ele = l_new[0]
				l_new.remove(del_ele)
	print(ans)


t = int(input())
for i in range(0, t):
	n = int(input())
	cin = input()
	vect = list(map(int, cin.split(' ')))
	vect.sort()
	isValid = True
	for h in range(0, n - 1):
		if vect[h + 1] - vect[h] > 1:
			print('NO')
			isValid = False
			break
	if isValid:
		print('YES')


n = int(input())
arr = []
for i in range(n):
	x = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	ok = True
	for c in range(1, len(arr)):
		if arr[c] - arr[c - 1] > 1:
			ok = False
	if ok:
		print('YES')
	else:
		print('NO')


t = int(input())
count = 0
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a = [i % 2 for i in a]
	total = len(a)
	even_count = a.count(0)
	odd_count = a.count(1)
	if odd_count == 0:
		print('NO')
	elif odd_count % 2 != 0 and even_count != 0:
		print('YES')
	elif odd_count % 2 == 0 and even_count != 0:
		print('YES')
	elif even_count == 0 and odd_count % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	length = int(input())
	arr = [int(x) for x in input().split()]
	even = False
	odd = False
	for j in arr:
		if j % 2 == 0:
			even = True
		else:
			odd = True
		if even and odd:
			break
	if odd and even or (odd and (not even) and (length % 2 == 1)):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	boo = True
	arr.sort()
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			print('NO')
			boo = False
			break
	if boo:
		print('YES')


def scanInt():
	return int(input())

def scanList():
	return [i for i in input().split(' ')]

def scanIntList():
	return [int(i) for i in scanList()]
t = scanInt()
for _ in range(t):
	n = scanInt()
	a = scanIntList()
	a.sort()
	ok = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ok = False
	if ok:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().strip().split()[:n]))
	l.sort()
	for x in range(n - 1, 0, -1):
		if l[x] - l[x - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for count in range(t):
	n = int(input())
	lst = [int(x) for x in input().split(' ')]
	summ = 0
	for i in range(n):
		if (lst[i] + summ) % 2 != 0:
			summ += lst[i]
		else:
			for j in range(i - 1, -1, -1):
				if (summ + lst[j]) % 2 != 0:
					summ += lst[j]
					break
			else:
				summ += lst[i]
	if summ % 2 == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	if n == 1:
		print('YES')
		continue
	fl = 0
	for i in range(n - 1):
		var = abs(ar[i] - ar[i + 1])
		if var > 1:
			fl = 1
			break
	if fl == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		even = 0
		odd = 0
		for i in l:
			if even == 1 and odd == 1:
				break
			elif i % 2 == 0:
				even = 1
			elif i % 2 != 0:
				odd = 1
		if even == 1 and odd == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [] * n
	d = [] * (n - 1)
	a = [int(i) for i in input().split()]
	if n == 1:
		print('YES')
		continue
	i = n - 1
	a.sort()
	while i > 0:
		if a[i - 1] != a[i] and a[i - 1] + 1 != a[i]:
			print('NO')
			break
		i -= 1
	if i == 0:
		print('YES')


for _ in range(int(input())):
	f = 0
	n = int(input())
	a = list(map(int, input().split()))
	x = list(set(a))
	if len(x) == 1:
		print('YES')
		continue
	else:
		y = [each for each in x]
		for i in range(len(x)):
			if f:
				break
			for j in range(len(x)):
				if len(y) == 1:
					f = 1
					print('YES')
					break
				if abs(x[j] - x[i]) == 1:
					try:
						y.remove(min(x[j], x[i]))
					except:
						pass
	if f == 0:
		print('NO')


for _ in range(int(input())):
	(n, l) = (int(input()), map(int, input().split()))
	i = sum((i % 2 for i in l))
	print(['NO', 'YES'][(n - i > 0) & (i > 0) | i % 2])


a = int(input())
for i in range(a):
	b = int(input())
	c = input()
	arr = c.split(' ')
	even = False
	odd = False
	for j in arr:
		j = int(j)
		if j % 2 == 0:
			even = True
		else:
			odd = True
	if even == True and odd == True:
		print('YES')
	elif even == True and odd == False:
		print('NO')
	elif odd == True and even == False:
		if b % 2 == 0:
			print('NO')
		else:
			print('YES')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	_ = int(input())
	a = [int(j) for j in input().split()]
	a.sort()
	res = True
	for j in range(1, len(a)):
		if a[j] > a[j - 1] + 1:
			res = False
			break
	print('YES' if res else 'NO')


t = int(input())

def rem_small(n, a, i):
	a.sort()
	if n == 1:
		return 'YES'
	elif abs(a[i - 1] - a[i]) <= 1:
		a.remove(min(a[i], a[i - 1]))
		i = 0
		return rem_small(n - 1, a, i)
	elif abs(a[i - 1] - a[i]) > 1:
		if i == n - 1:
			return 'NO'
		else:
			return rem_small(n, a, i + 1)
	else:
		return 'NO'
for i in range(t):
	n = int(input())
	a = [int(z) for z in input().split()]
	i = 1
	print(rem_small(n, a, i))


def solve():
	n = int(input())
	lst = list(map(int, input().split()))
	if len(set(lst)) == 1:
		print('YES')
		return
	ans = [i for i in range(min(lst), max(lst) + 1)]
	lst = list(set(lst))
	lst.sort()
	if lst == ans:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	solve()


T = int(input())
for i in range(T):
	N = int(input())
	L = list(map(int, input().split()))
	L.sort()
	count = 0
	for j in range(N):
		for k in range(j + 1, N):
			K = L[j] - L[k]
			if K < 0:
				K = K * -1
			if K <= 1:
				count += 1
				break
	if N - count == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for test in range(t):
	n = int(input())
	arr = sorted(list([int(i) for i in input().split(' ')]))
	check_list = [arr[i + 1] - arr[i] <= 1 for i in range(n - 1)]
	if all(check_list):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	isOdd = [x for x in a if x % 2 == 1]
	isEven = [x for x in a if x % 2 == 0]
	if sum(a) % 2 == 1 or (isOdd and n % 2 == 1) or (isOdd and isEven and (n % 2 == 0)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ls = list(map(int, input().split()))
	p = []
	counte = 0
	counto = 0
	for i in ls:
		if i % 2 == 1:
			counto += 1
			p.append(1)
		else:
			counte += 1
			p.append(0)
	if counto == 0:
		print('NO')
		continue
	if counto % 2 == 0:
		if counte == 0:
			print('NO')
			continue
	print('YES')


import math
import os
import random
import re
import string
from sys import *
from collections import *

def bs(arr, x, l, r):
	if l <= r:
		mid = (r + l) // 2
		if arr[mid] == x:
			return mid
		elif arr[md] > x:
			return bs(arr, x, l, mid - 1)
		else:
			return bs(arr, x, mid + 1, r)
	else:
		return -1

def solve():
	for _ in range(int(stdin.readline())):
		n = int(stdin.readline())
		l = list(map(int, stdin.readline().strip().split()))
		if n == 1:
			print('YES')
		else:
			l.sort()
			f = 1
			for i in range(n - 1):
				if l[i + 1] - l[i] <= 1:
					continue
				else:
					f = 0
					break
			if f == 1:
				print('YES')
			else:
				print('NO')
solve()


cases = int(input())

def hasOdds(nums):
	for x in nums:
		if x % 2 == 1:
			return True
	return False

def hasEvens(nums):
	for x in nums:
		if x % 2 == 0:
			return True
	return False
for i in range(0, cases):
	n = int(input())
	nums = list(map(int, input().split(' ')))
	if n % 2 == 1:
		print('YES') if hasOdds(nums) else print('NO')
	else:
		print('YES') if hasOdds(nums) and hasEvens(nums) else print('NO')


t = int(input())
for count in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sum = 0
	check = 0
	checkk = 0
	for i in range(n):
		sum += a[i]
		if a[i] % 2 == 0:
			check = 1
		else:
			checkk = 1
	if sum % 2 != 0:
		print('YES')
	elif check == 0:
		print('NO')
	elif checkk == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input(''))):
	n = int(input(''))
	l = list(map(int, input('').split(' ')))
	l = [x % 2 for x in l]
	if sum(l) % 2 == 1:
		print('YES')
	elif l.count(0) == len(l) or l.count(1) == len(l):
		print('NO')
	else:
		print('YES')


t = int(input())
for g in range(t):
	n = int(input())
	l = [int(x) for x in str(input()).split()]
	if sum(l) % 2 != 0:
		print('YES')
	else:
		_ = list(filter(lambda x: x % 2, l))
		__ = list(filter(lambda x: x % 2 == 0, l))
		if len(_) != 0 and len(__) != 0:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split(' '))))
	ans = 'YES'
	for j in range(len(arr) - 1):
		difference = abs(arr[j] - arr[j + 1])
		if difference > 1:
			ans = 'NO'
	print(ans)


import math
t = int(input())
for w in range(t):
	n = int(input())
	l = sorted([int(i) for i in input().split()])
	c = 1
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			c = 0
			break
	if c == 1:
		print('YES')
	else:
		print('NO')


import sys

def input():
	a = sys.stdin.readline()
	if a[-1] == '\n':
		a = a[:-1]
	return a

def print(*argv):
	n = len(argv)
	for i in range(n):
		if i == n - 1:
			sys.stdout.write(str(argv[i]) + '\n')
		else:
			sys.stdout.write(str(argv[i]) + ' ')

def lcm(x, y):
	from math import gcd
	return x * y / gcd(x, y)

def comb(lst, x):
	from itertools import combination as c
	return list(comb(lst, x))

def solve(n, lst):
	(odds, evens) = (0, 0)
	for i in lst:
		if i % 2:
			odds += 1
	evens = n - odds
	if odds == 0:
		return 'NO'
	if evens == 0 and n % 2 == 0:
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	print(solve(n, lst))


for _ in range(int(input())):
	_ = int(input())
	a = list(map(int, input().split()))
	count_odd = 0
	count_even = 0
	for el in a:
		if el % 2 == 1:
			count_odd += 1
		else:
			count_even += 1
	if count_odd % 2 == 1 or (count_odd > 0 and count_even > 0):
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	i = 0
	while i != len(l) - 1:
		if l[i + 1] - l[i] <= 1:
			l.remove(l[i])
		else:
			i = i + 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


import bisect
import math
for xoxo in range(1):
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		a = list(set(a))
		a.sort()
		ans = 'YES'
		for i in range(1, len(a)):
			if a[i] != a[i - 1] + 1:
				ans = 'NO'
		print(ans)


t = int(input())
while t:
	t -= 1
	n = int(input())
	lis = list(map(int, input().split()))
	evencount = 0
	oddcount = 0
	for i in range(n):
		if lis[i] % 2 == 1:
			oddcount += 1
		else:
			evencount += 1
	if oddcount == 0:
		print('NO')
		continue
	elif oddcount == n and n % 2 == 0:
		print('NO')
		continue
	else:
		print('YES')
		continue


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	n = ii()
	a = il()
	a.sort()
	c = 0
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			c = c + 1
			print('NO')
			break
	if c == 0:
		print('YES')


import io, os
R = lambda : map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	a = list(R())
	a.sort()
	cnt = 0
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			cnt += 1
	print(['YES', 'NO'][cnt != n - 1])


no_cases = int(input())

def is_possible(test_case):
	if len(test_case) == 1:
		return True
	elif test_case[1] - test_case[0] == 1 or test_case[1] == test_case[0]:
		return is_possible(test_case[1:])
	else:
		return False
for _ in range(no_cases):
	no_digits = int(input())
	test_case = [int(x) for x in input().split()]
	test_case.sort()
	print('YES' if is_possible(test_case) else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = []
	a[0:n] = map(int, input().split())
	l = list(set(a))
	zz = []
	count = 0
	a.sort()
	for i in range(len(a) - 1):
		j = i + 1
		if a[j] - a[i] > 1:
			count = 1
			break
	if count != 0:
		print('NO')
	else:
		print('YES')


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


test = int(input())
for t in range(test):
	n = int(input())
	L = list(map(int, input().split()))
	su = sum(L)
	if su % 2 == 1:
		print('YES')
		continue
	odds = [x for x in L if x % 2 == 1]
	evens = [x for x in L if x % 2 == 0]
	if len(odds) != 0 and len(evens) != 0:
		print('YES')
		continue
	print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	flag = 0
	if s % 2 != 0:
		print('YES')
	else:
		for i in l:
			if i % 2 != 0:
				flag += 1
		if flag != 0 and flag < len(l):
			print('YES')
		else:
			print('NO')


def rem_smallest(arr):
	arr = sorted(arr)
	n = len(arr)
	i = 0
	while i <= n - 2:
		if n > 1:
			if abs(arr[i + 1] - arr[i]) <= 1:
				arr.pop(i)
				i -= 1
		n = len(arr)
		i += 1
	if len(arr) == 1:
		return 'YES'
	else:
		return 'NO'
nbtests = int(input())
results = []
for _ in range(nbtests):
	arrlen = int(input())
	arr = list(map(int, input().rstrip().split()))
	res = rem_smallest(arr)
	results.append(res)
for res in results:
	print(res)


def is_possible(arr):
	odd = 0
	even = 0
	for num in arr:
		if num % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0 or (len(arr) % 2 == 0 and (odd == 0 or even == 0)):
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	_ = input()
	print(is_possible([int(i) for i in input().split()]))


for t in range(int(input())):
	n = int(input())
	flag = True
	a = list(map(int, input().strip().split()))
	b = set(a)
	(c, d) = (min(a), max(a))
	for i in range(c, d):
		if not i in b:
			flag = False
			print('NO')
			break
	if flag:
		print('YES')


import sys
input = sys.stdin.readline
inf = int(10000000000.0)
t = int(input())
while t:
	t -= 1
	n = int(input())
	lis = sorted(map(int, input().split()))
	g = 0
	for i in range(n - 1):
		if abs(lis[i] - lis[i + 1]) <= 1:
			continue
		else:
			g = 1
			break
	if g:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	Got = 0
	n = int(input())
	listed = list(map(int, input().split()))
	listed.sort()
	if len(listed) == 1:
		print('YES')
	else:
		for i in range(len(listed) - 1):
			if abs(listed[i] - listed[i + 1]) <= 1:
				Got = 'YES'
			else:
				Got = 'NO'
				print(Got)
				break
		if Got == 'YES':
			print(Got)


t = int(input())
for test in range(t):
	arr_len = int(input())
	arr = []
	arr = input().split(' ')
	arr = [int(a) for a in arr]
	arr.sort()
	flag = 0
	for ind in range(arr_len - 1):
		if int(arr[ind + 1]) - int(arr[ind]) > 1:
			pass
		else:
			flag += 1
	if flag == arr_len - 1:
		print('YES')
	else:
		print('NO')


q = int(input())
for i in range(q):
	n = int(input())
	e = sorted(list(set(map(int, input().split()))))
	for i in range(len(e) - 1):
		if e[i + 1] - e[i] > 1:
			print('NO')
			break
	else:
		print('YES')


n = int(input())
for i in range(n):
	num = int(input())
	lst = list(map(int, input().split()))
	even = 0
	odd = 0
	for j in lst:
		if j % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0 or (odd == num and num % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = map(int, input().split())
	a = sorted(a)
	ans = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans = 0
			break
	print('yes' if ans == 1 else 'no')


test = int(input())
while test:
	n = int(input())
	nums = list(map(int, input().split()))
	if n == 1:
		print('YES')
	elif nums.count(nums[0]) == n:
		print('YES')
	else:
		nums = sorted(nums)
		while True:
			n = len(nums)
			if len(nums) == 1:
				print('YES')
				break
			m1 = max(nums)
			m2 = max(nums[:n - 1])
			if m1 - m2 == 0 or m1 - m2 == 1:
				nums.remove(m1)
			else:
				print('NO')
				break
	test -= 1


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


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


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	su = 0
	odd = 0
	even = 0
	for i in range(n):
		su += l[i]
		if l[i] % 2 != 0:
			odd = 1
		else:
			even = 1
	if odd and even or su % 2 != 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	f = 0
	if n != 1:
		for i in range(n - 1):
			if abs(l[i] - l[i + 1]) <= 1:
				continue
			else:
				f = 1
				break
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split()
	t = 0
	p = 0
	for j in range(n):
		if int(a[j]) % 2 == 0:
			t += 1
		if n % 2 == 0 and int(a[j]) % 2 == 1:
			p += 1
	if t == n:
		print('NO')
	elif p == n:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	input()
	l = [int(x) for x in input().split()]
	ec = 0
	oc = 0
	s = 0
	for x in l:
		s += x
		if x % 2:
			oc += 1
		else:
			ec += 1
	if s % 2 == 1 or (oc > 0 and ec > 0):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(item) for item in input().split()]
	if sum(a) % 2 == 1:
		print('YES')
		continue
	has_odd = False
	has_even = False
	for item in a:
		if item % 2 == 1:
			has_odd = True
		else:
			has_even = True
	if has_odd and has_even:
		print('YES')
	else:
		print('NO')


import math
import sys
import collections
import bisect
from collections import defaultdict
from sys import stdin, stdout
MOD = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 7)

def take_root(num):
	return math.ceil(math.sqrt(num))

def sieve():
	limit = 86028121
	isprime = [1] * 86028122
	isprime[0] = 0
	isprime[1] = 0
	for i in range(2, take_root(limit + 1)):
		if isprime[i] == 1:
			for j in range(i * i, limit + 1, i):
				isprime[j] = 0
	primes = []
	for i in range(limit + 1):
		if isprime[i] == True:
			primes.append(i)
	return primes

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

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

def strinput():
	return input()

def linput():
	return list(map(int, input().split()))
for _ in range(iinput()):
	n = iinput()
	arr = linput()
	arr = set(arr)
	arr = list(arr)
	arr.sort()
	flag = 0
	for i in range(1, len(arr)):
		if abs(arr[i] - arr[i - 1]) != 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	odd = False
	for i in a:
		if i % 2 == 1:
			odd = 1
			break
	even = False
	for i in a:
		if i % 2 == 0:
			even = 1
			break
	if odd and even:
		print('YES')
	elif odd and n % 2 == 1:
		print('YES')
	else:
		print('NO')


for ik in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	f = 0
	a.sort()
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) <= 1:
			continue
		else:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


import sys
try:
	sys.stdin = open('inputs.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
finally:
	input = sys.stdin.readline
	print = sys.stdout.write
t = int(input())
for _ in range(t):
	out = 'YES'
	n = int(input())
	arr = sorted(map(int, input().split()))
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			out = 'NO'
			break
	print(out)
	print('\n')


test = int(input())
for i in range(test):
	n = int(input())
	l = input().split()
	l = [int(i) for i in l]
	k = set(l)
	k = list(k)
	k.sort()
	if len(k) == 1:
		print('YES')
	else:
		for i in range(len(k) - 1):
			if abs(k[i] - k[i + 1]) != 1:
				print('NO')
				break
		else:
			print('YES')


t = int(input())

def fun(n, a):
	a.sort()
	flag = 0
	i = 0
	while i < n - 1:
		if a[i + 1] - a[i] > 1:
			flag += 1
			break
		i += 1
	if flag:
		print('NO')
	else:
		print('YES')
while t:
	t -= 1
	n = int(input())
	a = [int(i) for i in input().split()]
	fun(n, a)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if len(l) == 1:
		print('YES')
		continue
	count = 0
	while True:
		j = 0
		a = l[j] - l[j + 1]
		if a < 0:
			a = a * -1
		else:
			a = a
		if a <= 1:
			del l[j]
		else:
			print('NO')
			count += 1
			break
		if len(l) == 1:
			print('YES')
			count += 1
			break
		j += 1
	if count == 0:
		print('NO')


for __ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	poo = False
	if n == 1:
		poo = False
	else:
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				poo = True
	if poo:
		print('NO')
	else:
		print('YES')


T = int(input())

def solve(a):
	a.sort()
	last = a[0]
	for i in a[1:]:
		if i > last + 1:
			return False
		last = i
	return True
for t in range(T):
	N = input()
	a = list(map(int, input().split()))
	if solve(a):
		print('YES')
	else:
		print('NO')


t = int(input())
ans = []
for kek in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ch = False
	nech = False
	for i in a:
		if i % 2 == 0:
			ch = True
		else:
			nech = True
	if ch and nech:
		ans.append('YES')
	elif nech == False:
		ans.append('NO')
	elif n % 2 == 1:
		ans.append('YES')
	else:
		ans.append('NO')
print(*ans, sep='\n')


def f(a, n):
	a.sort()
	for i in range(0, n - 1):
		if a[i + 1] - a[i] > 1:
			return False
	return True
t = int(input())
ans = []
for o in range(0, t):
	n = int(input())
	a = [int(it) for it in input().split(' ')]
	if f(a, n):
		ans.append('YES')
	else:
		ans.append('NO')
for it in ans:
	print(it)


t = int(input())
for jkl in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ch = 0
	nc = 0
	for i in range(n):
		if a[i] % 2 == 0:
			ch += 1
		else:
			nc += 1
	if n % 2 == 0 and ch != 0 and (nc != 0):
		print('YES')
	elif nc == 0:
		print('NO')
	elif ch == 0 and n % 2 != 0:
		print('YES')
	elif ch == 0 and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	lista = list(map(int, input().split()))
	lista.sort()
	flag = True
	for j in range(len(lista) - 1):
		if lista[j + 1] - lista[j] > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	f = 0
	e = 0
	o = 0
	for i in range(n):
		if a[i] % 2 == 1:
			o += 1
		else:
			e += 1
	if o % 2 == 1:
		print('YES')
	elif e > 0 and o > 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(q) % 2 for q in input().split()]
	if sum(a) % 2 == 1 or (0 in a and 1 in a):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		print('YES')
		continue
	od = 0
	for x in a:
		if x % 2 == 1:
			od += 1
	if od == 0 or (od == n and n % 2 == 0):
		print('NO')
		continue
	else:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	a = [int(i) for i in input().split()]
	co = 0
	ce = 0
	for i in a:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	if co % 2 != 0:
		print('YES')
	elif co == 0:
		print('NO')
	elif ce != 0 and co % 2 == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	c = 0
	if s % 2 == 0:
		for j in range(n):
			if l[j] % 2 != 0:
				c = c + 1
		if c > 0 and c < n:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
while t:
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		print('YES')
	else:
		even = 0
		odd = 0
		for i in arr:
			if i % 2 == 0:
				even += 1
			if i % 2 != 0:
				odd += 1
		print(['NO', 'YES'][even >= 1 and odd >= 1])
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2:
		print('YES')
	else:
		od = False
		ot = False
		for i in a:
			if i % 2:
				od = True
			else:
				ot = True
		if od and ot:
			print('YES')
		else:
			print('NO')


a = int(input())
for k in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	c.sort()
	d = 'YES'
	for k in range(1, b):
		if c[k] - c[k - 1] > 1:
			d = 'NO'
			break
	print(d)


T = int(input())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = a[0]
	so = [a[0]]
	for i in range(n):
		if a[i] != flag:
			so.append(a[i])
			flag = a[i]
	cnt = 0
	n = len(so)
	for i in range(n - 1):
		if so[i + 1] != so[i] + 1:
			print('NO')
			cnt = 0
			break
		else:
			cnt = 1
	if cnt == 1:
		print('YES')
	if n == 1:
		print('YES')


n = int(input())
for i in range(n):
	lis = []
	q = 0
	s = 0
	k = 0
	a = int(input())
	lis.extend(map(int, input().split()))
	for i in range(a):
		if lis[i] & 1:
			q = q + 1
		else:
			s = s + 1
	if a % 2 == 0:
		if q > 0 and s > 0:
			print('YES')
		else:
			print('NO')
	elif q > 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	lst = list(map(int, input().strip().split()))[:n]
	print('YES' if sum(lst) % 2 or len(set([i % 2 for i in lst])) > 1 else 'NO')


tests = int(input())
for _ in range(tests):
	n = int(input())
	nums = [int(x) for x in input().split()]
	odds = 0
	for i in nums:
		if i % 2 == 1:
			odds += 1
	if odds % 2 == 1:
		print('YES')
	elif odds == n or odds == 0:
		print('NO')
	else:
		print('YES')


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


TC = int(input())
for tc in range(TC):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	result = True
	for i in range(1, len(A)):
		if A[i] - A[i - 1] > 1:
			result = False
			break
	if result:
		print('Yes')
	else:
		print('No')


def solve():
	N = int(input())
	A = list(map(int, input().split()))
	odd = evn = False
	Sum = 0
	for a in A:
		Sum += a
		if a % 2 == 0:
			evn = True
		else:
			odd = True
	return odd and evn or Sum % 2 == 1
T = int(input())
while T > 0:
	T -= 1
	print('YES\n' if solve() else 'NO\n')


test_case = input()
for i in range(int(test_case)):
	result = True
	len_ = int(input())
	case = input().split(' ')
	case = list(map(lambda x: int(x), case))
	case.sort()
	for i in range(len_ - 1):
		if case[i + 1] - case[i] >= 2:
			result = False
			break
	if result:
		print('Yes')
	else:
		print('No')


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


def main():
	for _ in range(int(input())):
		n = int(input())
		l = [int(i) for i in input().split()]
		oddcheck = 0
		evencheck = 0
		for i in range(len(l)):
			if l[i] % 2 != 0:
				oddcheck = 1
				break
		for i in range(len(l)):
			if l[i] % 2 == 0:
				evencheck = 1
				break
		if sum(l) % 2 != 0:
			print('YES')
		elif evencheck == 1 and oddcheck == 1:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr_sort = sorted(arr)
	flag = True
	for k in range(1, n):
		if arr_sort[k] - arr_sort[k - 1] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	n = int(input())
	a = input().split()
	for i in range(n):
		a[i] = int(a[i])
	odd = 0
	even = 0
	for i in range(n):
		if a[i] % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd % 2 == 0 and even == 0 or odd == 0:
		print('NO')
	else:
		print('YES')


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

def main():
	n = int(input())
	data = iinput()
	count = 0
	for i in range(n):
		if data[i] % 2 == 1:
			count += 1
	if count == 0 or (count == n and n % 2 == 0):
		return 'NO'
	else:
		return 'YES'
for t in range(int(input())):
	print(main())


nb = int(input())
for k in range(nb):
	n = int(input())
	T = list(map(int, input().split(' ')))
	b = True
	while len(T) > 1 and b:
		x = max(T)
		T.remove(x)
		y = max(T)
		if x - y <= 1:
			pass
		else:
			b = False
	if b:
		print('YES')
	else:
		print('NO')


def solve(arr):
	odd = 0
	eve = 0
	for ele in arr:
		if ele % 2 == 0:
			eve += 1
		else:
			odd += 1
	if eve > 0 and odd > 0:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	sm = sum(arr)
	if sm % 2 == 1:
		print('YES')
	else:
		print(solve(arr))


t = int(input())
while t != 0:
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	temp = 0
	for i in range(1, len(arr), 1):
		if arr[i] - arr[i - 1] > 1:
			temp = 1
			print('NO')
			break
	if temp == 0:
		print('YES')
	t = t - 1


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split(' ')
	a = list(map(int, a))
	a.sort()
	b = a.copy()
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			b.remove(min(a[i], a[i + 1]))
		else:
			print('NO')
			break
	if len(b) == 1:
		print('YES')


t = int(input())

def addup():
	l = int(input())
	arr = list((int(x) for x in input().split()))
	allodd = True
	alleven = True
	for a in arr:
		if a % 2 == 0:
			allodd = False
			break
	for a in arr:
		if a % 2 == 1:
			alleven = False
			break
	if alleven or (allodd and l % 2 == 0):
		return 'NO'
	return 'YES'
for _ in range(t):
	print(addup())


T = int(input())
for _ in range(T):
	n = int(input())
	ls = list(map(int, input().split()))
	if n == 1:
		if ls[0] % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		even_count = 0
		odd_count = 0
		for i in ls:
			if i % 2 == 0:
				even_count += 1
			else:
				odd_count += 1
		if odd_count == 0:
			print('NO')
		elif odd_count == n:
			if sum(ls) % 2 == 0:
				print('NO')
			else:
				print('YES')
		else:
			print('YES')


def solve(N, even, odd):
	if even > 0 and odd > 0:
		return True
	if even == 0 and odd % 2 == 1:
		return True
	return False
T = int(input())
for t in range(0, T, 1):
	N = int(input())
	even = 0
	odd = 0
	A = input().split(' ')
	A = [int(A[i]) for i in range(N)]
	for i in range(0, N, 1):
		if A[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	print('YES' if solve(N, even, odd) else 'NO')


tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if n > 1:
		for i in range(n - 1):
			if arr[i + 1] - arr[i] > 1:
				print('NO')
				break
			if i + 1 == n - 1:
				print('YES')
	elif n == 1:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	b = []
	for a in input().split():
		b.append(int(a))
	k = 0
	for i in range(n):
		if b[i] % 2 == 1:
			k += 1
	if n % 2 == 1:
		if k > 0:
			print('YES')
		else:
			print('NO')
	elif k == n:
		print('NO')
	elif k > 0:
		print('YES')
	else:
		print('NO')


from collections import Counter, defaultdict
BS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def to_base(s, b):
	res = ''
	while s:
		res += BS[s % b]
		s //= b
	return res[::-1] or '0'
alpha = 'abcdefghijklmnopqrstuvwxyz'
from math import floor, ceil, pi, log
import sys
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919]
import timeit

def primef(n, plst=[]):
	if n == 1:
		return plst
	else:
		for m in primes:
			if n % m == 0:
				return primef(n // m, plst + [m])
		return primef(1, plst + [n])

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

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

def countOverlapping(string, sub):
	count = start = 0
	while True:
		start = string.find(sub, start) + 1
		if start > 0:
			count += 1
		else:
			return count

def base10Len(n):
	return len(str(n))
t = int(input())
for i in range(t):
	n = int(input())
	nums = lmii()
	nums.sort()
	flag = False
	c = 0
	while c < len(nums) - 1:
		if nums[c + 1] - nums[c] > 1:
			print('NO')
			flag = True
			break
		c += 1
	if not flag:
		print('YES')


x = int(input())
for i in range(x):
	a = int(input())
	y = list(map(int, input().split()))
	z = len(y)
	y.sort()
	for i in range(len(y) - 1):
		if y[i + 1] - y[i] <= 1:
			z = z - 1
	if z == 1:
		print('YES')
	else:
		print('NO')


import math
from sys import stdin
from collections import Counter, defaultdict, deque
input = stdin.readline

def int1():
	return int(input())

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

def list1():
	return list(map(int, input().split()))
mod = pow(10, 9) + 7

def solve():
	n = int1()
	l1 = list1()
	l1.sort()
	c = 0
	for i in range(n - 1):
		if l1[i + 1] - l1[i] > 1:
			c = c + 1
	if c == 0:
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	solve()


t = int(input())
while t:
	n = int(input())
	array = list(map(int, input().split()))
	flag = 0
	i = 0
	while i < n:
		if array[i] % 2 != 0:
			flag = 1
			break
		i += 1
	if flag == 0:
		print('NO')
	else:
		flag2 = 0
		j = 0
		while j < n:
			if array[j] % 2 == 0:
				flag2 = 1
				break
			j += 1
		if flag2 == 0 and n % 2 == 0:
			print('NO')
		else:
			print('YES')
	t -= 1


def solve():
	n = int(input())
	array = list(map(int, input().split()))
	if sum(array) % 2 == 0:
		odd = 0
		even = 0
		for a in array:
			if a % 2 == 0:
				even += 1
			else:
				odd += 1
			if odd > 0 and even > 0:
				print('YES')
				return
		print('NO')
	else:
		print('YES')
T = int(input())
for _ in range(T):
	solve()


test = int(input())
while test:
	test -= 1
	n = int(input())
	ls = list(map(int, input().split()))
	e = 0
	o = 0
	for i in ls:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e >= 0 and o >= 1:
		if e > 0:
			print('YES')
		elif e == 0 and o % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	lst = sorted(list(map(int, input().split())))
	print(['YES', 'NO'][any((lst[i] - lst[i - 1] > 1 for i in range(1, n)))])


t = int(input())
while t:
	n = int(input())
	arr = list(map(int, input().split()))
	yes = 'YES'
	no = 'NO'
	if n == 1:
		print(yes)
	else:
		arr.sort()
		count = 0
		for i in range(n - 1):
			if arr[i + 1] - arr[i] <= 1:
				count += 1
		if count == n - 1:
			print(yes)
		else:
			print(no)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	np = False
	for i in range(n):
		if ar[i] - ar[i - 1] > 1:
			np = True
	if np:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	ans = True
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			ans = False
			break
	print('YES' if ans else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ma = 0
	for i in range(n - 1):
		ma = max(ma, l[i + 1] - l[i])
	if ma < 2:
		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')

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

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

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

def print_list(l):
	print(' '.join(map(str, l)))
for _ in range(N()):
	n = N()
	nums = RL()
	s = list(set(nums))
	s.sort()
	last = s[0] - 1
	flag = True
	for a in s:
		if a != last + 1:
			flag = False
			break
		last = a
	if flag:
		print('YES')
	else:
		print('NO')


import sys
for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] > 1:
			print('NO')
			break
	else:
		print('YES')


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


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(1, len(a)):
		if abs(a[i] - a[i - 1]) >= 2:
			print('NO')
			break
	else:
		print('YES')


q = int(input())
for _ in range(q):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('YES')
	else:
		i = 0
		even = False
		odd = False
		while not (even and odd) and i < n:
			if l[i] % 2 == 0:
				even = True
			else:
				odd = True
			i += 1
		if even and odd:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	n = len(set(l))
	if n == 1:
		print('YES')
	elif n - 1 < max(l) - min(l):
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = input()
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	while i < len(a) - 1:
		if a[i + 1] - a[i] == 1 or a[i] == a[i + 1]:
			a.remove(a[i])
			i -= 1
		i += 1
	if len(a) != 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	cnt = 0
	for i in range(1, n):
		if abs(a[i] - a[i - 1] <= 1):
			cnt += 1
		else:
			continue
	if len(a) - cnt == 1:
		print('Yes')
	else:
		print('No')


def main():
	for i in range(int(input())):
		x = int(input())
		f = [int(x) for x in input().split()]
		odd = False
		even = False
		if sum(f) % 2 == 0:
			for r in f:
				if r % 2 != 0:
					odd = True
				else:
					even = True
			if odd and even:
				print('YES')
			else:
				print('NO')
		else:
			print('YES')
main()


t = int(input())
for i in range(t):
	n = int(input())
	l1 = list(map(int, input().split()))
	even = 0
	odd = 0
	total = sum(l1)
	for i in l1:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if total % 2 == 0:
		if even == 0 or odd == 0:
			print('NO', sep='')
		else:
			print('YES', sep='')
	else:
		print('YES', sep='')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	f = 1
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) == 1 or abs(a[i] - a[i + 1]) == 0:
			f = 1
		else:
			f = 0
			break
	if f == 1:
		print('YES')
	else:
		print('no')


n = int(input())
for _ in range(n):
	x = input()
	arr = list(map(int, input().split()))
	arr.sort()
	failed = False
	c = 0
	x = len(arr)
	while c < x - 1:
		if arr[c + 1] - arr[c] <= 1:
			c += 1
		else:
			failed = True
			break
	if failed:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	if len(arr) == 1:
		print('YES')
		continue
	arr = sorted(arr)
	res = 'YES'
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			res = 'NO'
	print(res)


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	c = 0
	e = 0
	for i in a:
		if i % 2 != 0:
			c += 1
		else:
			e += 1
	if c % 2 != 0 or (c >= 1 and e >= 1):
		print('YES')
	else:
		print('NO')
	t -= 1


def performOperations(arr):
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	performOperations(arr)


for _ in range(int(input())):
	input()
	arr = list(map(int, input().split()))
	removed = True
	while removed:
		mnm1 = 99999999
		mnm1_index = 0
		mnm2 = 99999999
		mnm2_index = 0
		removed = False
		for elem in range(len(arr)):
			if mnm1 > arr[elem]:
				mnm2 = mnm1
				mnm2_index = mnm1_index
				mnm1 = arr[elem]
				mnm1_index = elem
			elif mnm2 > arr[elem]:
				mnm2 = arr[elem]
				mnm2_index = elem
		if abs(mnm2 - mnm1) <= 1:
			removed = True
			arr.pop(mnm1_index)
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		print('YES')
		continue
	cnt0 = 0
	cnt1 = 0
	for i in range(n):
		if a[i] % 2 == 0:
			cnt0 += 1
		else:
			cnt1 += 1
	if cnt0 * cnt1 == 0:
		print('NO')
	else:
		print('YES')


T = int(input())
for _ in range(T):
	N = int(input())
	A = sorted(list(map(int, input().split())))
	dict_a = dict()
	for a in A:
		if a in dict_a.keys():
			dict_a[a] += 1
		else:
			dict_a[a] = 1
	keys = list(dict_a.keys())
	for i in range(len(keys) - 1):
		if keys[i] == keys[i + 1] - 1:
			dict_a[keys[i]] = 0
		else:
			dict_a[keys[i]] = 1
	if dict_a[keys[-1]]:
		dict_a[keys[-1]] = 1
	count = 0
	act_val = None
	for val in dict_a.values():
		if val > 0:
			act_val = val
			count += 1
	if count == 1:
		if act_val % 2 == 0 or act_val == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort()
	i = 0
	nd = 0
	while i < n - 1:
		if lst[i + 1] - lst[i] <= 1:
			i += 1
		else:
			nd = 1
			break
	if nd == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	size = int(input())
	a = map(int, input().split())
	if size == 1:
		print('YES')
		continue
	sortedd = sorted(a)
	check = True
	for i in range(1, size):
		if sortedd[i] - sortedd[i - 1] > 1:
			check = False
			break
	print('YES' if check else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n < 2:
		print('YES')
	else:
		test = 0
		a.sort()
		for i in range(n - 1):
			d = a[i + 1] - a[i]
			if d == 0 or d == 1:
				continue
			else:
				test = 1
				break
		if test == 1:
			print('NO')
		else:
			print('YES')


test_cases = int(input())
for _ in range(test_cases):
	count = int(input())
	(even, odd) = (0, 0)
	for value in map(int, input().split(' ')):
		if value % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 == 1:
		print('YES')
	elif odd > 0 and odd % 2 == 0 and (even > 0):
		print('YES')
	else:
		print('NO')


from collections import deque
from math import *
import heapq
from random import *
import sys
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	val = False
	for j in range(1, len(l)):
		if l[j] - l[j - 1] > 1:
			print('NO')
			val = True
			break
	if val != True:
		print('YES')


for i in range(int(input())):
	c = 1
	n = int(input())
	s = sorted([int(i) for i in input().split()])
	for i in range(n - 1):
		if s[i + 1] - s[i] > 1:
			c = 0
			break
	if c:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	al = list(map(int, input().split()))
	al.sort()
	if len(al) == 1:
		print('YES')
		continue
	f = 0
	for i in range(len(al) - 1):
		if abs(al[i] - al[i + 1]) > 1:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')
		continue


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	fl = True
	for i in range(n - 1):
		if fl and a[i + 1] - a[i] > 1:
			print('NO')
			fl = False
	if fl:
		print('YES')


for x in [0] * int(input()):
	a = int(input())
	l = sorted(list(map(int, input().split())))
	for i in range(a):
		try:
			if l[i] - l[i + 1] in [-1, 0]:
				pass
			else:
				print('NO')
				break
		except:
			print('YES')
			break


import sys
rl = lambda : next(sys.stdin)
t = int(rl())
for _ in range(t):
	n = int(rl())
	a = list(map(int, rl().split()))
	a.sort()
	ok = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ok = 0
			break
	if ok:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	chet = 0
	nechet = 0
	if sum(a) % 2 == 1:
		print('YES')
		continue
	if a.count(a[0]) == len(a):
		if a[0] % 2 == 0:
			print('NO')
		elif a[0] % 2 == 1 and n % 2 == 1:
			print('YES')
		else:
			print('NO')
		continue
	for k in a:
		if k % 2 == 1:
			nechet += 1
		else:
			chet += 1
	if nechet > 0 and chet > 0:
		print('YES')
	else:
		print('NO')


n = int(input())
an = []
for i in range(n):
	size = int(input())
	l = list(map(int, input().split()))
	l.sort(reverse=True)
	for i in range(len(l) - 1):
		if l[i] - l[i + 1] == 0 or l[i] - l[i + 1] == 1:
			continue
		else:
			an.append('NO')
			break
	else:
		an.append('YES')
for i in an:
	print(i)


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	(k1, k2) = (False, False)
	for i in a:
		if i % 2:
			k1 = True
		else:
			k2 = True
	if not k1:
		print('NO')
	elif not k2:
		if n % 2:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	items = list(map(int, input().split()))
	odd = 0
	even = 0
	for item in items:
		if item % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
	elif odd % 2 != 0:
		print('YES')
	elif odd == n:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(set(map(int, input().split()))))
	b = True
	for j in range(len(a)):
		if j > 0 and a[j - 1] - a[j] != -1:
			b = False
	if b:
		print('YES')
	else:
		print('NO')


for z in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a)
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			a[i] = True
		else:
			a[i] = False
	if False in a:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	n = int(input())
	l1 = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	count = 0
	l1.sort()
	for i in range(1, n):
		if abs(l1[i] - l1[i - 1]) > 1:
			count = 1
			break
	if count == 1:
		print('NO')
	else:
		print('YES')


from sys import stdin
N = int(stdin.readline())
for i in range(N):
	flag = True
	length = int(stdin.readline())
	array = sorted([int(i) for i in stdin.readline().strip().split()])
	for i in range(1, length):
		diff = array[i] - array[i - 1]
		if diff > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


tc = int(input())
for _ in range(tc):
	size = int(input())
	A = list(map(int, input().split()))
	if sum(A) % 2 != 0:
		print('YES')
	else:
		e = 0
		o = 0
		for k in range(0, len(A)):
			if A[k] % 2 == 0:
				e = A[k]
				break
		for k in range(0, len(A)):
			if A[k] % 2 != 0:
				o = A[k]
				break
		if e == 0:
			print('NO')
		elif (sum(A) - e + o) % 2 != 0:
			print('YES')
		else:
			print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	A = sorted(set([int(i) for i in input().split()]))
	if len(A) == 1:
		print('YES')
	else:
		m = len(A)
		for i in range(1, m):
			if A[i] - A[i - 1] != 1:
				print('NO')
				break
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	wrong = False
	for i in range(n - 1):
		if a[i] != a[i + 1] and a[i] + 1 != a[i + 1]:
			wrong = True
			break
	print('NO' if wrong else 'YES')


test = int(input())
while test > 0:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	c = 1
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			c += 1
	if c == 1:
		print('YES')
	else:
		print('NO')
	test -= 1


for _ in range(int(input())):
	input()
	x = list(map(int, input().strip().split()))
	evens = odds = 0
	for i in x:
		if i % 2 == 0:
			evens += 1
		else:
			odds += 1
	if evens == len(x):
		print('NO')
	elif odds == len(x) and sum(x) % 2 == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = sorted(list(set(l)))
	c = 0
	for j in range(len(x) - 1):
		if x[j + 1] - x[j] > 1:
			c += 1
	if c == 0:
		print('YES')
	else:
		print('NO')


T = int(input())
t = 0
while t < T:
	N = int(input())
	A = list(map(int, input().split()))
	n = 0
	pari = 0
	dispari = 0
	somma = 0
	while n < N:
		a = A[n]
		somma = somma + a
		if a % 2 == 1:
			dispari = dispari + 1
		else:
			pari = pari + 1
		n = n + 1
	if somma % 2 == 1:
		print('YES')
	elif dispari == N or pari == N:
		print('NO')
	else:
		print('YES')
	t = t + 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	(even, odd) = (False, False)
	for i in a:
		if i % 2 == 0:
			even = True
		else:
			odd = True
	if n % 2 == 0:
		print('YES' if even and odd else 'NO')
	else:
		print('YES' if odd else 'NO')


n = int(input())
ans = []
for i in range(n):
	lens = int(input())
	line = [int(x) for x in input().split(' ')]
	line.sort()
	for j in range(lens):
		if j < lens - 1 and line[j + 1] - line[j] > 1:
			ans.append('NO')
			break
		if j == lens - 1 and line[j] - line[j - 1] <= 1:
			ans.append('YES')
			break
for i in range(n):
	print(ans[i])


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	f = 0
	for i in range(1, n):
		if abs(s[i] - s[i - 1]) <= 1:
			continue
		else:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


cs = int(input())
while cs > 0:
	n = int(input())
	os = 0
	es = 0
	a = [int(x) for x in input().split()]
	n = n - 1
	while n >= 0:
		t = a[n]
		if t % 2 == 0:
			es = es + 1
		else:
			os = os + 1
		n = n - 1
	ans = 'YES'
	if os == 0 or (es == 0 and os % 2 == 0):
		ans = 'NO'
	print(ans)
	cs = cs - 1


t = int(input())
for x in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	for i in range(1, n):
		if abs(ar[i] - ar[i - 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


for i in range(int(input())):
	input()
	(a1, a2) = (0, 0)
	for x in map(int, input().split()):
		if x % 2 == 0:
			a2 += 1
		else:
			a1 += 1
	if a1 % 2 == 1:
		print('YES')
	elif a1 > 0 and a2 > 0:
		print('YES')
	else:
		print('NO')


from math import gcd, ceil, log
from collections import Counter, deque
from heapq import heappush, heappop, heapify

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

def arp(arr):
	return ' '.join([str(i) for i in arr])
for _ in range(int(input())):
	n = int(input())
	arr = rl()
	cnt = [arr[i] for i in range(n) if arr[i] & 1]
	if len(cnt) & 1:
		print('YES')
	elif n - len(cnt) > 0 and len(cnt) != 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for dkdjkdji in range(n):
	nums = int(input())
	arr1 = str(input())
	arr1 = arr1.split()
	even = 0
	odd = 0
	for i in arr1:
		i = int(i)
		if i & 1:
			odd += 1
		else:
			even += 1
	getLen = len(arr1)
	if even and odd:
		print('Yes')
	elif getLen & 1 and even == 0:
		print('Yes')
	elif odd == 0:
		print('No')
	else:
		print('No')


for i in range(int(input())):
	am = int(input())
	arr = list(map(int, input().split()))
	fl = False
	fl1 = False
	for g in range(am):
		if arr[g] % 2 == 0:
			fl = True
		else:
			fl1 = True
	if fl1 and fl or (fl1 and am % 2 == 1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted([int(i) for i in input().split()])
	boo = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			boo = False
			break
	ans = 'Yes' if boo else 'No'
	print(ans)


def popping_item(list_num, n):
	if n == 1:
		return list_num
	elif n == 2:
		if list_num[1] - list_num[0] <= 1:
			list_num.pop(0)
			return list_num
	elif list_num[n - 1] - list_num[n - 2] <= 1:
		list_num.pop()
		return popping_item(list_num, n - 1)
	return list_num
n_testcases = int(input())
for t in range(n_testcases):
	n_list = int(input())
	list_numbers = list(map(int, input().split()))
	list_numbers.sort()
	final_list = popping_item(list_numbers, n_list)
	if len(final_list) == 1:
		print('YES')
	else:
		print('NO')


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque
from collections import defaultdict

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans

def to_zero(n, s):
	lst = s[0]
	ans = []
	for i in range(n):
		if lst == s[i]:
			continue
		elif lst == '0':
			lst = '1'
			ans.append(i)
		else:
			lst = '0'
			ans.append(i)
	if lst == '1':
		ans.append(n)
	return ans
for g in range(int(input())):
	(n, a) = na()
	a = sorted(a)
	f = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


import sys
for _ in range(int(input())):
	n = int(input())
	my_list = list(map(int, sys.stdin.readline().split()))
	my_list.sort()
	flag = True
	if len(my_list) != 1:
		for i in range(len(my_list) - 1):
			if my_list[i] == my_list[i + 1] or my_list[i] + 1 == my_list[i + 1]:
				continue
			else:
				flag = False
				break
	if flag == True:
		print('YES')
	else:
		print('NO')


I = input
exec(int(I()) * "n=int(I());o=sum(int(x)%2for x in I().split());print('NYOE S'[0<o<n+n%2::2]);")


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

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

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

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

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

def a():
	n = int(input())
	arr = array()
	arr.sort()
	res = 'YES'
	for i in range(1, n):
		if arr[i] != arr[i - 1] and arr[i - 1] + 1 != arr[i]:
			res = 'NO'
			break
	print(res)

def b():
	n = int(input())
	a = array()
	b = array()
	ma = min(a)
	mb = min(b)
	cnt = 0
	for i in range(n):
		if a[i] > ma:
			diff = min(b[i] - mb, a[i] - ma)
			cnt += diff
			a[i] -= diff
			b[i] -= diff
			cnt += a[i] - ma
	for i in range(n):
		cnt += b[i] - mb
	print(cnt)

def c():
	pass
t = int(input())
for _ in range(t):
	a()


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	input()
	(*a,) = map(int, input().split())
	cnt = [0] * 101
	for i in a:
		cnt[i] = 1
	for i in range(min(a), max(a) + 1):
		if not cnt[i]:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	oc = 0
	ec = 0
	for x in ar:
		if x % 2 == 1:
			oc += 1
		else:
			ec += 1
	if oc % 2 == 1 and ec == 0 or (oc > 0 and ec > 0):
		print('YES')
	else:
		print('NO')


for tc in range(int(input())):
	n = int(input())
	l1 = list(map(int, input().split()))
	l1.sort()
	flag = 2
	if len(l1) == 1:
		print('YES')
	else:
		for i in range(len(l1) - 1):
			if l1[i + 1] - l1[i] > 1:
				flag = 1
				break
			else:
				flag = 0
	if flag == 0:
		print('YES')
	elif flag == 1:
		print('NO')


t = int(input())
for i in range(t):
	e = int(input())
	l = list(map(int, input().split()))
	for r in range(e):
		if l[r] % 2 == 1:
			l[r] = 1
		else:
			l[r] = 0
	od = l.count(1)
	ev = e - od
	if od > 0 and od != e:
		print('YES')
	elif od == e and e % 2 == 0:
		print('NO')
	elif od == e and e % 2 == 1:
		print('YES')
	else:
		print('NO')


def binarySearch(arr, x):
	l = 0
	r = len(arr) - 1
	while l <= r:
		mid = (l + r) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def js(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] <= x:
			ans = m
			l = m + 1
		else:
			r = m - 1
	return ans

def jg(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] >= x:
			ans = m
			r = m - 1
		else:
			l = m + 1
	return ans
from math import *
for __ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	e = 0
	o = 0
	for i in range(n):
		if ar[i] % 2 == 0:
			e += 1
		else:
			o += 1
	if n % 2 == 1:
		if o > 0:
			print('YES')
		else:
			print('NO')
	elif o > 0 and e > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split()
	num = list(map(int, a))
	if len(num) == 1:
		print('Yes')
	else:
		flag = 0
		num.sort()
		for j in range(n - 1):
			diff = num[j + 1] - num[j]
			if diff > 1:
				print('No')
				flag = 1
				break
			else:
				continue
		if flag == 0:
			print('Yes')


test = int(input())
for i in range(0, test):
	k = input()
	l = list(map(int, input().split()))
	odd = 0
	even = 0
	for j in range(0, len(l)):
		if l[j] % 2 == 0:
			even = 1
			if odd == 1:
				break
		else:
			odd = 1
			if even == 1:
				break
	if odd == 1 and even == 1:
		print('YES')
	elif odd == 1 and len(l) % 2 == 1:
		print('YES')
	else:
		print('NO')


n = int(input())

def checkConsecutive(l):
	return l == list(range(min(l), max(l) + 1))
for _ in range(n):
	throw = input()
	s = input()
	A = []
	s = s.split(' ')
	for x in s:
		A.append(int(x))
	A = set(A)
	A = list(A)
	A.sort()
	if checkConsecutive(A) == True:
		print('YES')
	else:
		print('NO')


import sys

def solution(arr):
	pass
reader = (tuple(map(int, line.split())) for line in sys.stdin)
cnt = next(reader)
for _ in range(cnt[0]):
	__ = next(reader)
	arr = next(reader)
	if sum(arr) % 2 == 1:
		print('YES')
		continue
	if all((item % 2 == 0 for item in arr)) or all((item % 2 == 1 for item in arr)):
		print('NO')
		continue
	print('YES')


def c(v, n):
	for i in range(n - 1):
		if abs(x[i] - x[i + 1]) > 1:
			print('NO')
			return
	print('YES')
	return
t = int(input())
for i in range(t):
	n = int(input())
	x = list(map(int, input().split(' ', n)))
	x.sort()
	c(x, n)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(m,) = I()
while m:
	(n,) = I()
	arr = I()
	arr = sorted(arr)
	if n == 1:
		print('YES')
	else:
		flag = 0
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')
	m -= 1


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	b = 0
	for j in range(1, n):
		if a[j - 1] != a[j] - 1 and a[j - 1] != a[j]:
			b = 1
	print('YNEOS'[b::2])


def function(nums):
	nums1 = list(sorted(set(nums)))
	if len(nums1) == 1:
		return 'YES'
	else:
		total = 0
		for i in range(1, len(nums1)):
			if abs(nums1[i] - nums1[i - 1]) <= 1:
				total += 1
			else:
				return 'NO'
		return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	nums = list(map(int, input().rstrip().split()))
	print(function(nums))


t = int(input())
for i in range(t):
	num = int(input())
	s = set(map(int, input().split()))
	if max(s) - min(s) < len(s):
		print('YES')
	else:
		print('NO')


test = int(input())
for l in range(test):
	num = int(input())
	sol = list(map(int, input().split()))
	if sum(sol) % 2 != 0:
		print('YES')
	else:
		temp = [i for i in sol if i % 2 != 0]
		if len(temp) == len(sol) or len(temp) == 0:
			print('NO')
			continue
		else:
			print('YES')


r = int(input())
for i in range(r):
	n = int(input())
	o = 0
	e = 0
	num = input()
	list = [int(x) for x in num.split()]
	for i in list:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if n % 2 != 0:
		if o == 0:
			print('NO')
		else:
			print('YES')
	elif o == 0 or e == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for w in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	sol = 'YES'
	for i in range(n - 1):
		if s[i + 1] - s[i] > 1:
			sol = 'NO'
	print(sol)


num_cases = int(input())
for i in range(num_cases):
	num_elements = int(input())
	array = [int(n) for n in input().split()]
	odd = False
	even = False
	if num_elements % 2 == 0:
		for j in range(num_elements):
			if array[j] % 2 == 0:
				even = True
			else:
				odd = True
	else:
		even = True
		for j in range(num_elements):
			if array[j] % 2 == 1:
				odd = True
	if odd and even:
		print('YES')
	else:
		print('NO')


from sys import stdin
from math import ceil, gcd

def func():
	return
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	arr.sort()
	cond = True
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			cond = False
			break
	if cond == True:
		print('YES')
	else:
		print('NO')


def small(N, M):
	l = len(N)
	t = N[0]
	for i in range(0, M):
		if abs(N[i] - t) > 1:
			return 'No'
		t = N[i]
	return 'Yes'
for i in range(int(input())):
	M = int(input())
	lst = list(map(int, input().split()))
	lst.sort()
	print(small(lst, M))


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) % 2 for i in input().split()]
	if a.count(0) == n or (a.count(1) == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	s = set(ls)
	ls = list(s)
	ls.sort()
	if n == 1:
		print('YES')
	else:
		f = 1
		for i in range(len(ls) - 1):
			if ls[i + 1] - ls[i] <= 1:
				continue
			else:
				f = 0
				break
		if f:
			print('YES')
		else:
			print('NO')


def finddiff(arr):
	arr.sort()
	for i in range(len(arr) - 1):
		if abs(arr[i + 1] - arr[i]) > 1:
			return 'NO'
	return 'YES'
n = int(input())
for i in range(n):
	t = int(input())
	arr = [int(i) for i in input().split()]
	print(finddiff(arr))


t = int(input())
for i in range(t):
	n = int(input())
	x = [int(i) for i in input().strip().split()]
	neparni = 0
	parni = 0
	for i in x:
		if i % 2 == 1:
			neparni += 1
		else:
			parni += 1
	if neparni % 2 == 1:
		print('YES')
	elif neparni > 0 and parni > 0:
		print('YES')
	else:
		print('NO')


def check(n, ar):
	o = 0
	e = 0
	for i in range(n):
		if ar[i] % 2:
			o += 1
		else:
			e += 1
	if o % 2:
		return 'YES'
	if o > 0 and e > 0:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	ar = [int(x) for x in input().split()]
	print(check(n, ar))


def all_even(a, n):
	c = 0
	for i in range(n):
		if a[i] % 2 == 0:
			c += 1
	if c == n:
		return 1
	else:
		return 0

def all_odd(a, n):
	c = 0
	for i in range(n):
		if a[i] % 2 != 0:
			c += 1
	if c == n and n % 2 == 0:
		return 1
	else:
		return 0
t = int(input())
for i in range(t):
	x = int(input())
	a = list(map(int, input().split()))
	if all_even(a, x) or all_odd(a, x):
		print('NO')
	else:
		print('YES')


def go(n, ai):
	ai.sort()
	for i in range(n - 1):
		if ai[i + 1] - ai[i] > 1:
			print('NO')
			return
	print('YES')
for i in range(int(input())):
	n = int(input())
	ai = list(map(int, input().split()))
	go(n, ai)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	c_arr = [0] * 101
	j = 0
	(m, mx) = (min(arr), max(arr))
	if n == 1:
		print('YES')
		continue
	for i in arr:
		c_arr[i] += 1
	for i in range(m, mx + 1):
		if c_arr[i - 1] > 0 and c_arr[i] == 0:
			print('NO')
			j = 1
			break
	if j == 0:
		print('YES')


t = int(input())
for i in range(t):
	x = int(input())
	list = [int(x) for x in input().split()]
	list.sort(reverse=False)
	ok = True
	for y in range(1, x):
		if list[y - 1] != list[y] and list[y - 1] + 1 != list[y]:
			ok = False
			break
	print('YES' if ok else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	X = list(map(int, input().split()))
	if sum(X) % 2 != 0:
		print('YES')
	else:
		odd = 0
		even = 0
		for i in range(n):
			if X[i] % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd > 0 and even > 0:
			print('YES')
		else:
			print('NO')


n = int(input())
result = []
for task in range(n):
	arr_dim = int(input())
	arr = input().split(' ')
	odd = 0
	even = 0
	for i in range(arr_dim):
		arr[i] = int(arr[i])
		if arr[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 == 1:
		result.append('YES')
	elif odd > 0 and even > 0:
		result.append('YES')
	else:
		result.append('NO')
for item in result:
	print(item)


y = int(input())
i = 0
while i < y:
	a = int(input())
	riga = list(map(int, input().strip().split()))
	totale = riga[0]
	x = 1
	while x < a:
		totale = totale + riga[x]
		x = x + 1
	if totale % 2 != 0:
		print('YES')
	else:
		x = 1
		if riga[0] % 2 == 0:
			risultato = True
		else:
			risultato = False
		d = risultato
		while x < a:
			if riga[x] % 2 == 0:
				risultato = True
			else:
				risultato = False
			if risultato != d:
				print('YES')
				break
			x = x + 1
		if risultato == d:
			print('NO')
	i = i + 1


n = int(input())
for i in range(0, n):
	m = int(input())
	l = list(map(int, input().split()))
	count = 0
	l.sort()
	s = sum(l)
	if len(l) == 1:
		print('YES')
		continue
	for i in range(1, m):
		if l[i] - l[i - 1] <= 1:
			s -= l[i - 1]
			l[i - 1] = 0
	if l[i] == s:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	ans = 'YES'
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			ans = 'NO'
			break
	print(ans)


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = 0
	while len(l) != 1:
		if abs(l[0] - l[1]) <= 1:
			l.remove(l[0])
		else:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


def solve(arr, n):
	if sum(arr) % 2 != 0:
		return print('YES')
	if any((i % 2 != 0 for i in arr)) and any((i % 2 == 0 for i in arr)):
		return print('YES')
	return print('NO')
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	solve(arr, n)


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	if sum(a) % 2 == 1:
		print('YES')
	else:
		par = False
		impar = False
		for i in a:
			if i % 2 == 0:
				par = True
			else:
				impar = True
		if par and impar:
			print('YES')
		else:
			print('NO')


q = int(input())
for k in range(q):
	n = int(input())
	array = list(map(int, input().split(' ')))
	impar = 0
	par = 0
	for i in range(n):
		if array[i] % 2 == 0:
			par += 1
		else:
			impar += 1
	if impar == 0:
		print('NO')
	elif par == 0 and impar % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = []
	a = list(map(int, input().split()))
	odd = even = 0
	for number in a:
		if number & 1 == 1:
			odd += 1
		else:
			even += 1
	ans = False
	if odd & 1 == 1:
		ans = True
	elif even != 0 and odd != 0:
		ans = True
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	flag = 0
	l.sort()
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


a = int(input())
for x in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	c.sort()
	k = 0
	for y in range(b - 1):
		if c[y + 1] - c[y] > 1:
			k = 1
	if k == 1:
		print('NO')
	else:
		print('YES')


def solve():
	t = int(input())
	while t > 0:
		n = int(input())
		l = list(map(int, input().split(' ')))
		l.sort()
		x = 0
		for i in range(n - 1):
			if l[i + 1] - l[i] > 1:
				print('NO')
				x = 1
				break
		if x == 0:
			print('YES')
		t -= 1
solve()


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(i) for i in input().split()]
	(x0, x1) = (min(a), max(a))
	can_do = True
	for i in range(x0, x1):
		if not i in a:
			can_do = False
	if can_do:
		print('YES')
	else:
		print('NO')


def solve(a, n):
	cnt = 1
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			return False
	return True
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag = solve(sorted(a), n)
	if flag:
		print('YES')
	else:
		print('NO')


I = input
for _ in [0] * int(I()):
	I()
	a = s = 0
	b = 1
	for x in I().split():
		x = int(x) & 1
		a |= x
		b &= x
		s ^= x
	print('YNEOS'[a ^ 1 | b & ~s::2])


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		if n == 1:
			print('YES')
			continue
		ok = 0
		for (i, v) in enumerate(a[:n - 1]):
			if a[i + 1] - v > 1:
				print('NO')
				ok = 1
				break
		if not ok:
			print('YES')
	return
main()


import collections

def solve(n, arr):
	currSum = sum(arr)
	if currSum & 1:
		return True
	(isOddFound, isEvenFound) = (False, False)
	for i in range(n - 1, -1, -1):
		if arr[i] & 1:
			if isEvenFound:
				return True
			isOddFound = True
		else:
			if isOddFound:
				return True
			isEvenFound = True
	return False
t = int(input().strip())
for i in range(t):
	n = int(input().strip())
	arr = list(map(int, input().strip().split()))
	print('YES' if solve(n, arr) else 'NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	List = list(map(int, input().split()))
	sum_ = sum(List)
	if sum_ % 2 != 0:
		print('YES')
		continue
	else:
		count = 0
		for i in range(len(List)):
			x = 0
			x = sum_ - List[i]
			if x % 2 == 0:
				for j in range(len(List)):
					if List[j] % 2 != 0 and List[i] != List[j]:
						print('YES')
						count += 1
						break
			else:
				for k in range(len(List)):
					if List[k] % 2 == 0 and List[i] != List[k]:
						print('YES')
						count += 1
						break
			if count > 0:
				break
		if count == 0:
			print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	a = 0
	b = 0
	for i in A:
		if i % 2 == 0:
			a = 1
		else:
			b = 1
	if a + b == 2:
		print('YES')
	elif a == 1:
		print('NO')
	elif N % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	p = input()
	a = list(map(int, p.split()))
	a = sorted(list(set(a)))
	for j in range(len(a) - 1):
		diff = a[j + 1] - a[j]
		if abs(diff) > 1:
			ans.append('NO')
			break
	else:
		ans.append('YES')
for i in ans:
	print(i)


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	(odd, even) = (False, False)
	for x in a:
		if x % 2 == 1:
			odd = True
		else:
			even = True
	if not odd:
		print('NO')
	elif not even:
		if n % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	solve()


n = int(input())
ans = [0] * n
for i in range(n):
	k = int(input())
	s = [0] * k
	string = input().split(' ')
	for j in range(k):
		s[j] = int(string[j])
	s.sort()
	for j in range(k - 1):
		if s[j + 1] - s[j] > 1:
			ans[i] = 1
			break
for i in range(n):
	if ans[i]:
		print('NO')
	else:
		print('YES')


T = int(input())
for t in range(T):
	n = int(input())
	nums = [int(x) for x in input().split(' ')]
	nums.sort()
	good = True
	for i in range(len(nums) - 1):
		if nums[i] - nums[i + 1] not in {-1, 0, 1}:
			good = False
			break
	print('YES' if good else 'NO')


n = int(input())
for i in range(n):
	s = int(input())
	l = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for j in range(s):
		if l[j] % 2 == 0:
			even = even + 1
		else:
			odd = odd + 1
	if odd % 2:
		print('YES')
	elif odd == 0:
		print('NO')
	elif even > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	d = []
	if len(a) == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(a[i] - a[i + 1]) <= 1:
				d.append(abs(a[i] - a[i + 1]))
			else:
				pass
		if len(d) + 1 == len(a):
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	li = sorted(list(map(int, input().split())))
	fg = 0
	if n == 1:
		fg = 0
	else:
		for i in range(n - 1):
			if li[i] + 1 == li[i + 1] or li[i] == li[i + 1]:
				continue
			else:
				fg = 1
				break
	if fg == 1:
		print('NO')
	else:
		print('YES')


def cin():
	return list(map(int, input().split()))
t = int(input())
while t:
	n = int(input())
	a = cin()
	a.sort()
	ans = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)
	t -= 1


n = int(input())
for i in range(0, n):
	o = int(input())
	p = input().rstrip().split(' ')
	p.sort(key=int)
	C = list(p)
	G = 0
	C.sort(key=int)
	if n == 1:
		print('YES')
	else:
		for j in range(0, len(C) - 1):
			if int(C[j + 1]) - int(C[j]) <= 1:
				continue
			else:
				G = 1
				break
		if G == 0:
			print('YES')
		else:
			print('NO')


from sys import stdin
for _ in range(int(stdin.readline().rstrip())):
	n = int(stdin.readline().rstrip())
	l = list(map(int, stdin.readline().rstrip().split(' ')))
	l.sort()
	r = 'YES'
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			r = 'NO'
			break
	print(r)


for i in range(int(input())):
	j = int(input())
	data = sorted([int(k) for k in input().split()])
	res = 0
	for i in range(j - 1):
		if abs(data[i] - data[i + 1]) <= 1:
			res += 1
	if res == j - 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	f = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


import sys, math
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	a = list(map(int, sys.stdin.readline().split()))
	a.sort()
	total = 0
	if n != 1:
		for i in range(n - 1):
			if abs(a[i] - a[i + 1]) > 1:
				total += 1
		if total > 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


import sys

def main():
	t = int(input())
	while t > 0:
		flag = False
		n = int(input())
		arr = [int(x) for x in input().split()]
		arr.sort()
		for i in range(n - 1):
			if abs(arr[i] - arr[i + 1]) <= 1:
				continue
			else:
				flag = True
				print('No')
				break
		if not flag:
			print('Yes')
		t -= 1
main()


t = int(input())
while t:
	a = []
	n = int(input())
	k = input().split()
	for i in k:
		a.append(int(i))
	a.sort()
	flag = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')
	t = t - 1


t = int(input())
for test in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort()
	prev = -1
	for i in ls:
		if prev != -1 and i - prev > 1:
			print('NO')
			break
		else:
			prev = i
	else:
		print('YES')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	c1 = 0
	c2 = 0
	for i in a:
		if i % 2 == 0:
			c1 += 1
		else:
			c2 += 1
	if c2 % 2 == 1 or (c1 > 0 and c2 > 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = len([i for i in list(map(int, input().split())) if i % 2 != 0])
	print('YES' if a % 2 != 0 or (a > 0 and n - a > 0) else 'NO')


t = int(input())
while t > 0:
	n = int(input())
	li = list(map(int, input().split(' ')))
	if sum(li) % 2 == 1:
		print('YES')
	else:
		even = 0
		odd = 0
		for i in li:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if even == 0 or odd == 0:
			print('NO')
		else:
			print('YES')
	t -= 1


t = int(input())
for test in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	ep = 0
	op = 0
	for el in arr:
		if el % 2 == 0:
			ep = 1
		else:
			op = 1
	if ep == 1 and op == 1:
		print('YES')
	elif ep == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		(evencnt, oddcnt) = (0, 0)
		for i in range(n):
			if a[i] % 2 == 0:
				evencnt += 1
			else:
				oddcnt += 1
		if evencnt > 0 and oddcnt > 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(0, t):
	n = int(input())
	arr = list(map(int, input().strip().split(' ')))
	arr.sort()
	if len(arr) == 1:
		print('YES')
		continue
	c = 0
	for i in range(1, len(arr)):
		if abs(arr[i - 1] - arr[i]) <= 1:
			continue
		else:
			c = 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	flag = 0
	for i in range(1, n):
		if li[i] - li[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = [int(i) for i in input().split()]
	if n == 1:
		print('YES')
	else:
		l = sorted(l)
		for i in range(1, n):
			if l[i] - l[i - 1] > 1:
				print('NO')
				break
		else:
			print('YES')


import sys
from collections import deque
start = deque(sys.stdin.readlines()[::-1])
samples_num = int(start.pop())
for i in range(samples_num):
	array_size = int(start.pop())
	arr = [int(num) for num in start.pop().split(' ') if int(num) % 2 == 1]
	if len(arr) > 0 and len(arr) != array_size or sum(arr) % 2 == 1:
		print('YES')
		continue
	print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	l = list(map(int, input().strip().split()))[:n]
	l.sort()
	j = 1
	while j < n:
		if l[j] - l[j - 1] > 1:
			break
		j += 1
	if j == n:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	a = int(input())
	arr = map(int, input().split(' '))
	even = 0
	odd = 0
	count = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
		count += 1
	if odd % 2 == 1 or (odd % 2 == 0 and even > 0):
		if even == count:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	c = 0
	if len(l) == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(l[i] - l[i + 1]) > 1:
				c = 1
				break
		if c == 1:
			print('NO')
		else:
			print('YES')


MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
for _ in range(ii()):
	n = ii()
	l = il()
	fg1 = 0
	fg2 = 0
	for i in l:
		if i % 2:
			fg1 = 1
		if i % 2 == 0:
			fg2 = 1
	if fg1 and fg2:
		print('YES')
	elif fg1 and (not fg2) and n % 2:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	nList = list(map(int, input().split()))
	if len(nList) == 1:
		print('YES')
	else:
		nList.sort()
		flag = True
		for i in range(n - 1):
			if nList[i + 1] - nList[i] >= 2:
				flag = False
				break
		if flag:
			print('YES')
		else:
			print('NO')


T = int(input())
for i in range(T):
	N = int(input())
	lst = list(map(int, input().split()))
	count = 0
	for j in lst:
		if j % 2 == 1:
			count += 1
	if sum(lst) % 2 == 1:
		print('YES')
	elif count < N and count > 0:
		print('YES')
	else:
		print('NO')


def so(ar, n):
	for i in range(n):
		for j in range(i + 1, n):
			if ar[i] > ar[j]:
				temp = ar[i]
				ar[i] = ar[j]
				ar[j] = temp

def rem(ar, n):
	f = 0
	for i in range(0, n - 1):
		if ar[i] - ar[i + 1] > 1 or ar[i] - ar[i + 1] < -1:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')
t = int(input())
for i in range(t):
	n = int(input())
	ar = [int(x) for x in input().split()]
	so(ar, n)
	rem(ar, n)


t = int(input())
for i in range(t):
	odd = 0
	even = 0
	tot = 0
	input()
	a = list(map(int, input().split()))
	for i in a:
		if i % 2 != 0:
			odd += 1
		else:
			even += 1
		tot += i
	if tot % 2 != 0 or (odd >= 1 and even >= 1):
		print('YES')
	else:
		print('NO')


for q in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	c = 0
	for i in a:
		if i % 2 != 0:
			c += 1
	if n == c:
		if c % 2 != 0:
			print('YES')
		else:
			print('NO')
	elif c > 0 and n != c:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	i = 0
	j = 0
	while i < n - 1:
		j = i + 1
		while j < n:
			if arr[j] - arr[i] <= 1:
				arr.pop(i)
				n -= 1
				i = 0
				j = 0
			j += 1
		i += 1
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	if a == 1:
		print('YES')
	else:
		c = 0
		for j in range(a - 1):
			if b[j + 1] - b[j] > 1:
				print('NO')
				c = c + 1
				break
		if c == 0:
			print('YES')


from sys import stdin, stdout

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

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


x = int(input())
for a in range(x):
	y = int(input())
	z = list(map(int, input().split()))
	e = 0
	o = 0
	s = 0
	for each in z:
		if each % 2 == 0:
			e += 1
		else:
			o += 1
		s += each
	if s % 2 == 1:
		print('YES')
	elif e > 0 and o > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	A = list(map(int, input().split()))
	flag = 'NO'
	cnt = 0
	if sum(A) % 2 != 0:
		flag = 'YES'
	else:
		for i in range(0, n):
			if A[i] % 2 != 0:
				cnt += 1
		if cnt == 0:
			flag = 'NO'
		elif cnt % 2 != 0:
			flag = 'YES'
		elif cnt % 2 == 0 and n % 2 != 0:
			flag = 'YES'
		elif cnt % 2 == 0 and cnt != n:
			flag = 'YES'
		else:
			flag = 'NO'
	print(flag)


n = int(input())
for i in range(n):
	j = int(input())
	liste = list(map(int, input().split()))
	pair = False
	impair = False
	for a in liste:
		if a % 2:
			impair = True
		else:
			pair = True
	if sum(liste) % 2:
		print('YES')
	elif pair and impair:
		print('YES')
	else:
		print('NO')


n = int(input())
from functools import reduce
for i in range(n):
	fake = int(input())
	arr = list(map(int, input().strip().split(' ')))
	sum = 0
	odd = 0
	even = 0
	sum = reduce(lambda x, y: x + y, arr)
	for y in arr:
		if y % 2 == 0:
			even += 1
		else:
			odd += 1
	if sum % 2 == 0 and even == 0:
		print('NO')
	elif sum % 2 == 0 and odd == 0:
		print('NO')
	else:
		print('YES')


a = int(input())
for i in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	d = 1
	for j in range(b - 1):
		if c[j] % 2 != c[j + 1] % 2:
			print('YES')
			d = 0
			break
	if d:
		if sum(c) % 2:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	x = [int(x) for x in input().split()]
	x.sort()
	flag = 0
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(x[i] - x[i + 1]) <= 1:
				continue
			else:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	li = []
	for i in range(len(l) - 1):
		s = l[i + 1] - l[i]
		li.append(s)
	c = 0
	for i in li:
		if i > 1:
			c = 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2 == 1:
			c += 1
	if c == 0 or (c == len(l) and len(l) % 2 == 0):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n,) = map(int, input().split())
	w = sorted(map(int, input().split()))
	r = all((y - x < 2 for (x, y) in zip(w, w[1:])))
	print('YES' if r else 'NO')


from math import *
from collections import *
from random import *
from decimal import Decimal
from bisect import *
import sys
input = sys.stdin.readline

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

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

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

def st():
	return input().rstrip('\n')
t = inp()
while t:
	t -= 1
	n = inp()
	a = lis()
	fl = 0
	a.sort()
	if n == 1:
		print('YES')
		continue
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			fl = 1
			break
	if fl:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	for num in a:
		if num % 2 != 0:
			count += 1
	if count != n and count >= 1:
		print('YES')
	elif count == n and n % 2 != 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = sorted(list(map(int, input().split())))
	print('YES' if all((s[ele] - s[ele - 1] <= 1 for ele in range(1, n))) else 'NO')


from collections import defaultdict as dc
from heapq import *
import math
import bisect
from collections import deque as dq

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

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

def check(n, d, x):
	if x < 0:
		return 0
	return n >= x + math.ceil(d / (x + 1))

def unique(a, n):
	p = dc(int)
	for i in range(n):
		p[a[i] % 2] += 1
	if p[0] == n:
		return 0
	if p[1] == n:
		if n % 2 == 0:
			return 0
		return 1
	if p[0] != 0 and p[1] != 0:
		return 1

def form(h, n, x):
	if abs(h - n) % x == 0:
		return 1
	return 0
for _ in range(int(input())):
	n = inp()
	a = line()
	z = unique(a, n)
	if z == 1:
		print('YES')
	else:
		print('NO')


f = 1
te = int(input())
for i in range(te):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	a.sort()
	if len(a) == 1:
		f = 1
	else:
		j = 0
		while j < len(a) - 1:
			if a[j + 1] - a[j] > 1:
				f = 0
				break
			else:
				f = 1
			j += 1
	if f == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = True
	now = 1
	while ans and now < n:
		if abs(a[now] - a[now - 1]) > 1:
			ans = False
		now += 1
	if ans:
		print('YES')
	else:
		print('NO')


import sys

def main():
	res = ''
	input = sys.stdin.readline
	print = sys.stdout.write
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(set(map(int, input().split())))
		a.sort()
		sub_res = 'YES\n'
		for i in range(len(a) - 1):
			if abs(a[i] - a[i + 1]) > 1:
				sub_res = 'NO\n'
				break
		res += sub_res
	print(res)
main()


a = int(input())
i = 0
b = []
ab = []
while i < a:
	b = int(input())
	aa = list(map(int, input().strip().split()))
	aa.sort()
	if len(aa) == 1:
		ab.append('YES')
	else:
		l = 0
		m = 1
		while l < len(aa) - 1:
			cp = 0
			if abs(aa[l] - aa[m]) < 1:
				cp = 1
			elif abs(aa[l] - aa[m]) == 1:
				cp = 1
			else:
				cp = 0
				break
			m += 1
			l += 1
		if cp == 1:
			ab.append('YES')
		else:
			ab.append('NO')
	i += 1
for each in ab:
	print(each)


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a1 = a.copy()
	for i in range(n):
		if i < n - 1:
			if abs(a[i] - a[i + 1]) <= 1:
				if a[i + 1] > a[i]:
					a1.remove(a[i])
				else:
					a1.remove(a[i + 1])
	if len(a1) > 1:
		print('NO')
	elif len(a1) == 1:
		print('YES')


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

def gift():
	for _ in range(t):
		n = int(input())
		arry = list(map(int, input().split()))
		if n == 1:
			yield 'YES'
		else:
			ans = True
			arry.sort()
			for i in range(n - 1):
				if arry[i + 1] - arry[i] > 1:
					ans = False
					break
			yield ('YES' if ans else 'NO')
t = int(input())
ans = gift()
print(*ans, sep='\n')


for i in range(int(input())):
	(n, arr) = (int(input()), list(map(int, input().split(' '))))
	arr.sort()
	count = 0
	while count != n - 1:
		if arr[count] < arr[count + 1] - 1:
			print('NO')
			break
		count += 1
	else:
		print('YES')


import math

def solve(a):
	a.sort()
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
sol = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sol.append(solve(a))
for i in sol:
	print(i)


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


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	c = 0
	for i in range(1, len(l)):
		if l[i] - l[i - 1] >= 2:
			c += 1
	if c == 0:
		print('YES')
	else:
		print('NO')
	t = t - 1


def q661a():
	num_cases = int(input())
	for _ in range(num_cases):
		arr_size = int(input())
		arr = []
		if arr_size == 1:
			arr = [int(input())]
		else:
			arr = [int(num) for num in input().split()]
		arr.sort()
		is_slowly_increasing = q661a_is_slowly_increasing(arr, arr_size)
		if is_slowly_increasing == True:
			print('YES')
		else:
			print('NO')

def q661a_is_slowly_increasing(arr, arr_size):
	if arr_size == 1:
		return True
	for i in range(0, arr_size - 1):
		if arr[i + 1] - arr[i] > 1:
			return False
	return True
q661a()


import sys
input = sys.stdin.readline
t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	fl = True
	for i in range(n - 1):
		if l[i + 1] - l[i] <= 1:
			continue
		else:
			fl = False
			break
	if fl:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	i = 0
	j = i + 1
	c = n
	while i < n and j < n:
		if arr[j] - arr[i] <= 1:
			c -= 1
		i += 1
		j += 1
	if c == 1:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag1 = True
	flag2 = True
	for ai in a:
		if ai % 2 == 0:
			flag1 = False
		else:
			flag2 = False
	if n % 2 == 0 and flag1 or flag2:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split(' ')]
	a.sort()
	ok = True
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(a[i] - a[i + 1]) > 1:
				print('NO')
				ok = False
				break
		if ok:
			print('YES')


for i in range(int(input())):
	n = int(input())
	arr = list(set(map(int, input().split())))
	arr.sort()
	if len(arr) == 1:
		print('YES')
	else:
		ans = 0
		for i in range(0, len(arr) - 1):
			diff = abs(arr[i + 1] - arr[i])
			if diff >= 2:
				ans += 1
		if ans >= 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split(' ')))
	c = 0
	for j in a:
		if j % 2 == 1:
			c += 1
	if n % 2 == 0:
		if c == n:
			print('NO')
		elif c > 0:
			print('YES')
		else:
			print('NO')
	elif c > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	for i in range(n - 1):
		if A[i + 1] - A[i] >= 2:
			print('NO')
			break
	else:
		print('YES')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	a = [int(x) for x in inp().split()]
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	arr = s.split()
	c = 0
	for i in range(n):
		arr[i] = int(arr[i])
	arr.sort()
	for j in range(n - 1):
		if arr[j + 1] - arr[j] > 1:
			c = 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(input().split(' '))
	l.sort(key=lambda x: int(x))
	if n == 1:
		print('YES')
	else:
		for m in range(n - 1):
			a = 0
			if abs(int(l[m]) - int(l[m + 1])) > 1:
				print('NO')
				a = 1
				break
		if a == 0:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ec = oc = 0
	for i in ar:
		if i % 2 == 0:
			ec += 1
		else:
			oc += 1
	if oc < n and oc > 0:
		print('YES')
	elif oc == n and n % 2 != 0:
		print('YES')
	elif oc == 0:
		print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = input().split()
	for i in range(n):
		arr[i] = int(arr[i])
	arr = sorted(arr)
	a = True
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			a = False
			break
	if not a:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	x = int(input())
	lista = [int(x) for x in input().split()]
	lista.sort()
	count = 0
	for i in range(len(lista) - 1):
		if abs(lista[i] - lista[i + 1]) <= 1:
			count += 1
	if count == len(lista) - 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	j = int(input())
	k = sorted(list(map(int, input().split())))
	for o in range(j - 1):
		if k[o + 1] - k[o] > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	flag = 'e'
	lis = list(map(int, input().split()))
	o = 0
	for i in lis:
		if i % 2 != 0:
			o += 1
	if n % 2 == 0:
		if o == n:
			flag = 'e'
		elif o == 0:
			flag = 'e'
		else:
			flag = 'o'
	elif o == n:
		flag = 'o'
	elif o == 0:
		flag = 'e'
	else:
		flag = 'o'
	if flag == 'o':
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in a:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == n:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif odd > 0:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	num = list(map(int, input().split()))
	gotodd = False
	goteven = False
	for i in num:
		if i % 2 == 1:
			gotodd = True
		if i % 2 == 0:
			goteven = True
	if gotodd == True and goteven == False and (n % 2 == 1):
		print('YES')
	elif gotodd == True and goteven == False and (n % 2 == 0):
		print('NO')
	elif gotodd == True:
		print('Yes')
	else:
		print('NO')


n = int(input())
for i in range(0, n):
	m = int(input())
	t = input()
	t = t.split(' ')
	t = list(map(int, t))
	t = sorted(t)
	(count, k, flag) = (0, 0, 0)
	i = 1
	l = len(t)
	while l != 1:
		if t[i] - t[i - 1] == 1:
			count = count + 1
			if flag == 0:
				k = i - 1
				flag = 1
			i = i + 1
		elif t[i] - t[i - 1] == 0:
			t.remove(t[i])
		else:
			if count != 0:
				t = t[:k] + t[k + count:]
				i = i - count
				count = 0
			else:
				i = i + 1
			flag = 0
		l = l - 1
	if count != 0:
		t = t[:k] + t[k + count:]
	if len(t) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	for i in range(n):
		if a[i] == m:
			if i == n - 1:
				print('Yes')
			continue
		if a[i] + 1 in a:
			if i == n - 1:
				print('Yes')
			continue
		else:
			print('No')
			break
		if i == n - 1:
			print('Yes')


import collections
from functools import lru_cache

def read():
	return input().strip()

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

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

def solve(N, arr):
	arr.sort()
	for (a, b) in zip(arr, arr[1:]):
		if b - a > 1:
			return False
	return True
t = readInt()
for i in range(t):
	N = readInt()
	arr = readList()
	print('YES' if solve(N, arr) else 'NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ans = 'YES'
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			ans = 'NO'
			break
	print(ans)


for s in [*open(0)][2::2]:
	a = set(map(int, s.split()))
	print('YNEOS'[max(a) - min(a) + 1 > len(a)::2])


t = int(input())
from collections import Counter
for i in range(t):
	n = int(input())
	inp = list(map(int, input().split()))
	x = [item % 2 for item in inp]
	c = Counter(x)
	l = list(c.keys())
	if len(l) == 2:
		print('YES')
	else:
		s = sum(x)
		if s % 2 == 1:
			print('YES')
		else:
			print('NO')


import math
ls = lambda : list(map(int, input().split()))
ip = lambda : int(input())
sip = lambda : input()
r = lambda a: range(a)
lcm = lambda a, b: abs(a * b) // math.gcd(a, b)
t = ip()
for _ in r(t):
	n = ip()
	a = ls()
	a = sorted(a)
	yes = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			yes = False
			break
	if yes:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sum([int(i) % 2 for i in input().split()])
	print(['NO', 'YES'][a and a != n or (a == n and n % 2)])


t = int(input())
a = []
b = []
for i in range(0, t):
	w = int(input())
	i = 0
	a = a + [int(a) for a in input().split()]
	a = sorted(a)
	for k in range(1, w):
		if a[k] - a[k - 1] > 1:
			i = i + 1
	if i == 0:
		b = b + ['YES']
	else:
		b = b + ['NO']
	del a[:]
for i in b:
	print(i)


def solve():
	n = int(input())
	As = list(map(int, input().split()))
	odd_num = len([a for a in As if a % 2 == 1])
	if odd_num == 0:
		return False
	elif odd_num % 2 == 1:
		return True
	elif n > odd_num:
		return True
	return False
t = int(input())
for _ in range(t):
	print('YES' if solve() else 'NO')


import sys

def query():
	n = int(input())
	a = [int(x) for x in input().split()]
	if n % 2 == 1:
		for x in a:
			if x % 2 == 1:
				print('YES')
				break
		else:
			print('NO')
	else:
		odd = 0
		for x in a:
			odd += x % 2
		if 0 < odd < n:
			print('YES')
		else:
			print('NO')
q = int(input())
for i in range(0, q):
	query()


t = int(input())
for _ in range(t):
	b = True
	x = int(input())
	l = sorted(map(int, input().split()))
	if len(l) == 0:
		print('YES')
		continue
	else:
		for i in range(x - 1):
			if l[i + 1] - l[i] > 1:
				b = False
				break
		print('YES') if b else print('No')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	(odd, even) = (False, False)
	for i in a:
		if i % 2 == 1:
			odd = True
		else:
			even = True
	if sum(a) % 2 == 1 or (odd and even):
		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')
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in a:
		if i % 2:
			odd += 1
		else:
			even += 1
	if sum(a) % 2:
		print('YES')
		continue
	elif odd > 0 and even > 0:
		print('YES')
		continue
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	odd = False
	even = False
	flag = False
	for e in arr:
		if e & 1 == 1:
			odd = True
		else:
			even = True
		if n & 1 == 1 and odd:
			print('YES')
			flag = True
			break
		if n & 1 == 0 and odd and even:
			print('YES')
			flag = True
			break
	if not flag:
		print('NO')


import sys
from math import sqrt, gcd, ceil, log
from collections import defaultdict, Counter, deque
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))

def main():
	for _ in range(int(input())):
		n = int(input())
		arr = read()
		arr.sort()
		f = 1
		for i in range(n - 1):
			if not (arr[i + 1] - 1 == arr[i] or arr[i] == arr[i + 1]):
				f = 0
				break
		if f:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	maxx = max(a)
	minn = min(a)
	tmp_list = [0] * 100
	for i in a:
		tmp_list[i - 1] = 1
	if sum(tmp_list[minn:maxx]) == maxx - minn:
		print('YES')
	else:
		print('NO')


from sys import stdin
t = int(stdin.readline())
while t:
	n = int(input())
	a = list(map(int, stdin.readline().split()))
	if all((j & 1 == 0 for j in a)):
		print('NO')
	elif n & 1 == 0 and all((j & 1 for j in a)):
		print('NO')
	else:
		print('YES')
	t -= 1


n = int(input())
for i in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	s = 0
	se = 0
	so = 0
	for j in range(m):
		s += a[j]
		if a[j] % 2 == 0:
			se += 1
		else:
			so += 1
	if s & 1:
		print('YES')
	elif se and so:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	am = int(input())
	arr = list(map(int, input().split()))
	fl = True
	arr.sort()
	for i in range(am - 1):
		if arr[i + 1] - arr[i] > 1:
			fl = False
			break
	if fl:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = False
	even = False
	for i in a:
		if i % 2:
			odd = True
		if not i % 2:
			even = True
	if n % 2:
		if odd:
			print('YES')
		else:
			print('NO')
	elif odd and even:
		print('YES')
	else:
		print('NO')


import sys, bisect, copy, heapq
from collections import defaultdict, Counter, deque
from functools import lru_cache

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

def print(arg, *argv, end=None):
	sys.stdout.write(str(arg))
	for i in argv:
		sys.stdout.write(' ' + str(i))
	sys.stdout.write(end) if end or end == '' else sys.stdout.write('\n')

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

def maps():
	return map(str, input().split())

def solve():
	t = 1
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(mapi())
		sm = sum(a)
		if sm % 2 == 1:
			print('YES')
		else:
			flag = False
			cnt = 0
			for i in range(n):
				if a[i] % 2 == 1:
					cnt += 1
					flag = True
			if flag and cnt != n:
				print('YES')
			else:
				print('NO')
solve()


def answer():
	n = int(input())
	c = []
	while n:
		cancer = input()
		a = input().split()
		a = [int(x) for x in a]
		i = 0
		done = 0
		part1 = 0
		part2 = 0
		finished = 0
		while i < len(a):
			if not part1:
				if a[i] % 2:
					part1 = 1
			if not part2:
				if not a[i] % 2:
					part2 = 1
			if part1 and part2 or (part1 and len(a) % 2):
				c.append('YES')
				finished = 1
				break
			i += 1
		if not finished and (not part1 or not part2):
			c.append('NO')
		n -= 1
	for x in c:
		print(x)
answer()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	prev = l[0]
	flag = False
	for i in range(1, n):
		if l[i] - prev > 1:
			flag = True
			break
		else:
			prev = l[i]
	print('NO' if flag else 'YES')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l = list(set(l))
	l.sort()
	if max(l) - min(l) < len(l):
		print('Yes')
	else:
		print('No')


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


for i in range(int(input())):
	length = int(input())
	array = list(map(int, input().split()))
	array.sort()
	for j in range(1, length):
		if array[j] - array[j - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = sorted(map(int, stdin.readline().split()))
	res = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			res = 'NO'
			break
	print(res)


import math
from collections import Counter
from math import factorial as fact
from collections import defaultdict
import sys

def inpint():
	return int(input())

def inpstr():
	return str(input())

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

def inptup():
	return map(int, input().strip().split())
for _ in range(inpint()):
	n = inpint()
	a = inparr()
	a.sort()
	lol = a[0]
	flag = False
	for i in range(1, n):
		if lol == a[i]:
			pass
		elif lol + 1 == a[i]:
			lol = a[i]
		else:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')


def removeSmallest(length, nums):
	popped = 0
	nums.sort()
	if len(nums) == 1:
		return 'YES'
	for i in range(length - 1):
		if not abs(nums[i] - nums[i + 1]) <= 1:
			break
		if i == length - 2:
			return 'YES'
	return 'NO'
for i in range(int(input())):
	length = int(input())
	nums = [int(i) for i in input().split(' ')]
	print(removeSmallest(length, nums))


for i in range(int(input())):
	n = int(input())
	num = list(map(int, input().split()))
	num.sort()
	pre = num.pop(0)
	ans = True
	for i in num:
		if i - pre > 1:
			ans = False
			break
		pre = i
	if ans:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	f = 0
	j = 0
	i = 1
	while i < n:
		if abs(ar[i] - ar[j]) <= 1:
			i += 1
			j += 1
			f = 0
		else:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


t = int(input())

def sum_even_and_odd(iterable):
	odd_count = sum((1 for j in iterable if j & 1))
	return (odd_count, len(iterable) - odd_count)
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	(count_odd, count_even) = sum_even_and_odd(a)
	print('NO') if count_odd == 0 or (count_odd >= 1 and (not count_odd & 1) and (count_even == 0)) else print('YES')


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict

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

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

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	try:
		for _ in range(I()):
			n = I()
			l = L()
			q = 0
			count = 0
			for x in l:
				if x & 1 == 1:
					count += 1
			if count == n:
				if count & 1 == 1:
					print('YES')
				else:
					print('NO')
			elif count == 0:
				print('NO')
			else:
				print('YES')
	except:
		pass
main()


tc = int(input())
while tc > 0:
	tc = tc - 1
	n = int(input())
	k = list(map(int, input().split()))
	l = set(k)
	if max(l) - min(l) + 1 == len(l):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = 'NO'
	if len(a) % 2 == 1:
		for v in a:
			if v % 2 == 1:
				ans = 'YES'
				break
	else:
		odd = False
		even = False
		for v in a:
			if v % 2 == 1:
				odd = True
			else:
				even = True
			if odd and even:
				ans = 'YES'
				break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	n_odd = 0
	status = [0] * n
	for j in range(len(l)):
		if l[j] % 2 != 0:
			status[j] = 1
			n_odd += 1
	if n_odd == 0:
		print('NO')
	elif n_odd % 2 == 0 and n_odd == n:
		print('NO')
	else:
		print('YES')


t = int(input())
for t_c in range(t):
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	a.sort()
	prev = a[0]
	possible = True
	for i in range(1, len(a)):
		cur = a[i]
		if cur - prev > 1:
			possible = False
			break
		prev = cur
	if possible:
		print('YES')
	else:
		print('NO')


def main():
	for case in range(int(input())):
		n = int(input())
		arr = list(map(int, input().split()))
		arr.sort()
		for i in range(n - 1):
			if arr[i + 1] - arr[i] > 1:
				print('NO')
				break
		else:
			print('YES')
main()


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	work = True
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			work = False
			break
	if work:
		print('YES')
	else:
		print('NO')
t = int(input())
for test in range(t):
	solve()


for n in range(int(input())):
	input()
	s = input().split()
	a = set(map(int, s))
	b = set(map(lambda x: int(x) + 1, s))
	c = a - b
	print('YNEOS'[len(c) > 1::2])


t = int(input())
for _ in range(t):
	n = int(input())
	xs = list(map(int, input().split()))
	xs.sort()
	for (x, y) in zip(xs, xs[1:]):
		if y - x >= 2:
			break
	else:
		print('YES')
		continue
	print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	o = 0
	e = 0
	for v in a:
		if v % 2 != 0:
			o += 1
		else:
			e += 1
	if o % 2 != 0:
		print('YES')
	elif e >= 1 and o > 0:
		print('YES')
	else:
		print('NO')


from sys import stdin as s
t = int(s.readline())
lines = s.read().splitlines()
for i in range(0, len(lines), 2):
	n = int(lines[i])
	a = [int(x) for x in lines[i + 1].split()]
	if sum(a) & 1:
		print('YES')
	else:
		has_odd = False
		has_even = False
		for x in a:
			if x & 1:
				has_odd = True
			else:
				has_even = True
		if has_odd and has_even:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = input()
	li = list(map(int, input().split()))
	cnt = 0
	for i in range(min(li), max(li) + 1):
		if i not in li:
			cnt = 1
			break
	if cnt == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	p = 1
	for i in range(n - 1):
		if s[i + 1] - s[i] > 1:
			p = 0
			break
	if p == 1:
		print('YES')
		continue
	print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	flag = 1
	for i in range(n - 1):
		if a[i + 1] > a[i] + 1:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input().strip())):
	n = int(input().strip())
	arr = [int(__) for __ in input().strip().split()]
	(e, o) = (0, 0)
	for x in arr:
		if x & 1:
			o += 1
		else:
			e += 1
	su = sum(arr)
	if su & 1:
		print('YES')
	elif e == 0 or o == 0:
		print('NO')
	else:
		print('YES')


test = int(input())
while test > 0:
	test = test - 1
	n = int(input())
	a = list(map(int, input().split()))
	dif = 0
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			dif = 2
			break
	if dif == 2:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	o = 0
	for i in arr:
		if i % 2 != 0:
			o += 1
	if o == 0:
		print('NO')
	elif o == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for u in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort(reverse=True)
	otv = True
	for i in range(n - 1):
		if a[i] - a[i + 1] > 1:
			otv = False
	if otv:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = 0
	for j in range(n - 1):
		if abs(a[j] - a[j + 1]) <= 1:
			flag = 0
		else:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	while True:
		if len(a) == 1:
			break
		if a[1] - a[0] > 1:
			break
		del a[0]
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	L = list(map(int, input().split()))
	if n % 2 == 0:
		if all((i % 2 == 0 for i in L)) or all((i % 2 != 0 for i in L)):
			print('NO')
		else:
			print('YES')
	elif all((i % 2 == 0 for i in L)):
		print('NO')
	else:
		print('YES')


test = int(input())
for testcase in range(test):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				print('NO')
				break
		else:
			print('YES')


from sys import stdin, stdout
import traceback
read = stdin.readline
write = stdout.write
writeln = lambda x: write(str(x) + '\n')

def reads(typ=int):
	return list(map(typ, read().split()))

class Sol:

	@classmethod
	def input(cls):
		s = cls()
		s.n = int(read())
		s.A = reads()
		return s

	def solve(self):
		odd = 0
		even = 0
		for a in self.A:
			if a % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd > 0 and even > 0:
			return True
		elif odd == 0:
			return False
		elif even == 0:
			return odd % 2 == 1
		else:
			raise RuntimeError('not possible')
try:
	for _ in range(int(read())):
		writeln('YES' if Sol.input().solve() else 'NO')
except Exception as e:
	print('Got exception:', repr(e))
	print(traceback.format_exc())


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	res = ''
	if all((i % 2 == 1 for i in a)):
		if n % 2 == 0:
			res = 'NO'
		else:
			res = 'YES'
	elif all((i % 2 == 0 for i in a)):
		res = 'NO'
	else:
		res = 'YES'
	print(res)


def go():
	n = int(input())
	arr = map(int, input().split())
	s = 0
	(has_odd, has_even) = (False, False)
	for x in arr:
		if x % 2 == 0:
			has_even = True
		else:
			s ^= 1
			has_odd = True
	return s == 1 or (has_odd and has_even)

def main():
	t = int(input())
	for i in range(t):
		print('YES' if go() else 'NO')
main()


import math
t = int(input())
for _ in range(t):
	n = int(input())
	nums = [int(i) for i in input().split(' ')]
	nums.sort()
	can = True
	for i in range(len(nums) - 1):
		if nums[i] + 1 < nums[i + 1]:
			can = False
	print('YES' if can else 'NO')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		A = [int(x) for x in input().split()]
		if sum(A) & 1:
			print('YES')
			continue
		odd = 0
		even = 0
		for a in A:
			if a & 1:
				odd += 1
			else:
				even += 1
		if even > 0 and odd > 0:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
inputarrs = list()
for r in range(t):
	input()
	inputarrs.append(list(map(int, input().split(' '))))
for a in inputarrs:
	has = False
	asum = sum(a)
	if asum % 2 != 0:
		print('YES')
		continue
	prev = a[0] % 2
	for q in range(1, len(a)):
		cur = a[q] % 2
		if prev != cur:
			has = True
			break
	if has:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		print('YES')
	else:
		i = 0
		flag = True
		while flag and len(a) > 1:
			if abs(a[i + 1] - a[i]) <= 1:
				if a[i + 1] < a[i]:
					del a[i + 1]
				else:
					del a[i]
			else:
				i += 1
			if i == len(a) - 1:
				flag = False
		if len(a) == 1:
			print('YES')
		else:
			print('NO')


import sys

def valid_array(array):
	array.sort()
	for i in range(1, len(array)):
		if abs(array[i] - array[i - 1]) > 1:
			return False
	return True
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	array = list(map(int, sys.stdin.readline().split()))
	if valid_array(array):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	k = int(input())
	m = [int(x) for x in input().split()]
	cnt = 0
	for j in range(k):
		cnt += m[j] % 2
	if cnt == 0 or (cnt == k and k % 2 == 0):
		print('NO')
	else:
		print('YES')


def remove_smallest(arr):
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	assert n == len(arr)
	arr.sort()
	print(remove_smallest(arr))


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	n = IN()
	a = sorted(LI())
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			print('NO')
			return
	print('YES')
for _ in range(IN()):
	case()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	flag = False
	i = 0
	while i < n - 1:
		if arr[i + 1] - arr[i] <= 1:
			arr.pop(i)
			n -= 1
			flag = True
		else:
			i += 1
	if n == 1:
		print('YES')
	else:
		print('NO')


def solve(a, x):
	co = 0
	ce = 0
	for i in a:
		if i % 2 != 0:
			co += 1
		else:
			ce += 1
	if sum(a) % 2 != 0:
		return 'YES'
	if co == x and x % 2 == 0:
		return 'NO'
	if ce == x:
		return 'NO'
	return 'YES'
n = int(input())
for p in range(n):
	x = int(input())
	a = list(map(int, input().split()))
	print(solve(a, x))


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	f = 0
	for j in l:
		if j % 2 != 0:
			c += 1
	if c == n:
		if c % 2 != 0:
			f = 1
		else:
			f = 0
			print('NO')
			continue
	elif c % 2 != 2 and c != 0:
		f = 1
	else:
		f = 0
	if f == 1:
		print('YES')
	else:
		print('NO')


def func():
	n = int(input())
	l = list(map(int, input().split()))
	if n == 1:
		return True
	l.sort()
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			return False
	return True
for _ in range(int(input())):
	if func():
		print('YES')
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase

def main():
	t = int(input())
	while t:
		t -= 1
		n = int(input())
		a = [int(_) for _ in input().split()]
		sm = int(0)
		for i in a:
			sm += i
		if sm % 2:
			print('YES')
		else:
			od = int(0)
			ev = int(0)
			for i in a:
				if i % 2:
					od += 1
				else:
					ev += 1
			if od == 0 or ev == 0:
				print('NO')
			else:
				print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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


import sys
lines = sys.stdin.read().splitlines()
lincnt = -1

def input():
	global lincnt
	lincnt += 1
	return lines[lincnt]

def solve():
	input()
	l = list(sorted(map(int, input().split())))
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			print('NO')
			return
	print('YES')
for _ in range(int(input())):
	solve()


t = int(input())
while t:
	n = int(input())
	l = []
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	i = 0
	while i < len(l) - 1:
		if abs(l[i] - l[i + 1]) <= 1:
			l.pop(0)
		else:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	num = sorted(list(map(int, input().split())))
	a = 0
	for i in range(n - 1):
		a = max(a, num[i + 1] - num[i])
	if a == 0 or a == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for t_i in range(t):
	input()
	a = list(map(int, input().split()))
	a.sort()
	valid = True
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	m = int(input())
	ans = 'YES'
	arr = list(map(int, input().split()))
	arr.sort()
	while len(arr) > 1:
		if arr[1] - arr[0] <= 1:
			arr.remove(arr[0])
		else:
			ans = 'NO'
			break
	print(ans)


for _ in range(int(input())):
	N = int(input())
	seq = list(map(int, input().split()))
	seq.sort()
	for i in range(1, N):
		if seq[i] - seq[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
from collections import deque
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 1
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			f = 0
			break
	if f:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	i = 0
	while i < n:
		k = i
		j = i + 1
		if j == n:
			break
		if arr[i] - arr[j] == 1 or arr[i] - arr[j] == -1 or arr[i] - arr[j] == 0:
			arr.remove(min(arr[i], arr[j]))
			i = k
			n = n - 1
		else:
			i = i + 1
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	f = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			f = False
	print('YES' if f is True 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')

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

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

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

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

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

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')

def lcm(a, b):
	return a * b // lcm(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		n = N()
		arr = RLL()
		arr.sort(reverse=1)
		for i in range(1, n):
			if arr[i] < arr[i - 1] - 1:
				print('NO')
				break
		else:
			print('YES')
main()


def removeSmallest():
	a.sort()
	i = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for case in range(t):
	n = int(input())
	a = [int(x) for x in input().rstrip().split(' ')]
	print(removeSmallest())


t = int(input())
while t > 0:
	n = int(input())
	x = list(map(int, input().split(' ')))
	x.sort()
	i = 0
	y = True
	while i <= n - 2:
		if x[i] >= x[i + 1] and x[i] - x[i + 1] <= 1:
			x.pop(i + 1)
		elif x[i] < x[i + 1] and x[i + 1] - x[i] <= 1:
			x.pop(i)
		else:
			y = False
			break
		n -= 1
	if y == True:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	flag = 0
	if n == 1:
		print('YES')
		flag = 1
	for i in range(1, n):
		if nums[i] - nums[i - 1] > 1:
			flag = 2
			break
	if flag == 0:
		print('YES')
	elif flag == 2:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	ok = 'YES'
	for x in range(1, n):
		if a[x] - a[x - 1] > 1:
			ok = 'NO'
	print(ok)


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	k = 0
	for i in range(1, len(a)):
		if abs(a[i] - a[i - 1]) > 1:
			k = 1
			print('NO')
			break
	if k == 0:
		print('YES')


t = int(input())
for case in range(t):
	n = int(input())
	a = [int(s) for s in input().split(' ')]
	if len([b for b in a if b % 2 == 1]) == 0:
		print('NO')
	elif len([b for b in a if b % 2 == 0]) == 0 and n % 2 == 0:
		print('NO')
	else:
		print('YES')


from sys import *
input = stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		l.sort()
		c = 0
		for i in range(n - 1):
			if l[i + 1] - l[i] > 1:
				c = -1
				break
		if c == -1:
			print('NO')
		else:
			print('YES')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = 'YES'
	for elem in range(n - 1):
		if abs(a[elem] - a[elem + 1]) > 1:
			ans = 'NO'
			break
	print(ans)


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


t = int(input())
for i in range(t):
	n = int(input())
	values = sorted(map(int, input().split()))
	for i in range(1, n):
		if values[i] - values[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


def solve(n, a):
	par = sum(a) % 2
	if par == 1:
		print('YES')
		return
	if any((x % 2 == 0 for x in a)) and any((x % 2 == 1 for x in a)):
		print('YES')
	else:
		print('NO')
t = int(input())
for x in range(t):
	solve(int(input()), list(map(int, input().split())))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = 0
	if len(a) == 1:
		print('YES')
	else:
		for i in range(1, len(a)):
			if a[i] - a[i - 1] <= 1:
				pass
			else:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')


t = int(input())
arr = [0] * 100
while t:
	n = int(input())
	arr[:n] = map(int, input().split(' '))
	arr[:n] = sorted(arr[:n])
	flag = 1
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) > 1:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')
	t -= 1


def solve(arr, n):
	if n == 1:
		return 'YES'
	arr.sort()
	j = 1
	while j < n:
		if arr[j] - arr[j - 1] > 1:
			return 'NO'
		j += 1
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr, n))


t = int(input())
for i in range(t):
	n = int(input())
	flag_n2 = False
	flag_t = False
	a = [int(i) for i in input().split()]
	if sum(a) % 2 != 0:
		print('YES')
	else:
		for i in a:
			if i % 2 != 0:
				flag_n2 = True
			if i % 2 == 0:
				flag_t = True
		if flag_n2 and flag_t:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	t = list(map(int, input().split()))
	if sum(t) % 2:
		print('YES')
	else:
		odd = False
		even = False
		for i in t:
			if i % 2:
				odd |= True
			else:
				even |= True
		if odd & even:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for g in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	suma = sum(a)
	if sum(a) % 2 != 0:
		print('YES')
	else:
		ans = 0
		for i in range(0, n):
			if a[i] % 2 == 0:
				ans += 1
				break
		for i in range(0, n):
			if a[i] % 2 != 0:
				ans += 1
				break
		if ans == 2:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	yep = False
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			yep = True
			break
	if not yep:
		print('YES')


from collections import deque
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if len(a) == 1:
		print('YES')
		continue
	a.sort()
	c = True
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			c = False
			break
	if c:
		print('YES')


def check(list):
	return all((i == list[0] for i in list))
t = int(input())
while t > 0:
	c = 0
	n = int(input())
	a = list(map(int, input().split()))
	if check(a) == True:
		if a[0] % 2 != 0 and sum(a) % 2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		only_odd = [num for num in a if num % 2 == 1]
		o = len(only_odd)
		e = n - o
		if e == n:
			print('NO')
		elif sum(a) % 2 != 0:
			print('YES')
		else:
			for i in range(0, n):
				if a[i] % 2 == 0:
					print('YES')
					c = 1
					break
			if c == 0:
				print('NO')
	t = t - 1


def f():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = list(map(lambda x: int(x), input().split(' ')))
		arr.sort()
		i = 1
		while i < len(arr):
			if arr[i] > arr[i - 1] + 1:
				print('NO')
				break
			i += 1
		if i == len(arr):
			print('YES')
f()


t = int(input())
for i in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	a = list(set(l))
	if len(a) == 1:
		print('YES')
	else:
		a.sort()
		if a[len(a) - 1] == a[0] + len(a) - 1:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline

def sub_solve(num_even, num_odd):
	if num_odd % 2 == 1:
		return True
	elif num_odd % 2 == 0 and num_odd > 0 and (num_even > 0):
		return True
	else:
		return False

def solve(n, arr):
	num_odd = 0
	for v in arr:
		if v % 2 == 1:
			num_odd += 1
	num_even = n - num_odd
	return sub_solve(num_even, num_odd)
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	if solve(n, arr):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	odds = 0
	evens = 0
	a = list(map(int, input().split()))
	for ai in a:
		if ai % 2:
			odds += 1
		else:
			evens += 1
	if odds % 2:
		print('YES')
	elif odds > 0 and evens > 0:
		print('YES')
	else:
		print('NO')


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

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

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

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

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

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)))
t = 1
t = iinput()
for _ in range(t):
	n = iinput()
	a = list(set(rlinput()))
	a.sort()
	flag = True
	for i in range(1, len(a)):
		if a[i] - a[i - 1] != 1:
			flag = False
			break
	print(['NO', 'YES'][flag])


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 gcd, ceil

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

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

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 = sorted(list(map(int, input().split())))
	pos = True
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			continue
		else:
			pos = False
			break
	print('YES' if pos else 'NO')


t = int(input())
for test_case in range(t):
	n = int(input())
	a = [int(e) for e in input().split()]
	a.sort()
	ok = True
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			ok = False
	print('YES' if ok else 'NO')


def rem(arr, n):
	arr.sort()
	while True:
		if len(arr) == 1:
			return 'YES'
		if arr[1] - arr[0] <= 1:
			arr.remove(arr[0])
		else:
			break
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(rem(arr, n))


t = int(input())
a = []
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	a.append(b)
for i in a:
	if sum(i) % 2 != 0:
		print('YES')
	else:
		p = 0
		q = 0
		for j in i:
			if p == 1 and q == 1:
				break
			if j % 2 == 0:
				p = 1
			else:
				q = 1
		if p == 1 and q == 1:
			print('YES')
		else:
			print('NO')


n = int(input())
for i in range(n):
	a = int(input())
	b = [int(i) for i in input().split(' ')]
	odd = 0
	for j in b:
		if j % 2 == 1:
			odd += 1
	even = a - odd
	if odd % 2 == 0:
		if odd > 0:
			if even > 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('YES')


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	eve = 0
	odd = 0
	for j in a:
		if j % 2 == 0:
			eve += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
	elif eve == 0 and n % 2 == 0:
		print('NO')
	else:
		print('YES')


import math
for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(len(l) - 1):
		if math.fabs(l[i] - l[i + 1]) <= 1:
			n -= 1
	if n == 1:
		print('YES')
	else:
		print('NO')


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

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

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

def si():
	return input().split()
t = ii()
for _ in range(t):
	n = ii()
	a = li()
	a.sort()
	ans = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			ans = False
			break
	if not ans:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	k = list(map(int, input().split()))
	e = [x for x in k if x % 2 != 0]
	p = len(k) - len(e)
	if p > 0 and len(e) > 0 or sum(k) % 2 != 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	x = int(input())
	a = list(map(int, input().split()))
	a.sort()
	c = 0
	b = [0] * (len(a) - 1)
	for j in range(len(a) - 1):
		b[j] = a[j + 1] - a[j]
	for item in b:
		if item > 1:
			continue
		else:
			c += 1
	if c == len(b):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	ans = 'YES'
	for i in range(0, n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			ans = 'NO'
			break
	print(ans)
	t -= 1


def solve(a):
	a = sorted(a)
	for i in range(len(a) - 1):
		if a[i + 1] > a[i] + 1:
			return 'NO'
	return 'YES'
t = int(input())
for dum in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	res = solve(a)
	print(res)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	f = 1
	a = sorted(map(int, stdin.readline().split()))
	for (v, v1) in zip(a, a[1:]):
		if v1 - v > 1:
			f = 0
			break
	print('YES' if f else 'NO')


import sys
import math
from collections import Counter
import heapq
try:
	for _ in range(int(input())):
		n = int(input())
		arr = [int(i) for i in input().split()]
		arr.sort()
		flg = 0
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				flg = 1
				break
		if flg == 1:
			print('NO')
		else:
			print('YES')
except EOFError as e:
	print(e)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	even = False
	odd = False
	c = 0
	while (not even or not odd) and c < n:
		if a[c] % 2 == 0:
			even = True
		else:
			odd = True
		c += 1
	if even and odd:
		print('YES')
	elif odd and n % 2 == 1:
		print('YES')
	else:
		print('NO')


def check():
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return False
	return True
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = sorted(map(int, input().split()))
	if check():
		print('YES')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	a = int(input())
	b = list(map(int, input().split()))
	b = sorted(b)
	thing = True
	for i in range(a - 1):
		if b[i + 1] - b[i] > 1:
			thing = False
	print('YES' if thing == True else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	ne = True
	ch = True
	j = 0
	while ne and ch or j < n:
		if a[j] % 2 == 0:
			ch = False
		else:
			ne = False
		j += 1
	if not ne and (not ch):
		print('YES')
	elif sum(a) % 2 == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ans = True
	for i in range(1, n):
		ans &= l[i] - l[i - 1] <= 1
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for test in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	ans = 'YES'
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	str = input()
	values = [int(x) for x in str.split(' ')]
	values.sort()
	for (x, y) in zip(values[1:], values):
		if x - y > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(t):
	p = 0
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	else:
		a = sorted(a)
		for j in range(n - 1):
			if a[j + 1] - a[j] > 1:
				p = 1
				break
	if p == 1:
		print('NO')
	else:
		print('YES')


t = int(input())

def fun1(a, n):
	for b in range(1, n):
		if a[b] - a[b - 1] > 1:
			return 'NO'
	return 'YES'
for i in range(0, t):
	n = int(input())
	a = sorted(list(map(int, input().split(' '))))
	print(fun1(a, n))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	k = 0
	for i in arr:
		if i % 2 != 0:
			k += 1
	if k == n and k % 2 != 0:
		print('YES')
	elif k < n and k != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	s = input().split()
	for i in range(n):
		s[i] = int(s[i])
	s.sort()
	for i in range(n - 1):
		if s[i + 1] - s[i] > 1:
			print('NO')
			break
	else:
		print('YES')


import math
T = int(input())
while T > 0:
	N = int(input())
	list1 = [int(x) for x in input().split()]
	list1 = sorted(list1)
	flag = 0
	for i in range(len(list1) - 1):
		if list1[i + 1] - list1[i] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')
	T -= 1


n = int(input())
x = []
for i in range(1, n * 2 + 1):
	if i % 2 == 0:
		a = list(map(int, input().split()))
		x.append(a)
	else:
		b = input()
for ad in x:
	ad.sort()
	c = list(dict.fromkeys(ad))
	d = list(range(min(ad), max(ad) + 1))
	if c == d:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = input().split()
	count_even = 0
	count_odd = 0
	for i in range(n):
		if int(a[i]) % 2 == 0:
			count_even += 1
		else:
			count_odd += 1
	if count_even == n or (count_odd == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')
	t -= 1


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import *
getcontext().prec = 30
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')
for _ in range(int(input())):
	n = int(input().rstrip())
	l = list(map(int, input().rstrip().split(' ')))
	l.sort()
	r = 'YES'
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			r = 'NO'
			break
	print(r)


t = int(input())
for i in range(t):
	n = int(input())
	numbers = list(map(int, input().split()))
	numbers.sort()
	ban = True
	prev = numbers[0]
	for j in range(1, n):
		if numbers[j] - prev > 1:
			ban = False
			break
		prev = numbers[j]
	if ban:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = [int(x) for x in input().split()]
	sum = 0
	for i in a:
		sum += i
	f1 = 0
	f2 = 0
	if sum % 2 != 0:
		print('YES')
	else:
		for i in a:
			if i % 2 == 0:
				f1 += 1
			else:
				f2 += 1
		if f1 > 0 and f2 > 0:
			print('YES')
		else:
			print('NO')
	t -= 1


t = int(input())
for zz in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	ha = False
	ho = False
	he = False
	for i in a:
		if i % 2 == 1:
			ho = True
		else:
			he = True
	if n % 2 == 0:
		ha = ho and he
	else:
		ha = ho
	if ha:
		print('YES')
	else:
		print('NO')


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


t = int(input())
while t:
	t -= 1
	input()
	nums = list(map(int, input().split()))
	while len(nums) > 1:
		min = nums[0]
		count = 0
		for num in nums:
			if num < min:
				min = num
				count = 1
			elif num == min:
				count += 1
		for _ in range(count - 1):
			nums.remove(min)
			count -= 1
		if len(nums) == 1 or min + 1 in nums:
			nums.remove(min)
		else:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
while t:
	n = int(input())
	li = set(list(map(int, input().split())))
	print('NO' if max(li) - min(li) >= len(li) else 'YES')
	t -= 1


import sys, math
try:
	(sys.stdin, sys.stdout) = (open('input.txt', 'r'), open('output.txt', 'w'))
except:
	pass
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from statistics import mode
from collections import *
from math import ceil, floor, inf, factorial, gcd, log2, sqrt, log
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()

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

def setbits(n):
	return bin(n).count('1')

def resetbits(n):
	return bin(n).count('0')

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r):
	(num, den) = (1, 1)
	r = min(n, n - r)
	for i in range(r):
		num *= n - i
		den *= i + 1
	return num // den

def ncr_p(n, r, p):
	(num, den) = (1, 1)
	r = min(r, n - r)
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * modinv(den, p) % p

def isPrime(num):
	if num <= 1:
		return False
	if num == 2 or n == 3:
		return True
	if num % 2 == 0 or num % 3 == 0:
		return False
	m = int(num ** 0.5) + 1
	for i in range(5, m, 6):
		if num % i == 0 or num % (i + 2) == 0:
			return False
	return True

def bin_search(arr, low, high, val):
	while low <= high:
		mid = low + (high - low) // 2
		if arr[mid] == val:
			return mid
		elif arr[mid] < val:
			low = mid + 1
		else:
			high = mid - 1
	return -1

def sumofdigit(num):
	count = 0
	while num:
		count += num % 10
		num //= 10
	return count

def inputmatrix():
	(r, c) = iia()
	mat = [0] * r
	for i in range(r):
		mat[i] = iia()
	return (r, c, mat)

def prefix_sum(n, arr):
	for i in range(1, n):
		arr[i] += arr[i - 1]
	return arr

def binomial(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def divisors(n):
	res = []
	for i in range(1, ceil(sqrt(n)) + 1):
		if n % i == 0:
			if i == n // i:
				res.append(i)
			else:
				res.append(i)
				res.append(n // i)
	return res

def fun(n, arr):
	flag = True
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			return False
	return True
for _ in range(ii1()):
	n = ii1()
	arr = iia()
	arr.sort()
	a = fun(n, arr)
	if a:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(0, t):
	n = int(input())
	Array = [int(i) % 2 for i in map(int, input().split())]
	if 0 < sum(Array) < n:
		print('YES')
	elif sum(Array) == 0:
		print('NO')
	elif n % 2 == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	lst = sorted(list(map(int, input().split())))
	k = True
	for i in range(len(lst) - 1):
		if abs(lst[i] - lst[i + 1]) > 1:
			k = False
			break
	if k:
		print('YES')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	k = int(input())
	arr = map(int, input().split())
	arr = sorted(list(arr))
	k = 0
	for j in range(len(arr) - 1):
		if arr[j + 1] - arr[j] <= 1:
			k += 1
	if k == len(arr) - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	flag = 0
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			flag = 1
			break
	if not flag:
		print('YES')


for i in range(int(input())):
	t = int(input())
	arr = list(map(int, input().split()))
	pares = 0
	impares = 0
	for j in arr:
		if j % 2 == 0:
			pares += 1
		else:
			impares += 1
	if impares > 0 and impares < t:
		print('YES')
	elif impares == t and impares * t % 2 == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	labs = True
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			labs = False
	if labs:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	c = list(map(int, input().split()))
	if sum(c) % 2 == 1:
		print('YES')
	else:
		a = []
		b = []
		d = 0
		for j in range(n):
			if c[j] % 2 == 0:
				a.append(c[j])
			else:
				b.append(c[j])
		for i in range(n):
			if c[j] % 2 == 0 and len(b) != 0:
				d = 1
			if c[j] % 2 == 1 and len(a) != 0:
				d = 1
		if d == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	flag = 1
	if len(l) == 1:
		print('YES')
	elif len(l) == 0:
		print('NO')
	else:
		for i in range(len(l) - 1):
			if l[i + 1] - l[i] > 1:
				flag = 0
		if flag == 1:
			print('YES')
		else:
			print('NO')


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	N = int(stdin.readline())
	a = [int(x) for x in input().split()]
	a.sort()
	flag = True
	for i in range(N - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
			break
	print('YES') if flag else print('NO')


import math
num_cases = int(input())
for _ in range(num_cases):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	arr.sort()
	found = False
	for i in range(n - 1):
		if arr[i + 1] > arr[i] + 1:
			found = True
			break
	if found:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	m1 = []
	m2 = []
	n = int(input())
	seq = list(map(int, input().split()))
	if sum(seq) % 2 != 0:
		print('YES')
	else:
		for i in seq:
			if i % 2 != 0:
				m1.append(i)
			else:
				m2.append(i)
		if len(m1) == n or len(m2) == n:
			print('NO')
		else:
			print('YES')


import sys
import math
from collections import defaultdict, Counter, deque

def solve(test):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		print('YES')
		return
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			continue
		else:
			print('NO')
			return
	print('YES')
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	even = False
	odd = False
	for i in range(N):
		if A[i] % 2 == 0:
			even = True
		else:
			odd = True
	if sum(A) % 2 == 1 or (odd and even):
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort()
	chk = 0
	for i in range(n - 1):
		if abs(lst[i + 1] - lst[i]) > 1:
			print('NO')
			chk = 1
			break
	if chk == 0:
		print('YES')


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	ans = True
	for i in range(N - 1):
		if A[i + 1] - A[i] > 1:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	odd = 0
	for i in l:
		if i & 1:
			odd += 1
	if odd and (odd & 1 or odd < len(l)):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	o = 0
	e = 0
	c = input()
	c = [int(item) for item in c.split()]
	for i in range(0, len(c)):
		if c[i] % 2 == 0:
			e = e + 1
		else:
			o = o + 1
	if n % 2 == 0 and e != 0 and (o != 0):
		print('YES')
	elif n % 2 != 0 and o != 0:
		print('YES')
	else:
		print('NO')


testCase = int(input())
for i in range(testCase):
	flag = 0
	odd = False
	even = False
	len = int(input())
	input_value_string = input()
	value = [int(x) for x in input_value_string.split(' ')]
	if sum(value) % 2 != 0:
		flag = 1
	else:
		for n in value:
			if n % 2 != 0:
				odd = True
			else:
				even = True
	if flag == 1 or (odd == True and even == True):
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	cnt = 0
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			cnt = cnt + 1
		else:
			cnt = 0
			break
	if cnt == n - 1:
		print('Yes')
	else:
		print('No')
	t = t - 1


for _ in range(int(input())):
	input()
	q = [0, 0]
	l = list(map(int, input().split()))
	for i in l:
		q[i % 2] = 1
	if q[0] == q[1]:
		print('YES')
	elif sum(l) % 2:
		print('YES')
	else:
		print('NO')


def removeSmallest():
	for t in range(int(input())):
		n = int(input())
		s = sorted([int(x) for x in input().split()])
		i = 0
		flag = 0
		while i < n - 1:
			if abs(s[i] - s[i + 1]) > 1:
				print('NO')
				flag = 1
				break
			i = i + 1
		if flag == 0:
			print('YES')
removeSmallest()


import sys

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

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

def rln(n):
	l = [None] * n
	for i in range(n):
		l[i] = int(rl())
	return l
t = int(input())
for _ in range(t):
	n = int(input())
	tab = rn()
	(all_odd, all_even) = (True, True)
	for e in tab:
		if e % 2 == 0:
			all_odd = False
		elif e % 2 == 1:
			all_even = False
	if not all_even and (not all_odd):
		print('YES')
	elif all_odd and n % 2 == 0:
		print('NO')
	elif all_odd and n % 2 == 1:
		print('YES')
	elif all_even:
		print('NO')


MOD = 1000000007
from collections import defaultdict as dd, Counter, deque

def si():
	return input()

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

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

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

def out(v):
	print(v)

def spout():
	print(v, end=' ')

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

def twod(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def vow():
	return ['a', 'e', 'i', 'o', 'u']

def let():
	return [chr(i) for i in range(97, 123)]

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

def ispow2(x):
	return x and (not x & x - 1)

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)
t = ii()
while t:
	t -= 1
	n = ii()
	a = li()
	if n == 1:
		print('YES')
	else:
		a.sort()
		f = 0
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				f = 1
				break
		if f == 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	b = a[:]
	for i in range(n - 1):
		if a[i + 1] - a[i] <= 1:
			b.remove(a[i])
	if len(b) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	N = int(input())
	L = list(map(int, input().split()))
	COdd = 0
	CEven = 0
	for i in L:
		if i % 2 == 0:
			CEven += 1
		else:
			COdd += 1
	if CEven == 0:
		if COdd % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif COdd == 0:
		print('NO')
	else:
		print('YES')


for i in [*open(0)][2::2]:
	_ = {*map(int, i.split())}
	print('YNEOS'[max(_) - min(_) >= len(_)::2])


t = int(input())
while t > 0:
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	if n == 1:
		print('YES')
		t -= 1
		continue
	flag = 0
	for i in range(n - 1):
		if ar[i + 1] - ar[i] > 1:
			flag = 1
			break
		if flag == 1:
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	answer = 'YES'
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			answer = 'NO'
	print(answer)
	t -= 1


def BubbleSort(tab):
	n = len(tab)
	for i in range(n - 1):
		for j in range(0, n - i - 1):
			if tab[j] > tab[j + 1]:
				(tab[j], tab[j + 1]) = (tab[j + 1], tab[j])
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	BubbleSort(a)
	for j in range(n):
		try:
			if abs(a[j] - a[j + 1]) > 1:
				print('NO')
				break
		except:
			print('YES')


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	b = 0
	c = 0
	for i in a:
		if i % 2 == 0:
			b += 1
		else:
			c += 1
	if sum(a) % 2 != 0:
		print('YES')
	elif b > 0 and c > 0:
		print('YES')
	elif b == 0 and c > 0 and (n % 2 != 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	a = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	flag = True
	for i in range(len(arr) - 1):
		if arr[i] == arr[i + 1] or arr[i] + 1 == arr[i + 1]:
			continue
		else:
			flag = False
			break
	if flag == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	k = 1
	a = list(map(int, input().split()))
	if sum(a) % 2 == 0:
		j = 1
		while j < len(a):
			if a[0] % 2 == 0 and a[j] % 2 != 0 or (a[0] % 2 != 0 and a[j] % 2 == 0):
				k = 0
				break
			j = j + 1
	if sum(a) % 2 != 0 or k == 0:
		print('YES')
	else:
		print('NO')


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

	def main(n, x):
		for i in range(n - 1):
			if x[i + 1] - x[i] > 1:
				return 'NO'
		return 'YES'
	print(main(n, x))


from sys import stdin
input = stdin.readline

def help():
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			return
	print('YES')
for _ in range(int(input())):
	help()


t = int(input())
for _ in range(t):
	input()
	lst = list(map(int, input().split()))
	lst.sort()
	error = False
	for i in range(len(lst) - 1):
		if lst[i] + 1 < lst[i + 1]:
			error = True
			break
	if error:
		print('NO')
	else:
		print('YES')


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


t = int(input())
while t:
	n = int(input())
	arr = list(map(int, input().split()))
	arr = sorted(arr)
	f = 1
	if n != 1:
		for i in range(1, n):
			if abs(arr[i] - arr[i - 1]) > 1:
				f = 0
				break
	if f:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	arr = map(int, input().split())
	even = 0
	odd = 0
	for el in arr:
		if el % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
	elif odd % 2 == 0:
		if even > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def solve(n, arr):
	if n == 1:
		return 'YES'
	res = 0
	for i in range(1, n):
		if arr[i] == arr[i - 1] or arr[i] == arr[i - 1] + 1:
			res += 1
	if n - res == 1:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	print(solve(n, arr))


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


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	flag = 0
	for i in range(1, N):
		if A[i] - A[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = 'YES'
	if len(arr) == 1:
		print(ans)
	else:
		arr.sort()
		for x in range(len(arr) - 1):
			if abs(arr[x] - arr[x + 1]) > 1:
				ans = 'NO'
				break
		print(ans)


t = int(input())
for q in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	nech = 0
	che = 0
	sumN = 0
	for i in range(n):
		if a[i] % 2 == 0:
			che += 1
		else:
			nech += 1
		sumN += a[i]
	if sumN % 2 != 0:
		print('YES')
	elif che == 0 or nech == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	a = int(input())
	b = [int(i) for i in input().split()]
	b.sort()
	fl = 0
	for i in range(a - 1):
		if b[i + 1] - b[i] > 1:
			fl = 1
	if fl:
		print('NO')
	else:
		print('YES')


skaits = int(input())
for i in range(skaits):
	garums = int(input())
	ievads = list(map(int, input().split()))
	atlikums = [j % 2 for j in ievads]
	if garums % 2 == 0 and (atlikums.count(1) != garums and atlikums.count(1) != 0):
		print('YES')
	elif atlikums.count(1) != 0 and garums % 2 != 0:
		print('YES')
	else:
		print('NO')


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

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

def solve():
	n = ri()
	A = rl()
	tot = 0
	evens = False
	odds = False
	for a in A:
		if a % 2 == 0:
			evens = True
		else:
			odds = True
		tot = (tot + a) % 2
	if tot == 1 or (evens and odds):
		print('YES')
	else:
		print('NO')
	return
t = ri()
for i in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = sum(l)
	f = 0
	g = 0
	o = 0
	e = 0
	for i in range(n):
		if l[i] % 2 != 0:
			f = 1
			o += 1
		else:
			g = 1
			e += 1
	if o == 0:
		print('NO')
	elif e == 0 and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ok = False
	for i in range(n):
		if a[i] % 2 != a[0] % 2:
			ok = True
	if ok or sum(a) % 2 == 1:
		print('YES')
	else:
		print('NO')


for tarin in range(int(input())):
	n = int(input())
	cnt = 0
	arr = list(map(int, input().split()))
	for i in arr:
		if i % 2 == 1:
			cnt += 1
	if cnt == n and n % 2 == 0 or cnt == 0:
		print('NO')
	else:
		print('YES')


t = int(input())

def pp():
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			return 'NO'
	return 'YES'
while t:
	print(pp())
	t -= 1


for i in range(int(input())):
	x = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('Yes')
	else:
		p1 = list(filter(lambda x: x % 2 != 0, l))
		p2 = list(filter(lambda x: x % 2 == 0, l))
		if len(p1) > 0 and len(p2) > 0:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	found = False
	for i in range(n - 1):
		if abs(nums[i] - nums[i + 1]) > 1:
			print('NO')
			found = True
			break
	if not found:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = input().split()
	f = 0
	m = 0
	for j in l:
		if int(j) % 2 == 0:
			f = 1
		if int(j) % 2 != 0:
			m = 1
	if n % 2 == 0:
		if m == 1 and f == 1:
			print('YES')
		else:
			print('NO')
	elif m == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	ans = 'YES'
	n = int(input())
	a = sorted([*map(int, input().split())])
	for j in range(1, n):
		if a[j] - a[j - 1] > 1:
			ans = 'NO'
			break
	print(ans)


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	(a, b) = ([], [])
	if sum(s) % 2 != 0:
		print('YES')
	else:
		for i in s:
			if i % 2 != 0:
				a.append(i)
			else:
				b.append(i)
		if len(b) == 0 or (len(a) == 0 and len(a) % 2 == 0):
			print('NO')
		else:
			print('YES')


ans = []
for _ in range(int(input())):
	n = int(input())
	e = len([int(i) for i in input().split() if int(i) & 1])
	if e % 2 != 0:
		print('YES')
	elif e + 1 <= n and e != 0:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for i in range(t):
		N = int(input())
		A = [int(i) for i in input().split()]
		s = sum(A)
		if s & 1:
			print('YES')
			continue
		first = A[0]
		for a in A:
			if bool(a & 1) != bool(first & 1):
				print('YES')
				break
		else:
			print('NO')
main()


t = int(input())
i = 0
while i < t:
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	flag = True
	for x in range(1, n):
		if l[x] - l[x - 1] > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')
	i += 1


for i in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	c = 0
	c1 = 0
	if sum(x) % 2 != 0:
		print('Yes')
		continue
	for i in range(n):
		if x[i] % 2 != 0:
			c = c + 1
		else:
			c1 = c1 + 1
	if c1 == n:
		print('No')
	elif c % 2 == 0 and c1 == 0:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	input()
	p = sorted(list(map(int, input().split())))
	for i in range(len(p) - 1):
		if p[i + 1] - p[i] > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	flag = True
	for i in range(n - 1):
		if nums[i + 1] - nums[i] > 1:
			flag = False
			print('NO')
			break
	if flag:
		print('YES')


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	n = ii()
	a = il()
	e = 0
	o = 0
	for i in range(0, n):
		if a[i] % 2 == 0:
			e = e + 1
		if a[i] % 2 != 0:
			o = o + 1
	if o >= 1 and e >= 1:
		print('YES')
	elif o >= 1 and e == 0:
		if o % 2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def possible(arr, n):
	if n == 1:
		return 'YES'
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] >= 2:
			return 'NO'
	return 'YES'
result = []
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	result.append(possible(arr, n))
for i in range(t):
	print(result[i])


import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
tests = inp()
testCount = 0
while testCount < tests:
	n = inp()
	arr = inlt()
	arr.sort()
	i = 0
	while i < n - 1:
		if arr[i + 1] > arr[i] + 1:
			print('NO')
			i += n
		else:
			i += 1
	if i == n - 1:
		print('YES')
	testCount += 1


n = int(input())
for _ in range(n):
	m = int(input())
	a = [int(i) for i in input().strip().split()]
	contains_even = False
	contains_odd = False
	s = 0
	for x in a:
		if x % 2 == 0:
			contains_even = True
		else:
			contains_odd = True
		s += x
	if s % 2 == 1:
		print('YES')
	elif contains_even and contains_odd:
		print('YES')
	else:
		print('NO')


t = int(input())
for z in range(0, t):
	n = int(input())
	arr = list(map(int, input().split()))
	e = 0
	o = 0
	for i in arr:
		if i % 2 == 0:
			e = 1
		else:
			o = 1
		if e == 1 and o == 1:
			break
	if e == 1 and o == 1:
		print('YES')
	elif sum(arr) % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	useless = input()
	array = list(map(int, input().split(' ')))
	if sum(array) % 2 == 0:
		if all([bool(j % 2) for j in array]) or all([not bool(j % 2) for j in array]):
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	fail = False
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			fail = 1
			print('NO')
			break
	if not fail:
		print('YES')


q = int(input())
for _ in range(q):
	n = int(input())
	dat = list(map(int, input().split()))
	ocount = 0
	ecount = 0
	for i in range(len(dat)):
		if dat[i] % 2 == 0:
			ecount += 1
		else:
			ocount += 1
	if ocount == 0:
		print('NO')
	elif ocount % 2 == 0 and ecount == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	cnt = 0
	lst.sort()
	if len(lst) == 1:
		print('YES')
	else:
		for i in range(1, n - 1):
			if lst[i] - lst[i - 1] > 1 or lst[i + 1] - lst[i] > 1:
				cnt += 1
		if lst[n - 1] - lst[n - 2] > 1:
			cnt += 1
		if lst[1] - lst[0] > 1:
			cnt += 1
		if cnt >= 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	count = 0
	n = int(input())
	arr = list(map(int, input().split()))
	if len(arr) == 1:
		print('YES')
	else:
		arr.sort()
		for i in range(len(arr) - 1):
			if abs(arr[i] - arr[i + 1]) <= 1:
				arr[i] = 0
		for i in arr:
			if i > 0:
				count += 1
		if count == 1:
			print('YES')
		else:
			print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	ans = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans = 'NO'
	print(ans)


t = int(input())
for case in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd_numbers = 0
	for item in a:
		if item % 2 == 1:
			odd_numbers += 1
	even_numbers = n - odd_numbers
	if odd_numbers == 0:
		print('NO')
		continue
	if odd_numbers % 2 == 1:
		print('YES')
	elif even_numbers > 0:
		print('YES')
	else:
		print('NO')


def solve(nums):
	total = sum(nums)
	if total % 2 == 1:
		print('YES')
		return
	(odds, evens) = (0, 0)
	for num in nums:
		if num % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds > 0 and evens > 0:
		print('YES')
		return
	print('NO')
t = int(input())
for _ in range(t):
	input()
	nums = [int(x) for x in input().split()]
	solve(nums)


for i in ' ' * int(input()):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	f = 1
	pri = l[0]
	for i in l:
		if i - pri > 1:
			f = 0
			break
		pri = i
	print(['NO', 'YES'][f])


def solve(test):
	n = int(input())
	a = list(map(int, input().split()))
	even = list(filter(lambda x: x % 2 == 0, a))
	odd = list(filter(lambda x: x % 2 == 1, a))
	ok = False
	if n % 2 == 1 and len(odd) > 0:
		ok = True
	if n % 2 == 0 and len(odd) > 0 and (len(even) > 0):
		ok = True
	print('YES' if ok else 'NO')
t = int(input())
for _ in range(t):
	solve(_ + 1)


t = int(input())
for test in range(t):
	n = int(input())
	l = list(set(map(int, input().split())))
	n = len(l)
	if len(l) == 1:
		print('YES')
		continue
	l.sort()
	flag = True
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


xyz = input
t = int(xyz())
for t1 in [0] * t:
	n = int(xyz())
	nums = list(map(int, xyz().split()))
	nums.sort()
	counter = 0
	for i in range(len(nums) - 1):
		if nums[i + 1] - nums[i] <= 1:
			pass
		else:
			counter += 1
	if counter >= 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	t = list(map(int, input().split()))
	if len(t) == 1:
		print('YES')
	else:
		t.sort()
		for j in range(1, len(t)):
			if t[j] - t[j - 1] > 1:
				print('NO')
				break
		else:
			print('YES')


T = int(input())
for t in range(0, T):
	n = int(input())
	arr = [0] + sorted(map(int, input().split()))
	res = 1
	for i in range(1, n):
		if abs(arr[i] - arr[i + 1]) > 1:
			res = 0
	if res == 0:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = inp()
for i in range(t):
	n = inp()
	mylist = inlt()
	mylist.sort()
	counter = 0
	for k in range(n - 1):
		if counter == 0:
			if mylist[k + 1] - mylist[k] > 1:
				print('NO')
				counter = 1
	if counter == 0:
		print('YES')


import os
import math
import sys
from collections import defaultdict

def r():
	return int(input())

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

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	n = r()
	a = rl()
	a.sort()
	res = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			res = False
			break
	if res:
		print('YES')
	else:
		print('NO')


test = int(input())
for _ in range(test):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ans = False
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			print('NO')
			ans = True
			break
	if not ans:
		print('YES')


def ans(l, n):
	s = sum(l)
	if s % 2 == 1:
		print('YES')
	else:
		k = 0
		for i in l:
			if i % 2 == 1:
				k += 1
		if k == n or k == 0:
			print('NO')
		else:
			print('YES')
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans(a, n)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	m = sorted(l)
	p = len(l)
	for x in range(p - 1):
		if l[x + 1] - l[x] <= 1:
			m.remove(l[x])
		else:
			break
	print('YES') if len(m) == 1 else print('NO')


from sys import stdin

def func():
	return
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	m = sum(arr)
	if m % 2 != 0:
		print('YES')
	else:
		(ev, od) = (0, 0)
		for ele in arr:
			if ele % 2 == 0:
				ev += 1
			else:
				od += 1
		if ev >= 1 and od >= 1:
			print('YES')
		else:
			print('NO')


from collections import defaultdict
from os import system
import sys
import queue
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	tot = sum(arr)
	if tot % 2 == 1:
		print('YES')
	else:
		eve = 0
		odd = 0
		for i in arr:
			if i % 2 == 0:
				eve += 1
			else:
				odd += 1
		if eve == 0 or odd == 0:
			print('NO')
		else:
			print('YES')


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


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	flag = True
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('No')


t = int(input())
for _ in range(t):
	N = int(input())
	Arr = list(map(int, input().split()))
	EvenCount = 0
	OddCount = 0
	for i in Arr:
		if i % 2:
			OddCount += 1
		else:
			EvenCount += 1
	Answer = ''
	if N % 2:
		if EvenCount:
			if OddCount:
				Answer = 'YES'
			else:
				Answer = 'NO'
		else:
			Answer = 'YES'
	elif OddCount and EvenCount:
		Answer = 'YES'
	else:
		Answer = 'NO'
	print(Answer)


ncases = int(input())
for i in range(ncases):
	nvalue = int(input())
	if nvalue == 0:
		lst = input()
		print('NO')
	elif nvalue == 1:
		lst = input()
		print('YES')
	elif nvalue > 1:
		lst1 = map(int, input().split(' '))
		values = sorted(list(lst1))
		lst = []
		for value in values:
			if not value in lst:
				lst.append(value)
		if len(lst) == 1:
			print('Yes')
		elif len(lst) == 2:
			if -1 <= lst[0] - lst[1] <= 1:
				print('YES')
			else:
				print('NO')
		elif len(lst) > 2:
			count = 0
			for val in lst[:len(lst) - 1]:
				if not val + 1 in lst:
					count = count + 1
			if count > 0:
				print('NO')
			else:
				print('YES')


def check(r, g, b, w):
	return False if r % 2 + g % 2 + b % 2 + w % 2 > 1 else True
t = int(input())
for _ in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	last = 'x'
	for i in range(n - 1):
		if nums[i + 1] - nums[i] > 1:
			print('No')
			break
	else:
		print('Yes')


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

def get_str():
	return input().decode().strip()

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

def oint():
	return int(input())
t = oint()
for _ in range(t):
	n = oint()
	a = list(rint())
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


from collections import defaultdict as dd
from collections import Counter as ctr
from sys import stdin, stdout
from math import log, sqrt
from itertools import permutations
from itertools import combinations
from bisect import bisect_left, insort
for t in range(int(stdin.readline().strip())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


def function(n, arr):
	if n <= 1:
		return 'YES'
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] >= 2:
			return 'NO'
	return 'YES'
t = int(input())
while t:
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	print(function(n, arr))
	t -= 1


import sys

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

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

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

def get_list():
	return list(rinput())
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	n = iinput()
	a = get_list()
	a.sort()
	flag = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


num_queries = int(input())
for query in range(num_queries):
	arr_len = int(input())
	arr = sorted([int(x) for x in str(input()).split()])
	length = len(arr)
	for idx in range(length - 1):
		if arr[idx + 1] - arr[idx] <= 1:
			length -= 1
	if length == 1:
		print('YES')
	else:
		print('NO')


nCases = int(input())
for _ in range(nCases):
	nNums = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	canDo = True
	for i in range(nNums - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			canDo = False
			break
	if canDo:
		print('YES')
	else:
		print('NO')


t = int(input())
nech = False
chet = False
for _ in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		for i in a:
			if i % 2 == 0:
				chet = True
			else:
				nech = True
			if chet and nech:
				print('YES')
				break
		if chet == False or nech == False:
			print('NO')
		nech = False
		chet = False


T = int(input())
for _ in range(T):
	n = int(input())
	li = input().split()
	count = int(li[0])
	flag = 0
	for i in range(1, n):
		count = count + int(li[i])
		if int(li[i - 1]) % 2 != int(li[i]) % 2:
			flag = 1
	if count % 2 == 1 or flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	_ = input()
	[*a] = map(int, input().split())
	a.sort()
	print(['NO', 'YES'][all((y - x <= 1 for (x, y) in zip(a[0:], a[1:])))])


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	if sum(l) % 2 == 1:
		print('YES')
	else:
		es = 0
		os = 0
		for j in l:
			if j % 2 == 0:
				es += 1
				break
		for j in l:
			if j % 2 == 1:
				os += 1
				break
		if es == 1 and os == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = set(l)
	if max(s) - min(s) < len(s):
		print('YES')
	else:
		print('NO')


t = int(input())
for tt in range(t):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	b = list(set(a))
	b.sort()
	if b[-1] - b[0] + 1 == len(b):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	j = 1
	while len(l) > 1:
		if l[j] - l[j - 1] == 0 or l[j] - l[j - 1] == 1:
			l.remove(l[j - 1])
		else:
			f = 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')


def quick(arr, s, e):
	p = arr[e]
	i = s - 1
	for j in range(s, e):
		if arr[j] < p:
			i += 1
			(arr[j], arr[i]) = (arr[i], arr[j])
	(arr[i + 1], arr[e]) = (arr[e], arr[i + 1])
	return i + 1

def sort(arr, s, e):
	if s < e:
		p = quick(arr, s, e)
		sort(arr, s, p - 1)
		sort(arr, p + 1, e)

def remove(arr, n):
	if n == 1:
		return 'YES'
	sort(arr, 0, len(arr) - 1)
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			return 'NO'
	return 'YES'
a = int(input())
for _ in range(a):
	n = int(input())
	li = list(map(int, input().split()))
	print(remove(li, n))


def remove_smallest(a):
	while True:
		if len(a) == 1:
			return 'YES'
		elif abs(a[0] - a[1]) <= 1:
			a.pop(0)
		else:
			return 'NO'
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split(' ')))
	a = set(a)
	a = list(a)
	a.sort()
	print(remove_smallest(a))


for __ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	flag = True
	for i in range(1, len(arr), 1):
		if arr[i] - arr[i - 1] > 1:
			print('NO')
			flag = False
			break
	if flag:
		print('YES')


for _ in range(int(input())):
	N = int(input())
	X = sum((1 for i in list(map(int, input().split())) if i % 2 == 1))
	print('YES' if X % 2 == 1 or (X != 0 and N - X != 0) else 'NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = []
	even = []
	for j in range(n):
		even.append(j) if a[j] % 2 == 0 else odd.append(j)
	if len(odd) == 0:
		print('NO')
	elif len(odd) % 2 != 0:
		print('YES')
	elif len(even) == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	alist = list(map(int, input().split()))
	aset = set(alist)
	alist = list(aset)
	alist.sort()
	flag = 1
	if len(alist) == 1:
		print('YES')
	else:
		for j in range(len(alist) - 1):
			if alist[j + 1] - alist[j] != 1:
				flag = 0
		if flag == 0:
			print('NO')
		else:
			print('YES')


t = int(input())
output = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	n_odd = 0
	n_eve = 0
	for i in a:
		if i % 2 == 0:
			n_eve += 1
		else:
			n_odd += 1
	if n_odd % 2 == 1 or (n_odd > 0 and n_eve > 0):
		output.append('YES')
		continue
	output.append('NO')
for i in output:
	print(i)


n = int(input())
for i in range(0, n):
	input()
	l = list(map(int, input().split(' ')))
	l.sort()
	b = True
	for j in range(1, len(l)):
		if l[j] - l[j - 1] > 1:
			print('NO')
			b = False
			break
	if b:
		print('YES')


def sol(l):
	l.sort()
	if len(l) <= 1:
		return 'YES'
	else:
		for i in range(len(l) - 1):
			if abs(l[i] - l[i + 1]) > 1:
				return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	n = input()
	l = list(map(int, input().split()))
	ans = sol(l)
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	visited = [False] * n
	arr.sort()
	for i in range(n):
		if not visited[i]:
			a = arr[i]
			for j in range(i + 1, n):
				if arr[j] - a <= 1:
					visited[i] = True
					break
	cnt = 0
	for i in visited:
		if not i:
			cnt += 1
	if cnt == 1:
		print('YES')
	else:
		print('NO')


a = int(input())
for _ in range(a):
	x = int(input())
	li = list(map(int, input().split()))
	if x == 1:
		print('YES')
		continue
	li.sort()
	y = li[0]
	for i in li[1:]:
		if i - y > 1:
			print('NO')
			break
		y = i
	else:
		print('YES')


n = int(input())
i = 0
ans = []
while i < n:
	x = int(input())
	aa = len([i for i in map(int, input().split()) if i % 2 != 0])
	if aa == 0 or aa % 2 == 0:
		if aa == x or aa == 0:
			ans.append('NO')
		else:
			ans.append('YES')
	else:
		ans.append('YES')
	i += 1
for i in ans:
	print(i)


for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2 != 0:
			c += 1
	if c == 0 or (c == n and n % 2 == 0):
		print('No')
	else:
		print('Yes')


T = int(input())
for t in range(T):
	n = int(input())
	a = []
	read = input().split()
	sta = 0
	odd = False
	even = False
	for itm in read:
		tmp = int(itm)
		sta = sta ^ tmp
		if tmp & 1:
			odd = True
		else:
			even = True
	if sta & 1 or (odd and even):
		print('YES')
		continue
	print('NO')


total = int(input())
for i in range(total):
	k = int(input())
	g = list(map(int, input().split()))
	su = 0
	odd = []
	even = []
	for i in g:
		if i % 2 != 0:
			odd.append(i)
		else:
			even.append(i)
	if even == [] and len(odd) % 2 == 0:
		print('NO')
	elif odd == []:
		print('NO')
	else:
		print('YES')


T = int(input())
for z in range(T):
	n = int(input())
	l = list(map(int, input().split()))
	qq = 0
	for u in l:
		if u & 1 == 1:
			qq += 1
	if qq == 0:
		print('NO')
	elif qq & 1 == 1:
		print('YES')
	elif n - qq > 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	(a, b) = (0, 0)
	for elem in ar:
		if elem % 2 == 0:
			a = 1
		else:
			b = 1
	if sum(ar) % 2 == 1:
		print('YES')
	elif a == 1 == b:
		print('YES')
	else:
		print('NO')


from functools import reduce
for _ in range(int(input())):
	num = int(input())
	arr = list(map(int, input().split()))
	sumarr = sum(arr)
	if sumarr % 2 or (reduce(lambda x, y: x or y % 2 == 1, [False] + arr) and reduce(lambda x, y: x or y % 2 == 0, [False] + arr)):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	m = len(l)
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) <= 1:
			m -= 1
	if m == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	p = sum(a)
	if p % 2 != 0:
		print('YES')
	else:
		x = 0
		for i in a:
			if i % 2 != 0:
				x = 1
				break
		if x == 1:
			flag = 0
			for i in a:
				if i % 2 == 0:
					print('YES')
					flag = 1
					break
			if flag == 0:
				print('NO')
		else:
			print('NO')


case = int(input())
for caseNum in range(0, case):
	n = int(input())
	singleList = [int(x) for x in input().split()]
	odd = False
	even = False
	for i in singleList:
		if i % 2 == 1:
			odd = True
		else:
			even = True
	if odd and even:
		print('YES')
	elif odd and n % 2 == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list((int(i) for i in input().split()))
	if n == 1:
		print('YES')
	else:
		arr.sort()
		flag = True
		for i in range(1, n):
			if abs(arr[i] - arr[i - 1]) > 1:
				flag = False
				break
		if flag:
			print('YES')
		else:
			print('NO')


t = int(input())
while t:
	n = int(input())
	a = []
	a = list(map(int, input().split()))
	s = sum(a)
	o = []
	e = []
	if s % 2 != 0:
		print('YES')
	else:
		for i in range(n):
			if a[i] % 2 == 0:
				e.append(a[i])
			else:
				o.append(a[i])
		if len(o) >= 1 and len(e) >= 1:
			print('YES')
		else:
			print('NO')
	t -= 1


from sys import stdin, stdout
t = int(stdin.readline())
for case in range(t):
	n = int(stdin.readline())
	ary = list(map(int, stdin.readline().split()))
	s = sum(ary)
	(evn, odd) = (0, 0)
	for item in ary:
		if item % 2 == 0:
			evn += 1
		else:
			odd += 1
	if s % 2 == 1 or (evn > 0 and odd > 0):
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


def check(array):
	while len(array) > 1:
		if array[1] - array[0] <= 1:
			array.pop(0)
		else:
			break
	return 'YES' if len(array) == 1 else 'NO'
t = int(input())
answers = []
for i in range(t):
	n = int(input())
	array = [int(x) for x in input().split()]
	array.sort()
	answers.append(check(array))
for a in answers:
	print(a)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	(s, odd, even) = (0, False, False)
	for i in arr:
		if i % 2 == 0:
			even = True
		else:
			odd = True
		s += i
	if s % 2 == 1:
		print('YES')
	elif odd and even:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	L = [int(x) % 2 for x in input().split()]
	if sum(L) % 2 == 1:
		print('YES')
	else:
		print('NO' if len(set(L)) == 1 else 'YES')


results = []
for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	result = 'YES'
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			result = 'NO'
			break
	results.append(result)
print('\n'.join(results))


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	nOdd = 0
	for i in arr:
		if i % 10 in [1, 3, 5, 7, 9]:
			nOdd += 1
	if nOdd == 0:
		print('NO')
	elif n - nOdd == 0:
		if n % 2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	ne = 0
	no = 0
	l = list(map(int, input().split()))
	for i in l:
		if i % 2 == 0:
			ne = ne + 1
		else:
			no = no + 1
	if sum(l) % 2 != 0 or no % 2 != 0:
		print('YES')
	elif ne != 0 and no > 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input().strip())
	arr = list(map(int, input().split()))
	even = 0
	odd = 0
	for i in range(n):
		if arr[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == n:
		print('NO')
	elif n % 2 == 0 and odd == n:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = map(int, input().split())
	even_or_odd = [0, 0]
	for num in arr:
		even_or_odd[num % 2] += 1
	if not even_or_odd[1]:
		print('NO')
	elif not even_or_odd[0] and (not even_or_odd[1] % 2):
		print('NO')
	else:
		print('YES')


def solve(n, arr):
	arr.sort()
	if n == 1:
		return 'YES'
	else:
		k = 0
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				k = 1
		if k == 1:
			return 'NO'
		return 'YES'
for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(n, arr))


t = int(input())
for _ in range(t):
	n = int(input())
	l1 = list(map(int, input().split()))
	l1.sort()
	l2 = l1[:]
	for i in range(n):
		if l2.count(l1[i]) + l2.count(l1[i] + 1) + l2.count(l1[i] - 1) > 1:
			l2.remove(l1[i])
	if len(l2) == 1:
		print('YES')
	else:
		print('NO')


def main(arr):
	l = list(sorted(arr))
	for i in range(1, len(l)):
		if abs(l[i - 1] - l[i]) > 1:
			return False
	return True
t = int(input())
for p in range(t):
	n = int(input())
	s = str(input())
	l = list(map(int, s.split()))
	if main(l) == True:
		print('YES')
	else:
		print('NO')


def func(arr, n):
	arr.sort()
	for i in range(1, n):
		if arr[i] > arr[i - 1] + 1:
			return 'NO'
	return 'YES'

def main():
	for tc in range(int(input())):
		n = int(input())
		arr = [int(i) for i in input().split()]
		print(func(arr, n))
main()


t = int(input())
for tc in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2 != 0:
			c = c + 1
	if c == n:
		if c % 2 != 0:
			print('YES')
		else:
			print('NO')
	elif c != 0:
		print('YES')
	else:
		print('NO')


def solve(n, a):
	s = list(set([i % 2 for i in a]))
	if len(s) == 2:
		return 'YES'
	if s[0] == 1 and len(a) % 2 == 1:
		return 'YES'
	return 'NO'

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = [int(i) for i in input().split()]
		print(solve(n, a))
main()


import sys
t = int(input())
for cases in range(t):
	n = int(sys.stdin.readline())
	a = set(map(int, sys.stdin.readline().strip().split()))
	a = list(a)
	a.sort()
	if len(a) <= 1:
		sys.stdout.write('Yes\n')
	else:
		ans = 'Yes'
		for i in range(1, len(a)):
			if a[i] - a[i - 1] == 1:
				continue
			else:
				ans = 'No'
				break
		sys.stdout.write(ans + '\n')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	t = 0
	r = 0
	for i in range(n - 1):
		if a[i] - a[i + 1] > 1:
			t += 1
		else:
			r += 1
	if t > 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	(a1, a2) = (0, 0)
	for i in l:
		if i % 2 == 0:
			a2 += 1
		else:
			a1 += 1
	if a2 == 0:
		if a1 % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif a1 == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	l1 = int(input())
	l = sorted(list(map(int, input().split())))
	a = 0
	while a != len(l) - 1:
		if l[a + 1] - l[a] in [0, 1, -1]:
			l.pop(a)
			continue
		elif l[a + 1] - l[a] not in [0, 1, -1]:
			a += 1
			continue
		else:
			break
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('YES')
	else:
		e = 0
		o = 0
		for i in arr:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if e != 0 and o != 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	A = [int(x) for x in input().split()]
	A.sort()
	if max((A[i] - A[i - 1] for i in range(1, n)), default=0) < 2:
		print('YES')
	else:
		print('NO')


t = int(input())
for z in range(t):
	n = int(input())
	a = sorted([int(q) for q in input().split()])
	m = True
	for i in range(n - 1):
		j = a[i + 1] - a[i]
		if j > 1:
			print('NO')
			m = False
			break
	if m:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	k = True
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			k = False
	if k:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
tc = int(input())
for _ in range(tc):
	n = int(input())
	l = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in l:
		if i % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd % 2 == 1 or (0 < even and 0 < odd):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	p = 0
	if n % 2:
		for i in a:
			if i % 2:
				print('YES')
				p += 1
				break
	else:
		k = 0
		for i in a:
			if not i % 2:
				k += 1
		if k > 0 and k != n:
			print('YES')
			p += 1
	if p == 0:
		print('NO')


import sys
input = sys.stdin.readline
from collections import Counter
t = int(input())
for tests in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A = [a % 2 for a in A]
	C = Counter(A)
	if sum(A) % 2 == 1:
		print('YES')
	elif C[0] > 0 and C[1] > 0:
		print('YES')
	else:
		print('NO')


n = int(input())
a = list()
ans = True
for _ in range(n):
	nint = input()
	a = [int(x) for x in input().split()]
	a.sort()
	for i in range(len(a) - 1):
		if abs(a[i + 1] - a[i]) > 1:
			ans = False
	print('YES') if ans else print('NO')
	ans = True


n = int(input())
for i in range(n):
	k = int(input())
	L = list(map(int, input().split()))
	allEven = True
	for x in L:
		if x % 2 == 1:
			allEven = False
			break
	allOdd = True
	for x in L:
		if x % 2 == 0:
			allOdd = False
			break
	if allEven:
		print('NO')
	elif k % 2 == 1:
		print('YES')
	elif allOdd:
		print('NO')
	else:
		print('YES')


x = int(input())
for i in range(0, x):
	n = int(input())
	m = list(map(int, input().split()))[:n]
	m.sort()
	s = 0
	for j in range(1, n):
		if m[j] - m[j - 1] > 1:
			s = 1
			break
	if s:
		print('NO')
	else:
		print('YES')


import string
t = int(input())
for _ in range(t):
	pj = 0
	n = int(input())
	l = list(map(int, input().strip().split()))[:n]
	while len(l) != 1:
		q = min(l)
		if q + 1 in l or q - 1 in l or l.count(q) > 1:
			del l[l.index(q)]
		else:
			pj = 1
			print('NO')
			break
	if pj == 0:
		print('YES')
pass


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


t = int(input())
while t:
	t -= 1
	n = int(input())
	ar = [int(i) for i in input().strip().split()]
	ar.sort()
	b = []
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			b.append(abs(ar[i] - ar[i + 1]))
		b.sort()
		if b[-1] > 1:
			print('NO')
		else:
			print('YES')


I = input
exec(int(I()) * "n=int(I());s=sum(int(x)%2 for x in I().split());print(['NO','YES'][0<s<n+n%2]);")


t = int(input())
for i in range(t):
	n = input()
	a = input().replace('(', '').replace(')', '').replace(',', '').split()
	a = list(map(int, a))
	b = sorted(list(set(a)))
	if max(b) - min(b) + 1 != len(b):
		print('NO')
	else:
		print('YES')


t = int(input())
n = [0] * t
a = [0] * t
for i in range(t):
	n[i] = int(input())
	a[i] = [0] * n[i]
	a[i] = list(map(int, input().split()))
for j in range(t):
	z = max(a[j])
	x = min(a[j])
	flag = 0
	for i in range(x, z):
		if i not in a[j]:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


def solve(A):
	(odd, even) = (False, False)
	s = 0
	for i in range(len(A)):
		s += A[i]
		odd = odd or A[i] % 2 == 1
		even = even or A[i] % 2 == 0
	if s % 2 == 1:
		return True
	if odd and even:
		return True
	return False
number = int(input())
res = []
for i in range(number):
	n = input()
	line = input().split(' ')
	k = int(n)
	arr = [int(n) for n in line]
	if solve(arr):
		res.append('Yes')
	else:
		res.append('No')
for r in res:
	print(r)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = dict()
	for x in a:
		if x in d.keys():
			d[x] += 1
		else:
			d[x] = 1
	a = list(d.keys())
	a.sort()
	ans = True
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] != 1:
			ans = False
			break
	if ans == True:
		print('YES')
	else:
		print('NO')


from sys import stdin

def solve(arr, n):
	if n == 1:
		return 'YES'
	arr.sort()
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	arr = [int(x) for x in stdin.readline().split()]
	print(solve(arr, n))


test = int(input())
while test > 0:
	n = int(input())
	v = []
	st = input().split()
	for i in range(n):
		ele = int(st[i])
		v.append(ele)
	v.sort()
	impossible = False
	for i in range(n - 1):
		if v[i + 1] - v[i] > 1:
			impossible = True
	if impossible:
		print('NO')
	else:
		print('YES')
	test -= 1


T = int(input())
for t in range(T):
	burger = True
	n = int(input())
	arr = [int(x) for x in input().split(' ')]
	arr = sorted(arr)
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			burger = False
			break
	if burger:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	a.sort()
	case = True
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			case = False
			print('NO')
			break
	if case:
		print('YES')


import time
from collections import deque

def inpt():
	return int(input())

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

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

def solve():
	n = inpt()
	l = sorted(inpl())
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			print('NO')
			return
	print('YES')
	return

def main():
	m = 10 ** 9 + 7
	t = int(input())
	while t:
		t -= 1
		solve()
main()


t = int(input())

def check(l, n):
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			return False
	return True
for i in range(t):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	print('YES' if check(l, n) else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for idx in range(n - 1):
		if arr[idx + 1] - arr[idx] <= 1:
			arr[idx] = 0
		else:
			pass
	arr = list(set(arr))
	if len(arr) == 1:
		print('YES')
	elif arr[0] == 0 and len(arr) == 2:
		print('YES')
	else:
		print('NO')


n = int(input())
answer = ['' for i in range(n)]
for j in range(n):
	m = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	if m == 1:
		answer[j] = 'YES'
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			answer[j] = 'NO'
			break
	else:
		answer[j] = 'YES'
print('\n'.join(answer))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	flag = 0
	while i < n - 1:
		if abs(a[i] - a[i + 1]) > 1:
			flag = 1
			break
		i += 1
	if flag == 1:
		print('NO')
		continue
	print('YES')


for each in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	k = 0
	while len(a) > 1:
		if a[k + 1] - a[k] <= 1:
			a.remove(a[k])
		else:
			break
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


for i in [0] * int(input()):
	f = 0
	a = int(input())
	l = list(map(int, input().split()))
	if a % 2 == 0:
		for x in range(a):
			try:
				if (l[x] + l[x + 1]) % 2 == 1:
					f = 1
			except:
				if f == 0:
					print('NO')
				else:
					print('YES')
	else:
		for x in range(a):
			if l[x] % 2 == 1:
				f = 1
		if f == 0:
			print('NO')
		else:
			print('YES')


def odd(l):
	for item in l:
		if item % 2 == 1:
			return True
			break
	else:
		return False

def even(l):
	for item in l:
		if item % 2 == 0:
			return True
			break
	else:
		return False
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('YES')
	elif odd(l) and even(l):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		ar.sort()
		i = 0
		while len(ar) > 1:
			if abs(ar[i] - ar[i + 1]) <= 1:
				ar.pop(i)
			else:
				break
		if len(ar) == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	count = 0
	for k in A:
		if k % 2 != 0:
			count += 1
	if count == 0:
		print('NO')
	elif count == n and n % 2 != 0:
		print('YES')
	elif count < n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	numbers = list(map(int, input().split()))
	min_n = min(numbers)
	max_n = max(numbers)
	check = [False for j in range(max_n + 1)]
	for number in numbers:
		check[number] = True
	answer = True
	for j in range(min_n, max_n):
		if not check[j]:
			answer = False
			break
	if answer:
		print('YES')
	else:
		print('NO')


def func(arr, l):
	arr = sorted(arr)
	j = 1
	flag = 0
	for i in range(0, l - 1):
		if arr[j] - arr[i] == 1 or arr[j] - arr[i] == 0:
			i += 1
			j += 1
		else:
			flag += 1
	if flag > 0:
		print('NO')
	else:
		print('YES')
tc = int(input())
for i in range(tc):
	l = int(input())
	arr = list(map(int, input().rstrip().split()))
	result = func(arr, l)


import sys
t = int(input())
for _ in range(t):
	n = int(input())
	Data = [int(x) for x in input().split()]
	fl = False
	Data.sort()
	for i in range(1, n):
		if Data[i] - Data[i - 1] > 1:
			fl = True
	if fl:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) % 2 for x in input().split()]
	if sum(a) % 2:
		print('YES')
	elif len(set(a)) - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	lst = list(map(int, input().split()))
	s = sum(lst)
	if s % 2 == 1:
		print('YES')
	else:
		o = e = False
		for i in lst:
			if i % 2 == 1:
				o = True
			elif i % 2 == 0:
				e = True
			if o and e:
				break
		if o and e:
			print('YES')
		else:
			print('NO')


a = int(input())
for j in range(a):
	z = []
	x = input()
	b = input().split(' ')
	sum1 = 0
	for i in b:
		sum1 = sum1 + int(i)
		if int(i) % 2 == 0:
			z.append(1)
		else:
			z.append(0)
	if sum1 % 2 == 0:
		if len(z) % 2 == 0:
			if 0 not in z:
				print('NO')
			elif 1 not in z:
				print('NO')
			else:
				print('YES')
		elif 1 not in z:
			print('YES')
		elif 0 not in z:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


for i in range(int(input())):
	input()
	a = [int(x) for x in input().split()]
	if sum(a) % 2 != 0:
		print('YES')
		continue
	else:
		ev = 0
		nev = 0
		for i in a:
			if i % 2 != 0:
				nev += 1
			else:
				ev += 1
		if ev > 0 and nev > 0:
			print('YES')
			continue
		else:
			print('NO')
			continue


t = int(input())
for i in range(t):
	n = int(input())
	arr = list((int(i) for i in input().split()))
	even = 0
	for j in arr:
		if j % 2 == 0:
			even += 1
	if n % 2 == 0:
		if n == even or even == 0:
			print('NO')
		else:
			print('YES')
	elif n == even:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	x = int(input())
	y = list(map(int, input().split()))
	q = y.copy()
	q.sort()
	y.sort()
	for i in range(x - 1):
		a = q[i]
		b = q[i + 1]
		c = b - a
		if abs(c) <= 1:
			y.remove(min(a, b))
	if len(y) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	flagE = False
	flagO = False
	for i in a:
		if i % 2:
			flagO = True
		else:
			flagE = True
	if flagO and flagE:
		print('YES')
		continue
	if not flagO and flagE:
		print('NO')
		continue
	if n % 2:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	t = -1
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	prev = arr[0]
	found = False
	for num in arr:
		if num - prev > 1:
			print('NO')
			found = True
			break
		prev = num
	if not found:
		print('YES')


for i in range(int(input())):
	x = int(input())
	li = list(map(int, input().split()))
	if len(set(li)) == 1:
		print('YES')
	else:
		a = list(set(li))
		a.sort()
		c = 0
		for j in range(len(a) - 1):
			if abs(a[j] - a[j + 1]) > 1:
				c = 1
				break
		if c == 0:
			print('YES')
		else:
			print('NO')


t = int(input())
arr = [[]] * t
for i in range(t):
	n = int(input())
	arr[i] = list(map(int, input().strip().split()))[:n]
for i in range(t):
	flag = True
	arr[i] = sorted(arr[i])
	for j in range(1, len(arr[i])):
		if arr[i][j] - arr[i][j - 1] > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	x = Counter((int(v) % 2 for v in input().split()))
	print('YES' if x[1] % 2 > 0 or (x[0] > 0 and x[1] > 0) else 'NO')


import os
from collections import defaultdict, deque
is_dev = 'vscode' in os.environ
if is_dev:
	inF = open('in.txt', 'r')
	outF = open('out.txt', 'w')

def ins(r):
	return list(map(int, r.split(' ')))

def input_():
	if is_dev:
		return inF.readline()[:-1]
	else:
		return input()

def print_(data):
	if is_dev:
		outF.write(str(data) + '\n')
	else:
		print(data)
for _ in range(int(input_())):
	n = int(input_())
	a = ins(input_())
	a = set(a)
	a = sorted(list(a))
	if max(a) - min(a) + 1 == len(a):
		print_('YES')
	else:
		print_('NO')
if is_dev:
	outF.close()

	def compare_file():
		print(open('out.txt', 'r').read() == open('outactual.txt', 'r').read())
	compare_file()


num = int(input())
for i in range(num):
	l = int(input())
	vals = [int(x) for x in input().split()]
	evens = 0
	odds = 0
	for x in vals:
		if x % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds > 0 and evens > 0:
		print('YES')
	elif evens > 0:
		print('NO')
	elif odds > 0 and len(vals) % 2 == 0:
		print('NO')
	else:
		print('YES')


def f(a):
	if sum(a) % 2 == 1:
		return 'YES'
	e = 0
	for i in a:
		if i % 2 == 0:
			e += 1
	if e == len(a) or e == 0:
		return 'NO'
	return 'YES'
T = int(input())
for t in range(T):
	N = int(input())
	a = list(map(int, input().split()))
	print(f(a))


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	i = 0
	flag = True
	while i < n - 1:
		if abs(a[i] - a[i + 1]) <= 1:
			i += 1
			continue
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


import math
import time
from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from queue import PriorityQueue
import sys
t = int(input())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	a.sort()
	poss = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			poss = False
			break
	if poss:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	arr = [int(k) for k in input().split()]
	sort = sorted(arr)
	flag = 0
	for i in range(1, n):
		if sort[i] - sort[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


rr = lambda : input().strip()
rri = lambda : int(rr())
rrm = lambda : [int(x) for x in rr().split()]
from sys import stdin, stdout, setrecursionlimit

def sol():
	n = rri()
	lis = rrm()
	lis.sort()
	l = lis[0]
	for i in lis:
		if i - l > 1:
			print('NO')
			return
		l = i
	print('YES')
	return

def main():
	T = rri()
	for t in range(1, T + 1):
		ans = sol()
main()


T = int(input())
for _ in range(0, T):
	n = int(input())
	s = [int(x) for x in input().split()]
	s.sort()
	ans = 'YES'
	for i in range(1, len(s)):
		if s[i] - s[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input(''))
arr = []
for i in range(t):
	input('')
	arr.append(list(map(int, input().split())))
for i in arr:
	s = sum(i)
	if s & 1:
		print('YES')
		continue
	x = list(map(lambda x: x & 1, i))
	odd = x.count(1)
	even = x.count(0)
	if odd * even == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	yes = True
	for i in range(1, len(l)):
		if l[i] - l[i - 1] > 1:
			yes = False
			break
	if yes:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = map(int, input().split())
	(le, chan) = (0, 0)
	for i in arr:
		if i % 2 == 0:
			chan += 1
		else:
			le += 1
	if le == 0 or (chan == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


import sys, math
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	n = inp()
	a = [int(q) % 2 for q in input().split()]
	if sum(a) % 2 == 1 or (0 in a and 1 in a):
		print('YES')
	else:
		print('NO')


t = int(input())
for j in range(t):
	n = int(input())
	a = input().split()
	a = [int(i) for i in a]
	a.sort()
	c = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			c = 1
			break
	if c == 0:
		print('YES')


for _ in range(int(input())):
	c1 = 0
	for i in range(4):
		c1 = c1 + 1
	od = 0
	ev = 0
	n = int(input())
	l = list(map(int, input().split()))
	if n == 1:
		if l[0] % 2 == 0:
			print('NO')
			continue
		else:
			print('YES')
			continue
	for i in range(n):
		if l[i] % 2 == 0:
			ev = 1
			break
	for i in range(n):
		if l[i] % 2 != 0:
			od = 1
			break
	if od == 0 and ev == 1:
		print('NO')
	elif od == 1 and ev == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif od == 1 and ev == 1:
		print('YES')


from math import log2, ceil, floor
from collections import defaultdict, OrderedDict, Counter, deque
from heapq import heappush, heappop, heapify
import re

def inp():
	return input()

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

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

def int_inp():
	return int(input())

def float_int():
	return float(input())

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
for _ in range(int_inp()):
	n = int_inp()
	l = list_inp()
	mn = min(l)
	mx = max(l)
	s = set(l)
	if len(s) == mx - mn + 1:
		print('YES')
	else:
		print('NO')


inp1 = int(input())
for i in range(inp1):
	inp2 = int(input())
	inp3 = list(map(int, input().split()))
	inp3.sort()
	for j in range(inp2 - 1):
		if abs(inp3[j] - inp3[j + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


for x in range(int(input())):
	n = int(input())
	lst = set(map(int, sorted([int(i) for i in input().split()])))
	print('YES' if max(lst) - min(lst) + 1 == len(lst) else 'NO')


t = int(input())
while t > 0:
	n = int(input())
	lst = list()
	lst = list(map(int, input().split()))
	lst.sort()
	pos = True
	for i in range(0, n - 1):
		if abs(lst[i] - lst[i + 1]) > 1:
			pos = False
			break
	if pos:
		print('YES')
	else:
		print('NO')
	t -= 1


from sys import stdin

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

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

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	n = iinput()
	a = linput()
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


a = input()
Case = int(a)
for T in range(Case):
	a = input()
	n = int(a)
	a = input()
	b = a.split(' ')
	count1 = 0
	count2 = 0
	for i in range(n):
		if int(b[i]) % 2 == 0:
			count2 += 1
		else:
			count1 += 1
	if count1 == 0:
		print('NO')
	elif count2 == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = 0
	for i in a:
		if i % 2 == 0:
			cnt += 1
	if cnt == n or (cnt == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


def something(s, r):
	r = sorted(r)
	for i in range(s - 1):
		j = i + 1
		if abs(r[i] - r[j]) > 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	r = int(input())
	s = list(map(int, input().split()))
	print(something(r, s))


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	count = 0
	for i in range(1, n):
		if arr[i] - arr[i - 1] <= 1:
			count += 1
	if count + 1 == n or count == n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split(' ')))
	B = list(set(A))
	if sum(A) % 2 != 0:
		print('YES')
	elif len(B) == 1:
		print('NO')
	else:
		c1 = 0
		c2 = 0
		for i in B:
			if i % 2 == 0:
				c1 += 1
			else:
				c2 += 1
		if c2 == 0:
			print('NO')
		elif c1 == 0:
			if N % 2 == 0:
				print('NO')
			else:
				print('YES')
		else:
			print('YES')


count = int(input())
for c in range(count):
	size = int(input())
	data = [int(i) for i in input().split()]
	sortt = sorted(data)
	ans = 'YES'
	for i in range(size - 1):
		if sortt[i + 1] - sortt[i] > 1:
			if c == 333:
				ans = ','.join((str(e) for e in data))
			else:
				ans = 'NO'
			break
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	even = len(list(filter(lambda x: x % 2 == 0, arr)))
	odd = len(list(filter(lambda x: x % 2 == 1, arr)))
	if even:
		print('YES' if odd else 'NO')
	else:
		print('YES' if odd % 2 == 1 else 'NO')


from sys import stdin
nii = lambda : map(int, stdin.readline().split())
lnii = lambda : list(map(int, stdin.readline().split()))
t = int(input())
for i in range(t):
	n = int(input())
	a = lnii()
	a.sort()
	ans = True
	for j in range(1, n):
		if a[j] - a[j - 1] >= 2:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


op = []
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	c = 0
	for i in range(1, n):
		if not (a[i - 1] == a[i] or a[i - 1] == a[i] - 1):
			op.append(False)
			break
	else:
		op.append(True)
for v in op:
	if v:
		print('YES')
	else:
		print('NO')


from collections import Counter

def solution(n, nums):
	if n == 1:
		return 'YES'
	for x in range(n - 1):
		result = nums[x + 1] - nums[x] <= 1
		if result == False:
			return 'NO'
	return 'YES'
tests = int(input())
for _ in range(tests):
	n = int(input().strip())
	nums = sorted(list(map(int, input().strip().split())))
	print(solution(n, nums))


t = int(input())
for ll in range(t):
	n = int(input())
	integers = set(map(int, input().split(' ')))
	integers = list(integers)
	integers.sort()
	for i in range(1, len(integers)):
		if abs(integers[i] - integers[i - 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
while t != 0:
	n = int(input())
	l = list(map(int, input().split()))
	sum = 0
	for i in l:
		sum = sum + i
	if sum % 2 != 0:
		print('YES')
	else:
		set1 = set(l)
		if len(set1) == 1:
			print('NO')
		else:
			e = 0
			o = 0
			flag = 0
			for i in l:
				if i % 2 == 0:
					e = e + 1
				else:
					o = o + 1
				if e > 0 and o > 0:
					print('YES')
					flag = 1
					break
			if flag == 0:
				print('NO')
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	imp = False
	paire = False
	for c in a:
		if c % 2 == 0:
			paire = True
		else:
			imp = True
	if n % 2 != 0:
		if imp:
			print('YES')
		else:
			print('NO')
	elif imp and paire:
		print('YES')
	else:
		print('NO')


ans = []
for t in range(int(input())):
	n = int(input())
	nums = [int(i) for i in input().split()]
	oddCount = 0
	for i in nums:
		if i % 2 == 1:
			oddCount += 1
	if oddCount == n and n % 2 == 0 or oddCount == 0:
		ans.append('NO')
	else:
		ans.append('YES')
print('\n'.join(ans))


from math import *
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	f = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			f = False
	if f:
		print('YES')
	else:
		print('NO')


t = int(input())

def solve(a):
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			return
	print('YES')
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	solve(a)


t = int(input())
for i in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	if n == 1:
		print('YES')
		continue
	l.sort()
	flag = True
	for i in range(n - 1):
		if abs(l[i + 1] - l[i]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	mas = list(map(int, input().split()))
	count_of_chet = 0
	count_of_ne = 0
	for j in mas:
		if j % 2 == 0:
			count_of_chet += 1
		else:
			count_of_ne += 1
	if count_of_ne % 2 != 0:
		print('YES')
	elif count_of_chet == 0 or count_of_ne == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	li = [int(x) for x in input().split()]
	li.sort()
	for i in range(n - 1):
		if li[i + 1] - li[i] > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	start = arr[0]
	flag = True
	for i in range(1, n):
		if start + 1 < arr[i]:
			flag = False
			break
		start = arr[i]
	if flag:
		print('Yes')
	else:
		print('NO')


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

def read_int_list():
	return list(map(int, input().split(' ')))
for _ in range(read_int()):
	_ = read_int()
	list_input = sorted(read_int_list(), reverse=False)
	index = 0
	answer = True
	while index < len(list_input) - 1:
		answer &= abs(list_input[index] - list_input[index + 1]) <= 1
		if not answer:
			break
		index += 1
	print('YES' if answer else 'NO')


n = int(input())
for i in range(n):
	m = int(input())
	A = list(map(int, input().split()))
	a = 0
	for j in range(m):
		if A[j] % 2 == 1:
			a += 1
	if a % 2 == 1 or (a > 0 and a % 2 == 0 and (a < m)):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	m = int(input())
	numbers = list(sorted(set(map(int, input().split()))))
	len_numbers = len(numbers)
	if len_numbers == 1:
		print('YES')
	else:
		ok = False
		for j in range(1, len_numbers):
			if abs(numbers[j] - numbers[j - 1]) > 1:
				ok = False
				break
			else:
				ok = True
		if ok:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	z = 0
	for j in range(n - 1):
		if l[j + 1] - l[j] > 1:
			z = 1
			break
	if z == 1:
		print('NO')
	else:
		print('YES')


size = int(input())
for i in range(size):
	(till, sum) = (int(input()), 0)
	arr = [int(new) for new in input().split()]
	odd = 0
	even = 0
	for i in arr:
		sum += i
		if i % 2:
			odd += 1
		else:
			even += 1
	if sum % 2 and sum != 1:
		print('YES')
	elif even != 0 and odd != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	s = 0
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			s = 1
			break
	if s == 0 or n == 1:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ans = 0
	for i in range(1, n):
		if l[i] - l[i - 1] != 0 and l[i] - l[i - 1] != 1:
			ans = 1
	if ans == 0:
		print('YES')
	else:
		print('NO')


import sys
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, sys.stdin.readline().split()))
	arr.sort()
	flag = 0
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


import sys

def solve(A):
	if len(A) == 1:
		return True
	else:
		A.sort()
		good = True
		for i in range(1, len(A)):
			if A[i - 1] < A[i] - 1:
				good = False
				break
		return good
IN = [x.strip() for x in sys.stdin.readlines()]
T = int(IN[0])
cur = 1
for ti in range(T):
	a = [int(x) for x in IN[cur + 1].split(' ')]
	print('YES' if solve(a) else 'NO')
	cur += 2


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	odds = 0
	evens = 0
	for i in range(n):
		if l[i] % 2 != 0:
			odds += 1
		else:
			evens += 1
	if odds > 0:
		if odds % 2 != 0 or evens > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ai = list(map(int, input().split()))
	odd = [x for x in ai if x % 2 != 0]
	even = [x for x in ai if x % 2 == 0]
	if sum(ai) % 2 != 0:
		print('YES')
	elif len(odd) >= 1 and len(even) >= 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	input()
	arr = list(map(int, input().split()))
	chet = 0
	nechet = 0
	for i in arr:
		if i % 2 == 0:
			chet += 1
		else:
			nechet += 1
	if nechet == 0 or (sum(arr) % 2 == 0 and chet == 0):
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
t = 1
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	odd = False
	even = False
	for i in l:
		if i % 2 == 1:
			odd = True
		else:
			even = True
	if sum(l) % 2 == 1 or (odd and even):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 1
	k = min(a)
	for i in sorted(a):
		if i - k > 1:
			s = 0
			break
		k = i
	if s:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	f = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')


for i in range(int(input())):
	n = int(input())
	l = list(map(lambda x: int(x) % 2, input().split()))
	if sum(l) % 2 == 1:
		print('YES')
	elif len(set(l)) == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for cases in range(0, t):
	n = int(input())
	a = []
	a = list(map(int, input().strip().split()))[:n]
	a.sort()
	possible = True
	for i in range(len(a) - 1, 0, -1):
		if a[i] - a[i - 1] > 1:
			possible = False
			break
	if possible:
		print('YES')
	else:
		print('NO')


t = int(input(''))
for l in range(t):
	n = int(input(''))
	a = list(map(int, input('').strip().split()))[:n]
	a.sort()
	flag = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


def remove_smallest(a, L):
	for i in range(L):
		try:
			if abs(a[i] - a[i + 1]) > 1:
				return 'NO'
		except IndexError:
			pass
	return 'YES'
n = int(input())
for i in range(n):
	leng = int(input())
	arr = list(map(int, input().rstrip().split()))
	print(remove_smallest(sorted(arr), leng))


t = int(input())
for x in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	check = True
	while len(arr) > 1:
		if arr[1] - arr[0] <= 1:
			arr.pop(0)
		else:
			check = False
			break
	if check:
		print('YES')
	else:
		print('NO')


test = int(input())
for j in range(test):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = 0
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	s = map(int, input().split())
	s = list(s)
	sum = 0
	chet = 0
	nechet = 0
	for i in range(len(s)):
		sum += s[i]
		if s[i] % 2 == 0:
			chet += 1
		else:
			nechet += 1
	if sum % 2 != 0:
		print('YES')
	elif chet != 0 and nechet != 0:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if any((abs(arr[i] - arr[i + 1]) > 1 for i in range(n - 1))):
		print('NO')
	else:
		print('YES')


def solve(arr):
	if len(arr) <= 1:
		return 'YES'
	arr.sort()
	for i in range(len(arr) - 1):
		if abs(arr[i + 1] - arr[i]) <= 1:
			continue
		else:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr))


t = int(input())
while t > 0:
	t -= 1
	n = input()
	arr = list(map(int, input().strip().split(' ')))
	ans = True
	arr.sort()
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			ans = False
			break
	if len(arr) == 1 or ans:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = 0
	a.sort()
	for i in range(n):
		for j in range(i + 1, n):
			if abs(a[i] - a[j]) <= 1:
				cnt += 1
				break
	if cnt == n - 1:
		print('YES')
	else:
		print('NO')


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
sys.setrecursionlimit(10 ** 5)

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

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

def li():
	return list(sys.stdin.readline().strip())

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

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

def solve():
	a = ii()
	b = lii()
	e = o = 0
	for x in b:
		if x % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0:
		print('NO')
	elif e == 0 and o % 2 == 0:
		print('NO')
	else:
		print('YES')
for _ in range(ii()):
	solve()


t = int(input())
while t > 0:
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	ans = 'YES'
	for i in range(n - 1):
		if arr[i + 1] - arr[i] <= 1:
			i += 1
		else:
			ans = 'NO'
			break
	print(ans)
	t -= 1


import math
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	input()
	sp = list(map(int, input().split()))
	if sum(sp) % 2 == 1:
		print('YES')
	elif sp.count(sp[0]) == len(sp):
		print('NO')
	else:
		sp1 = []
		p = sp[0] % 2
		for i in sp:
			sp1.append(i % 2)
		if sp1.count(p) == len(sp):
			print('NO')
		else:
			print('YES')


n = int(input())
for j in range(0, n):
	n = int(input())
	lst = [int(i) for i in input().split()]
	sum1 = sum(lst)
	if sum1 % 2 != 0:
		print('YES')
	else:
		ne = 0
		no = 0
		for i in lst:
			if i % 2 == 0:
				ne += 1
			else:
				no += 1
		if ne == 0:
			print('NO')
		elif no == 0:
			print('NO')
		else:
			print('YES')


for i in range(int(input())):
	t = int(input())
	l = [int(x) for x in input().split()]
	a = 0
	b = []
	c = []
	for j in l:
		if j % 2 == 0:
			b.append(j)
		else:
			c.append(j)
	if len(b) > 0 and len(c) > 0:
		a = 1
	elif len(b) == 0 and t % 2 != 0:
		a = 1
	else:
		a = 0
	if a == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	ar = [int(c) for c in input().split()]
	c = 'YES'
	ar = sorted(ar)
	for i in range(1, n):
		if ar[i] - ar[i - 1] > 1:
			c = 'NO'
			break
	print(c)


T = int(input())
for t in range(0, T):
	n = int(input())
	a = list(map(int, input().split()))
	if all((x % 2 == 1 for x in a)) and n % 2 == 0 or all((x % 2 == 0 for x in a)):
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort()
	list_len = len(lst)
	while list_len > 1:
		k = 1
		abs_diff = abs(lst[k] - lst[k - 1])
		if abs_diff > 1:
			break
		else:
			lst.pop(k - 1)
			list_len -= 1
	if list_len != 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for i in lis:
		if even >= 1 and odd >= 1:
			break
		if i & 1 == 0:
			even += 1
		else:
			odd += 1
	if odd & 1 != 0 or (even >= 1 and odd >= 1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().strip().split()))
	a = sorted(a)
	flag = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for zz in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	x = 0
	for i in range(n - 1):
		if l[i] == l[i + 1]:
			continue
		elif abs(l[i] - l[i + 1]) <= 1:
			continue
		elif abs(l[i] - l[i + 1]) > 1:
			x = 1
			break
	if x == 1:
		print('NO')
	else:
		print('YES')


def is_possible(arr):
	amount_odds = 0
	has_even = False
	for i in range(len(arr)):
		if arr[i] % 2 != 0:
			amount_odds += 1
		else:
			has_even = True
	if amount_odds % 2 == 0:
		if amount_odds == 0:
			return 'NO'
		if has_even:
			return 'YES'
		else:
			return 'NO'
	else:
		return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(is_possible(arr))


from os import path
import sys
from heapq import heappush, heappop, heapify
from functools import cmp_to_key as ctk
from collections import deque, 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 b(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		n = ii()
		a = li()
		a.sort()
		f = 0
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				f = 1
				break
		if f:
			print('NO')
		else:
			print('YES')
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
import math
input = sys.stdin.readline
d = {}
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	o = 0
	e = 0
	for i in range(n):
		if a[i] % 2:
			o += 1
		else:
			e += 1
	if n % 2 == 0 and e == 0:
		print('NO')
	elif o == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar = list(set(ar))
	ar.sort()
	for i in range(len(ar) - 1):
		if ar[i + 1] - ar[i] > 1:
			print('NO')
			break
	else:
		print('YES')


def check(lst):
	(even, odd) = (False, False)
	for elem in lst:
		if elem % 2 == 0:
			even = True
		else:
			odd = True
	if even and (not odd) or (not even and odd):
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	if sum(a) % 2 == 0:
		print(check(a))
	else:
		print('YES')


from sys import stdout, stdin
from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	k = 'YES'
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			k = 'NO'
			break
	print(k)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
sys.setrecursionlimit(10 ** 6)
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
		continue
	flag = 0
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			flag = 1
			break
	if flag:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	x = int(input())
	a = set(map(int, input().split()))
	print('YES' if max(a) - min(a) < len(a) else 'NO')


def solve():
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			print('NO')
			break
	else:
		print('YES')
for _ in range(int(input())):
	solve()


import sys, itertools, math
T = int(sys.stdin.readline())
for _ in range(T):
	sys.stdin.readline()
	A = [int(i) for i in sys.stdin.readline().strip().split(' ')]
	n_odd = 0
	n_even = 0
	for a in A:
		if a % 2 == 0:
			n_even += 1
		else:
			n_odd += 1
	if n_odd == 0:
		print('NO')
	elif n_odd == len(A) and len(A) % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for q in range(t):
	n = int(input())
	lis = list(map(int, input().split()))
	(even, odd) = (0, 0)
	if sum(lis) % 2 != 0:
		print('YES')
		continue
	for i in range(len(lis)):
		if lis[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 != 0:
		print('YES')
	elif odd > 0 and even > 0 and (odd % 2 == 0):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ce = 0
	co = 0
	for i in l:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	if co == 0:
		print('NO')
	elif ce == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = input().split()
	count = 0
	for i in range(n):
		arr[i] = int(arr[i])
		if arr[i] % 2 != 0:
			count += 1
	if count == 0:
		print('NO')
		continue
	if count == n and n % 2 == 0:
		print('NO')
		continue
	print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = [x % 2 for x in a]
	if max(l) == 0 or (n % 2 == 0 and all(l)):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	input()
	data = sorted(map(int, input().split()))
	if len(data) == 1:
		print('YES')
	else:
		print(('YES', 'NO')[max((v2 - v1 for (v1, v2) in zip(data, data[1:]))) >= 2])


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()[:n]]
	a.sort()
	a = list(set(a))
	b = a.copy()
	c = []
	if len(a) == 1:
		print('YES')
	else:
		k = 0
		while k < len(a) - 1:
			if abs(a[k] - a[k + 1]) <= 1:
				c.append(a[k])
			else:
				pass
			k += 1
		l = 0
		while len(c) != 0:
			b.remove(c[l])
			c.pop(l)
		if len(b) == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	if len(a) == 1:
		print('YES')
	else:
		a.sort()
		found = False
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				print('NO')
				found = True
				break
		if not found:
			print('YES')


T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	no_of_odds = 0
	no_of_evens = 0
	for i in arr:
		if i % 2 == 0:
			no_of_evens += 1
		else:
			no_of_odds += 1
	if sum(arr) % 2 == 1:
		print('YES')
	elif no_of_evens == n:
		print('NO')
	elif no_of_odds % 2 == 0 and no_of_evens != 0:
		print('YES')
	else:
		print('NO')


def fun(l):
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) <= 1:
			continue
		else:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	N = int(input())
	l = set(map(int, input().split()))
	l = list(l)
	l = sorted(l)
	print(fun(l))


t = int(input())
cnt = 0
for g in range(t):
	n = int(input())
	a = [int(n) for n in input().split()]
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			cnt += 1
		elif abs(a[i] - a[i + 1]) > 1:
			cnt += 0
	if cnt == n - 1:
		print('YES')
	else:
		print('NO')
	cnt = 0


for _ in range(int(input())):
	N = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	removed = [False] * N
	for i in range(N):
		for j in range(i + 1, N):
			if abs(nums[i] - nums[j]) <= 1:
				removed[i] = True
	if removed.count(True) == N - 1:
		print('YES')
	else:
		print('NO')


def makelist(n):
	b = []
	for i in range(n):
		b.append(0)
	return b

def countsort(ls):
	k = -99999999
	n = len(ls)
	for i in range(n):
		if ls[i] > k:
			k = ls[i]
	c = makelist(k + 1)
	b = makelist(n)
	for i in range(n):
		c[ls[i]] += 1
	for i in range(1, k + 1):
		c[i] += c[i - 1]
	for i in range(n - 1, -1, -1):
		b[c[ls[i]] - 1] = ls[i]
		c[ls[i]] -= 1
	return b
lst = []
t = int(input())
for z in range(t):
	lm = int(input())
	s = list(map(int, input().rstrip().split()))
	if lm == 1:
		lst.append('YES')
	else:
		s = countsort(s)
		active = True
		for i in range(lm - 1, 0, -1):
			if abs(s[i] - s[i - 1]) > 1:
				lst.append('NO')
				active = False
				break
		if active == True:
			lst.append('YES')
for i in lst:
	print(i)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		print('YES')
		continue
	if sum(arr) % 2 == 0 and n == arr.count(arr[0]):
		print('NO')
		continue
	found_even = False
	found_odd = False
	if sum(arr) % 2 == 0:
		for i in arr:
			if i % 2 != 0:
				found_odd = True
			if i % 2 == 0:
				found_even = True
		if found_odd and found_even:
			print('YES')
		else:
			print('NO')
		continue


def calc(n, a):
	if n > 1:
		tmp = min(a)
		a.remove(tmp)
		if (tmp in a) | (tmp + 1 in a):
			return calc(n - 1, a)
		else:
			return 'NO'
	else:
		return 'YES'

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = list(map(lambda x: int(x), input().split()))
		print(calc(n, a))
main()


t = int(input())
for i in range(t):
	list1 = []
	n = int(input())
	a = input().split()
	for z in a:
		list1.append(int(z))
	list1 = list(dict.fromkeys(list1))
	list1.sort()
	if len(list1) == 1:
		print('YES')
	else:
		while len(list1) > 1:
			if list1[1] - list1[0] == 1:
				list1.remove(list1[0])
			else:
				break
		if len(list1) == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	count = 0
	for i in range(n):
		if arr[i] % 2 != 0:
			count += 1
		else:
			pass
	if count == 0:
		print('NO')
	elif count == n and count % 2 == 0:
		print('NO')
	elif count == n and count % 2 != 0:
		print('YES')
	else:
		print('YES')


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	i = 0
	while i < n - 1:
		if l[i + 1] - l[i] <= 1:
			i = i + 1
		else:
			print('NO')
			break
	if i == n - 1:
		print('YES')
	t = t - 1


import math
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = list(set(a))
	s.sort()
	diff = []
	for i in range(len(s) - 1):
		diff.append(s[i + 1] - s[i])
	x = False
	for i in diff:
		if i > 1:
			x = True
	if x == True:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	n_odd = 0
	n_even = 0
	for x in a:
		if x % 2 == 0:
			n_even += 1
		else:
			n_odd += 1
	if n_even == n:
		print('NO')
	elif n_odd == n:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


x = int(input())
for i in range(x):
	n = int(input())
	a = list(map(int, input().split()))
	s = min(a)
	b = max(a)
	ans = True
	for j in range(s, b + 1):
		if j not in a:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	e = 0
	o = 0
	n = int(input())
	s = input().split(' ')
	for j in range(n):
		if int(s[j]) % 2 == 0:
			e += 1
		else:
			o += 1
	if e == n:
		print('NO')
	elif o == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


testcases = int(input())
for testcase in range(testcases):
	n = int(input())
	temparr = input()
	temparr = temparr.split()
	arr = []
	for i in temparr:
		arr.append(int(i))
	arr = sorted(arr)
	if len(arr) == 1:
		print('YES')
	else:
		flag = 0
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				flag = 1
				break
		if flag == 0:
			print('YES')
		else:
			print('NO')


for n in [*open(0)][2::2]:
	m = {*map(int, n.split())}
	print('YNEOS'[len(m) <= max(m) - min(m)::2])


import collections, heapq

def main():
	T = int(input().strip())
	for _ in range(T):
		n = int(input().strip())
		a = [int(x) for x in input().strip().split()]
		(odd, even) = (0, 0)
		for x in a:
			if x % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd % 2 == 1 or (odd != 0 and even != 0):
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for i in range(t):
	input()
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for z in a:
		if z % 2 == 0:
			even += 1
		else:
			odd += 1
	flag = False
	if even == 0 and odd % 2 == 1:
		flag = True
	elif even >= 1 and odd >= 1:
		flag = True
	if flag:
		print('YES')
	else:
		print('NO')


def result(L):
	for i in range(1, len(L)):
		if abs(L[i] - L[i - 1]) > 1:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	L = [int(x) for x in input().split()]
	L.sort()
	if len(L) == 1:
		print('YES')
	elif result(L) == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	b = False
	n = int(input())
	a = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			b = True
			break
	if b is True:
		print('NO')
	else:
		print('YES')


t = int(input())
for q in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	if sum(a) % 2 == 1:
		print('YES')
		continue
	anyevens = False
	anyodds = False
	for x in a:
		if x % 2 == 0:
			anyevens = True
		elif x % 2 == 1:
			anyodds = True
		if anyevens == True and anyodds == True:
			break
	if n % 2 == 0:
		if anyevens == True and anyodds == True:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 1:
		if anyodds == True:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	f = 0
	count = 0
	while i < n - 1:
		if abs(a[i] - a[i + 1]) <= 1:
			i += 1
			count += 1
		else:
			f = 1
			break
	if f == 1 and n - count > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = [int(j) for j in input().split()]
	c = 0
	for k in l:
		if k % 2 != 0:
			c = c + 1
	if c % 2 != 0:
		print('YES')
	elif c % 2 == 0 and c != n and (c != 0):
		print('YES')
	else:
		print('NO')


k = int(input())
for i in range(k):
	n = int(input())
	a = input().split(' ')
	oddCounter = 0
	evenCounter = 0
	for j in a:
		if int(j) % 2 == 0:
			evenCounter += 1
		else:
			oddCounter += 1
	if oddCounter % 2 == 1:
		print('YES')
	elif evenCounter > 0 and oddCounter != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = False
	sum_arr = sum(arr)
	if sum_arr % 2 != 0:
		flag = True
	else:
		l = []
		for x in arr:
			if x % 2 != 0:
				l.append(x)
		if len(l) == len(arr) and len(l) % 2 == 0:
			flag = False
		elif len(l) == 0:
			flag = False
		else:
			flag = True
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
lines = ''
ans = ''

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = 0
		j = 0
		k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i = i + 1
			else:
				arr[k] = R[j]
				j = j + 1
			k = k + 1
		while i < len(L):
			arr[k] = L[i]
			i = i + 1
			k = k + 1
		while j < len(R):
			arr[k] = R[j]
			j = j + 1
			k = k + 1
		return arr
	else:
		return arr

def convert(l):
	i = 0
	L = []
	for i in range(len(l)):
		L = L + [int(l[i])]
	return L

def f(x):
	y = x.split(' ')
	z = mergeSort(convert(y))
	i = 0
	for i in range(len(z) - 1):
		a = z[i]
		b = z[i + 1]
		if b - a > 1:
			return 'NO'
		else:
			i += 1
	return 'YES'
for i in range(2 * t):
	x = input()
	lines += x + '\n'
	if i % 2 != 0:
		ans += f(x) + '\n'
print(ans)


for _ in range(int(input())):
	d = input()
	a = sorted(list(set(map(int, input().split()))))
	b = len(a)
	if b == 1:
		print('YES')
	elif b == 0:
		print('NO')
	else:
		i = 0
		for x in a:
			v = x + 1
			if v in a:
				i += 1
		b = len(a)
		w = b - i
		if w == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	i = 1
	while i < len(a):
		if a[i] - a[i - 1] > 1:
			i = i
		else:
			a[i - 1] = -1
			a.remove(a[i - 1])
			i = i - 1
		i = i + 1
	if len(a) > 1:
		print('NO')
	else:
		print('YES')


tests = int(input())
for j in range(tests):
	n = int(input())
	a = 0
	arr = list(map(int, input().split()))
	for i in arr:
		if i % 2 == 1:
			a += 1
	if a == 0 or (a == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


def all_odd(num):
	for elem in num:
		if elem % 2 == 0:
			return False
	if len(num) % 2 == 0:
		return True
	else:
		return False

def all_even(num):
	for elem in num:
		if elem % 2 != 0:
			return False
	return True
t = int(input())
while t:
	n = int(input())
	num = list(map(int, input().split()))
	if all_odd(num) or all_even(num):
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	input()
	s = sorted([int(x) for x in input().split()])
	f = 0
	for i in range(1, len(s)):
		if s[i - 1] != s[i] and s[i - 1] != s[i] - 1:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')


for i in range(int(input())):
	n = int(input())
	arrr = list(map(int, input().split()))
	origlen = len(arrr)
	s = set(arrr)
	arr = list(s)
	arr.sort()
	i = 0
	ans = []
	while i < len(arr) - 1:
		if abs(arr[i] - arr[i + 1]) <= 1:
			arr.pop(i)
		else:
			i += 1
	if len(arr) == 1:
		print('YES')
	elif len(arr) == 0:
		if origlen % 2 == 0 or origlen == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	t = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	p1 = 0
	p2 = 1
	while p2 < len(l):
		if l[p2] - l[p1] > 1:
			f = 1
			break
		else:
			p2 += 1
			p1 += 1
	if f == 1:
		print('NO')
	else:
		print('YES')


ans = []
for _ in range(int(input())):
	n = int(input())
	a = sorted((int(x) for x in input().split()))
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ans.append('NO')
			break
	else:
		ans.append('YES')
print('\n'.join(ans))


t = int(input())
for i in range(t):
	a = int(input())
	a1 = list(map(int, input().split(' ')))
	a1.sort()
	if len(a1) == 1 or len(a1) == 0:
		print('YES')
	else:
		s = ''
		n = 0
		while n < len(a1) - 1:
			if a1[n + 1] - a1[n] == 1:
				s = 'YES'
			elif a1[n + 1] - a1[n] == 0:
				s = 'YES'
			else:
				s = 'NO'
				break
			n = n + 1
		print(s)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = False
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			f = True
			print('NO')
			break
	if f == False:
		print('YES')


T = int(input())
while T != 0:
	N = int(input())
	a = list(map(int, input().strip().split()))[:N]
	a.sort()
	found = True
	for i in range(N - 1):
		if a[i + 1] - a[i] > 1:
			found = False
	if found:
		print('YES')
	else:
		print('NO')
	T -= 1


t = int(input())
for loop in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	eve = 0
	for i in a:
		if i % 2 == 0:
			eve += 1
		else:
			odd += 1
	if eve > 0 and odd > 0:
		print('YES')
	elif odd == 0:
		print('NO')
	elif len(a) % 2 == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	m = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = 'YES'
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			ans = 'NO'
			break
	print(ans)


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


for tt in range(int(input())):
	n = int(input())
	a = [int(_) for _ in input().split()]
	a.sort()
	ok = True
	for i in range(1, n):
		ok &= a[i] - a[i - 1] <= 1
	print('YES' if ok else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	left = 1
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) <= 1:
			continue
		left += 1
	if left == 1:
		print('YES')
	else:
		print('NO')


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	N = int(sys.stdin.readline())
	list_num = list(map(int, sys.stdin.readline().split()))
	list_num.sort()
	can = 1
	for i in range(N - 1):
		if list_num[i + 1] - list_num[i] > 1:
			can = 0
			break
	print('YES' if can else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	numbers = [int(x) for x in input().split()]
	numbers = sorted(numbers)
	valid = True
	for j in range(1, n):
		if numbers[j] - numbers[j - 1] > 1:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split(' '))))
	while len(a) > 1:
		if abs(a[0] - a[1]) <= 1:
			if a[0] < a[1]:
				a.pop(0)
			else:
				a.pop(1)
		else:
			break
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


from sys import stdin
_input = stdin.readline
(_max, _str, _min, _int, _range) = (max, str, min, int, range)

def solution():
	for _ in _range(_int(_input())):
		n = _int(_input())
		arr = {_int(i) for i in _input().rstrip('\n').split()}
		for i in _range(_min(arr), _max(arr)):
			if i not in arr:
				print('NO')
				break
		else:
			print('YES')
solution()


for _ in range(int(input())):
	N = int(input())
	l = list(map(int, input().split()))
	nech = 0
	ch = 0
	for i in l:
		nech += i % 2 == 1
		ch += i % 2 == 0
	if nech % 2 == 1:
		print('YES')
	elif ch > 0 and nech != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	arr = input().split(' ')
	arr = [int(i) for i in arr]
	arr.sort()
	while len(arr) > 1:
		if abs(arr[0] - arr[1]) <= 1:
			arr.pop(0)
		else:
			print('NO')
			break
	if len(arr) <= 1:
		print('YES')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	o = False
	e = False
	for i in a:
		if i % 2 == 1:
			o = True
		if i % 2 == 0:
			e = True
	if o and n % 2 == 1:
		print('YES')
	elif o and e:
		print('YES')
	else:
		print('NO')


from sys import stdin

def main():
	res = stdin.read().splitlines()[2::2]
	for (i, s) in enumerate(res):
		l = sorted(map(int, s.split()))
		res[i] = ('NO', 'YES')[max((b - a for (a, b) in zip(l, l[1:])), default=0) < 2]
	print('\n'.join(res))
main()


t = int(input())
while t > 0:
	n = int(input())
	lis = [int(a) for a in input().split()]
	lis.sort()
	isNot = True
	for i in range(len(lis) - 1):
		x = lis[i] - lis[i + 1]
		if x < -1 or x > 1:
			isNot = False
			break
	if isNot:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	j = len(a) - 1
	b = True
	while i < j:
		if a[i] + 1 < a[i + 1]:
			b = False
			break
		if a[j] - 1 > a[j - 1]:
			b = False
			break
		i += 1
		j -= 1
	if b:
		print('YES')
	else:
		print('NO')


YES = 'YES'
NO = 'NO'

def solve(N, A):
	A.sort()
	prev = A[0]
	for i in range(1, N):
		curr = A[i]
		if abs(curr - prev) >= 2:
			return False
		prev = curr
	return True

def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		A = list(map(int, input().split()))
		ans = solve(N, A)
		print(YES if ans else NO)
main()


t = int(input())
for k in range(t):
	n = int(input())
	l = input().split()
	a = []
	for e in l:
		a.append(int(e))
	a.sort()
	n = len(a)
	flag = True
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


def main(a):
	j = list(set(a))
	i = sum(a)
	if i % 2 != 0:
		return 'YES'
	elif len(j) == 1:
		return 'NO'
	index = 0
	while index < len(a):
		x = 0
		while x < len(j):
			z = i - a[index] + j[x]
			if z % 2 != 0:
				return 'YES'
			x = x + 1
		index = index + 1
	return 'NO'

def sum(arr):
	index = 0
	sum = 0
	while index < len(arr):
		sum = sum + arr[index]
		index = index + 1
	return sum
t = int(input())
for t_itr in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	res = main(a)
	print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	a.sort()
	z = 0
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			z = 1
			break
	if n == 1:
		print('YES')
	elif z == 1:
		print('NO')
	else:
		print('YES')


def acc():
	(odd, even) = (0, 0)
	for i in numbers:
		if i % 2:
			odd += 1
		else:
			even += 1
	if odd % 2 or (not odd % 2 and odd > 0 and (even > 0)):
		return 'YES'
	else:
		return 'NO'
for case in range(int(input())):
	N = int(input())
	numbers = list(map(int, input().split()))
	print(acc())


for _ in range(int(input())):
	n = int(input())
	o = list(map(int, input().split()))
	k = 0
	l = 0
	if sum(o) % 2 == 1:
		print('YES')
	elif sum(o) % 2 == 0:
		for j in o:
			if j % 2 == 0:
				k = k + 1
			else:
				l = l + 1
		if k == 0 or l == 0:
			print('NO')
		else:
			print('YES')


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

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

def stringListIn():
	return [x for x in stdin.readline().split()]

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

def stringIn():
	return stdin.readline().strip()
t = intIn()
while t > 0:
	t -= 1
	n = intIn()
	a = listIn()
	a.sort()
	ans = 0
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ans = 1
			break
	if ans == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	m = sum((i & 1 for i in map(int, input().split())))
	if m & 1 or 0 < m < n:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	if s % 2 == 1:
		print('YES')
	else:
		(e, o) = (0, 0)
		for i in l:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if e >= 1 and o >= 1:
			print('YES')
		else:
			print('NO')


def func():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			print('NO')
			return
	print('YES')
	return
t = int(input())
for i in range(t):
	func()


import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io

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

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

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

def main():
	for i in range(ii()):
		n = ii()
		a = li()
		x = sorted(a)
		s = 'YES'
		for i in range(1, n):
			if abs(x[i] - x[i - 1]) > 1:
				s = 'NO'
				break
		print(s)
main()


for t in range(int(input())):
	(odd, even, n) = (0, 0, input())
	for num in map(int, input().split()):
		if num % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd & 1:
		print('YES')
	elif odd > 0 and even > 0:
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = input()
	a = list(sorted(map(int, stdin.readline().split())))
	f = 0
	prv = a[0]
	for i in a:
		if abs(prv - i) > 1:
			f = 1
		prv = i
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = [int(j) for j in input().split()]
	a.sort()
	flag = True
	for i in range(0, len(a) - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	ar = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if ar[i + 1] - ar[i] >= 2:
			print('NO')
			break
	else:
		print('YES')


cases = int(input())
for c in range(cases):
	count = int(input())
	arr = input().split(' ')
	sum = 0
	alleven = True
	allodd = True
	for i in arr:
		num = int(i)
		sum += num
		if num % 2 == 1:
			alleven = False
		else:
			allodd = False
	if sum % 2 == 1:
		print('YES')
	elif alleven:
		print('NO')
	elif allodd:
		print('NO')
	else:
		print('YES')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	d = set(a)
	b = sorted(d)
	for i in b:
		if i + 1 in d and i in b:
			d.remove(i)
	print('YES' if len(d) == 1 else 'NO')


def solve(arr):
	arr = sorted(arr)
	diffs = [True if abs(arr[i] - arr[i + 1]) in (0, 1) else False for i in range(len(arr) - 1)]
	if all(diffs) or len(arr) == 1:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = map(int, input().split())
	print(solve(arr))


def solve():
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	for i in range(n - 1):
		if abs(A[i] - A[i + 1]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
for l in range(t):
	print(solve())


for _ in range(int(input())):
	n = input()
	arr = sorted(list(set(map(int, input().split()))))
	flag = True
	for i in range(len(arr)):
		if i != len(arr) - 1 and arr[i + 1] - arr[i] != 1:
			flag = False
	print('YES' if flag else 'NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l1 = []
	for j in l:
		if j % 2 != 0:
			l1.append(j)
		else:
			pass
	if len(l1) == n and n % 2 != 0:
		print('YES')
	elif len(l1) == n and n % 2 == 0:
		print('NO')
	elif len(l1) != 0 and len(l1) != n:
		print('YES')
	else:
		print('NO')


x = int(input())
for i in range(x):
	input()
	v = sorted([int(x) for x in input().split()])
	n = 'YES'
	for i in range(len(v) - 1):
		if abs(v[i] - v[i + 1]) > 1:
			n = 'NO'
	print(n)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	k = 0
	a.sort()
	for i in range(0, len(a) - 1):
		if abs(a[i + 1] - a[i]) <= 1:
			a[i] = -1
	for i in range(0, len(a)):
		if a[i] > 0:
			k += 1
	if k > 1:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()][:n]
	a.sort()
	for j in range(n - 1):
		if a[j + 1] - a[j] <= 1:
			continue
		else:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	t = int(input())
	ar = list(map(int, input().split()))
	even = 0
	odd = 0
	for i in ar:
		if i % 2 == 0 and i != 1:
			even += 1
		else:
			odd += 1
	if sum(ar) % 2 != 0:
		print('YES')
	elif even == 0 or odd == 0:
		print('NO')
	else:
		print('YES')


import math
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ct = 0
	for i in range(n):
		if a[i] % 2 != 0:
			ct = ct + 1
	if ct == 0:
		print('NO')
	elif ct == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(0, t, 1):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	fl = False
	for j in range(1, n):
		if a[j] - a[j - 1] > 1:
			fl = True
	if fl == True:
		print('NO')
	else:
		print('YES')


from collections import defaultdict

def FindSubArraySum(l, n, sum1):
	res = 0
	curr = 0
	m = defaultdict(lambda : 0)
	for i in range(0, n):
		curr += l[i]
		if curr == sum1:
			res += 1
		if curr - sum1 in m:
			res += m[curr - sum1]
		m[curr] += 1
	return res
for cases in range(int(input())):
	s = 'YES'
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			s = 'NO'
			break
	print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	(evn, odd, _sum) = (0, 0, 0)
	for x in arr:
		_sum += x
		if x % 2 == 0:
			evn = 1
		if x % 2 != 0:
			odd = 1
	if _sum % 2 != 0 and _sum != 0:
		print('YES')
	elif evn == 1 and odd == 1:
		print('YES')
	else:
		print('NO')


import sys

def solve(n, nums):
	nums.sort()
	for i in range(1, n):
		if nums[i] - nums[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
while t:
	n = int(input())
	nums = list(map(int, input().split()))
	print(solve(n, nums))
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	num = list(map(int, input().split(' ')))
	num = list(set(num))
	num.sort()
	if len(num) == 1:
		print('YES')
	else:
		flag = 0
		for i in range(len(num) - 1):
			if num[i + 1] - num[i] > 1:
				flag = 1
				break
		if not flag:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split(' ')))
	a.sort()
	i = 0
	while True:
		if i >= len(a) - 1:
			break
		if int(math.fabs(a[i] - a[i + 1])) <= 1:
			del a[i]
			i = 0
		else:
			i += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	fl = 0
	p2 = 0
	p1 = 1
	while p1 < n:
		if abs(ar[p1] - ar[p2]) <= 1:
			p1 += 1
			p2 += 1
			fl = 0
		else:
			fl = 1
			break
	if fl == 1:
		print('NO')
	else:
		print('YES')


def solve(A, n):
	s = 0
	odd = False
	even = False
	for i in range(n):
		if A[i] % 2 == 1:
			odd = True
		if A[i] % 2 == 0:
			even = True
	if sum(A) % 2 == 1 or (even and odd):
		return True
	return False
res = []
t = int(input())
while t:
	n = int(input())
	arr = input().split(' ')
	A = [int(n) for n in arr]
	if solve(A, n):
		res.append('YES')
	else:
		res.append('NO')
	t -= 1
for r in res:
	print(r)


t = int(input())
for test_case in range(t):
	n = [int(x) for x in input().split()]
	n = n[0]
	res = 0
	a = []
	a = [int(y) for y in input().split()]
	res = 'YES'
	if len(a) == 1:
		res = 'YES'
	else:
		a.sort()
		for i in range(n - 1):
			if a[i] + 1 < a[i + 1]:
				res = 'NO'
				break
	print()
	print(res)
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(j) for j in input().split()]
	arr.sort()
	flag = 0
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
for nt in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] >= 2:
			flag = 'NO'
			break
	print(flag)


tc = int(input())
for t in range(tc):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	i = 0
	while i < len(l):
		temp = 0
		flag = 0
		for j in range(i + 1, len(l)):
			if l[j] - l[i] <= 1:
				temp = i
				l.remove(l[i])
				flag = 1
				break
		if flag == 1:
			i = temp
		else:
			i += 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


def removeSmallest(arr):
	if len(arr) == 1:
		return 'YES'
	i = 0
	j = 1
	k = 1
	arr.sort()
	while j < len(arr):
		if abs(arr[i] - arr[j]) <= 1:
			arr.pop(i)
			if len(arr) == 1:
				return 'YES'
			i = 0
			j = 0
		if j >= len(arr):
			i = k
			j = k
			k += 1
		j += 1
	return 'NO'
n = int(input())
outputs = []
for i in range(n):
	l = int(input())
	arr = [None] * l
	s = input() + ' '
	for j in range(l):
		a = s.find(' ')
		arr[j] = int(s[0:a])
		s = s[a + 1:len(s)]
	outputs.append(removeSmallest(arr))
for x in outputs:
	print(x)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	odd = 0
	for i in arr:
		if i % 2 == 1:
			odd += 1
	if odd == 0:
		print('No')
	elif odd % 2 == 0 and odd == n:
		print('No')
	else:
		print('Yes')


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


for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	lst = sorted(lst)
	ans = 'YES'
	for i in range(n - 1):
		if lst[i + 1] - lst[i] > 1:
			ans = 'NO'
			break
	print(ans)


from collections import defaultdict
t = int(input())
while t:
	n = int(input())
	arr = list(map(int, input().split()))
	odd = even = False
	for i in range(0, len(arr)):
		odd = odd or arr[i] % 2 == 1
		even = even or arr[i] % 2 == 0
	if sum(arr) % 2 == 1 or (odd and even):
		print('YES')
	else:
		print('NO')
	t = t - 1


tc = int(input())
while tc > 0:
	tc -= 1
	n = int(input())
	arr = []
	arr = list(map(int, input().strip().split()))[:n]
	arr.sort()
	flag = True
	for i in range(0, n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			flag = False
			break
	if flag == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	p = 0
	q = 0
	for e in a:
		if e % 2 == 0:
			p += 1
		else:
			q += 1
	if q == 0:
		print('NO')
	elif p == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


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

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

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

def solve(l):
	l = sorted(l)
	for i in range(len(l) - 1):
		if l[i] < l[i + 1] - 1:
			return False
	return True
r = inp()
for i in range(r):
	a = inp()
	l2 = inlt()
	s = solve(l2)
	if s:
		print('YES\n')
	else:
		print('NO\n')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = list(map(int, input().split()))
		s.sort()
		if n == 1:
			print('YES')
		else:
			for i in range(n - 1):
				if s[i + 1] - s[i] > 1:
					print('NO')
					break
			else:
				print('YES')
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) & 1:
		print('YES')
	else:
		odd = 0
		even = 0
		for i in range(n):
			if a[i] & 1:
				odd += 1
			else:
				even += 1
		if even > 0 and odd > 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	import copy
	n = int(input())
	no = list(map(int, input().split()))
	y = no.copy()
	no.sort()
	y.sort()
	for i in range(n - 1):
		if abs(no[i] - no[i + 1]) == 1 or no[i] - no[i + 1] == 0:
			y.pop()
	if len(y) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	s1 = False
	s2 = False
	s = list(input().split())
	for i in range(n):
		s[i] = int(s[i])
	if n % 2:
		s1 = True
	for i in range(n):
		if s[i] % 2:
			s2 = True
		else:
			s1 = True
	if s1 and s2:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	odd = 0
	even = 0
	n = int(input())
	s = list(map(int, input().split()))
	for i in range(s.__len__()):
		if s[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd >= 1 and even >= 1 or sum(s) % 2 != 0:
		print('YES')
	else:
		print('NO')


test = int(input())
while test > 0:
	test -= 1
	size = int(input())
	arr = list(map(int, input().split()))
	sep = 0
	arr.sort()
	for i in range(size - 1):
		if arr[i] == arr[i + 1] or arr[i + 1] - arr[i] == 1:
			continue
		sep += 1
	if sep == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
length = []
nums = []
for i in range(t):
	length.append(int(input()))
	nums.append(list(map(int, input().split())))

def solve(n, arr):
	if len(set(arr)) == 1:
		return 'YES'
	arr.sort()
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			return 'NO'
	return 'YES'
for i in range(t):
	print(solve(length[i], nums[i]))


t = int(input())
while t > 0:
	n = int(input())
	temp = list(map(int, input().split()))
	temp.sort()
	t1 = []
	for i in range(len(temp) - 1):
		if abs(temp[i] - temp[i + 1]) <= 1:
			t1.append(temp[i])
	for i in t1:
		if i in temp:
			temp.remove(i)
	if len(temp) == 1:
		print('YES')
	else:
		print('NO')
	t = t - 1


def q():
	n = int(input())
	a = input().split(' ')
	a_o = []
	for i in a:
		if int(i) % 2 != 0:
			a_o = a_o + [i]
		else:
			pass
	if len(a_o) == n and len(a_o) % 2 == 0 or len(a_o) == 0:
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(t):
	q()


from sys import stdin, stdout
tt = int(stdin.readline().strip())
for _ in range(tt):
	n = int(stdin.readline().strip())
	arr = list(map(int, stdin.readline().strip().split()))
	arr.sort()
	check = True
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			check = False
			break
	if check:
		print('YES')
	else:
		print('NO')


def process(l):
	l.sort()
	for i in range(0, len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			print('NO')
			return
		else:
			continue
	print('YES')

def main():
	n = int(input())
	for i in range(n):
		g = int(input())
		p = [int(x) for x in input().split()]
		process(p)
main()


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	b = a.sort()
	g = True
	for k in range(n - 1):
		if a[k + 1] - a[k] > 1:
			g = False
			break
	if g:
		print('YES')
	else:
		print('NO')


test = int(input())
for i in range(test):
	size = int(input())
	number = [int(i) for i in input().split()]
	number.sort()
	result = True
	for i in range(0, size - 1):
		result = result and number[i + 1] - number[i] <= 1
	print('YES') if result == True else print('NO')


t = int(input())
while t > 0:
	n = int(input())
	arr = [int(a) for a in input().split(' ')]
	(cnt_e, cnt_o) = (0, 0)
	for el in arr:
		if el % 2 != 0:
			cnt_o += 1
		else:
			cnt_e += 1
	if cnt_o % 2 != 0 or (cnt_o > 0 and cnt_e > 0):
		print('YES')
	else:
		print('NO')
	t -= 1


import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
n = inp()
for _ in range(n):
	l = inp()
	a = inlt()
	ans = 'YES'
	a = sorted(a)
	for _ in range(1, len(a)):
		if a[_] - a[_ - 1] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
c = []
for j in range(t):
	n = int(input())
	a = [int(u) for u in input().split()]
	a.sort()
	p = 0
	for i in range(n - 1):
		if a[i + 1] != a[i] and a[i + 1] != a[i] + 1:
			p = 1
			break
	if p == 1:
		c.append('NO')
	else:
		c.append('YES')
for k in c:
	print(k)


n = int(input())
a = []
for i in range(n):
	a.append([])
	j = int(input())
	a[i] = (0 for k in range(j))
	a[i] = list(map(int, input().split()))
for i in range(n):
	b = set(a[i])
	c = list(b)
	M = max(a[i])
	m = min(a[i])
	if len(a[i]) != 1:
		if (M - m) / len(c) >= 1:
			print('NO')
		else:
			print('YES')
	elif len(a[i]) == 1:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	if sum(a) % 2 != 0:
		print('YES')
	else:
		s = 0
		for j in range(n):
			s += a[j] % 2
		print('NYOE S'[0 < s < n + n % 2::2])


def can_reduce_array(nums):
	nums.sort()
	for i in range(1, len(nums)):
		if nums[i] - nums[i - 1] > 1:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print('YES' if can_reduce_array(arr) else 'NO')


def func(x, n):
	while len(x) > 1:
		if abs(x[0] - x[1]) > 1:
			return False
		else:
			x.remove(x[0])
	if len(x) == 1:
		return True
	else:
		return False
t = int(input())
for _ in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	x.sort()
	if func(x, n):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, e) = (int(input()), len([x for x in map(int, input().split()) if x & 1]))
	print('NO' if e == 0 or (e == n and n % 2 == 0) else 'YES')


test_case_count = int(input())
for test_case in range(test_case_count):
	number_of_elements = int(input())
	input_line_str = input()
	input_line_str = input_line_str.split()
	answer = ['NO', 'YES', 'YES']
	parity_count = [0, 0]
	length_parity = number_of_elements % 2
	for index in range(number_of_elements):
		elem = input_line_str[index]
		element = int(elem)
		parity_count[element % 2] = 1
	print(answer[parity_count[1] * (length_parity + parity_count[0])])


import sys
import math

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

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

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

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	a = sorted(LI())
	boo = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			boo = False
			break
	print('YES' if boo else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = map(int, input().split())
	od = ev = 0
	for ele in arr:
		if ele % 2 == 1:
			od += 1
		else:
			ev += 1
	if od > 0 and ev > 0:
		print('YES')
	elif od > 0 and n % 2 == 1:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
t = int(input())
for _ in range(t):
	n = int(input())
	nums = list(map(int, stdin.readline().strip().split()))
	(e, o) = (0, 0)
	for i in nums:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0:
		print('NO')
	elif n % 2 == 0 and e == 0:
		print('NO')
	else:
		print('YES')


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	f = 1
	if len(a) == 1:
		print('YES')
	else:
		for i in range(len(a) - 1):
			if a[i + 1] - a[i] > 1:
				f = 0
				break
		print('YES' if f else 'NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		print('YES')
		continue
	for i in range(n - 1):
		if a[i] + 1 < a[i + 1]:
			print('NO')
			break
	else:
		print('YES')


import atexit
import io
import sys
_IB = sys.stdin.read().splitlines()
input = iter(_IB).__next__
_OB = io.StringIO()
sys.stdout = _OB

@atexit.register
def write():
	sys.__stdout__.write(_OB.getvalue())

class inp:

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def ilist():
		return list(map(int, input().split()))

	@staticmethod
	def list():
		return input().split()

	@staticmethod
	def itup():
		return map(int, input().split())

	@staticmethod
	def str():
		return list(input())

def main():
	t = inp.int()
	for _ in range(t):
		n = inp.int()
		a = inp.ilist()
		if sum(a) % 2 == 1:
			print('YES')
			continue
		odd = False
		even = False
		for ai in a:
			if ai % 2 == 1:
				odd = True
			if ai % 2 == 0:
				even = True
		if odd & even:
			print('YES')
		else:
			print('NO')
main()


def sort_puz(mas):
	for i in range(len(mas) - 1):
		for j in range(i + 1, len(mas)):
			if mas[i] > mas[j]:
				(mas[i], mas[j]) = (mas[j], mas[i])
	return mas
n = int(input())
i = 0
while i < n:
	a = int(input())
	mas = [int(j) for j in input().split()]
	mas = sort_puz(mas)
	j = 0
	while j < len(mas) - 1:
		if abs(mas[j] - mas[j + 1]) <= 1:
			mas.pop(j)
		else:
			j += 1
	if len(mas) == 1:
		print('YES')
	else:
		print('NO')
	i += 1


t = int(input())
p = []
q = []
for i in range(t):
	u = int(input())
	o = list(map(int, input().split()))
	p.append(u)
	q.append(o)

def tully(p, q):
	q.sort()
	flag = 1
	for i in range(p - 1):
		if q[i + 1] - q[i] > 1:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')
for i in range(t):
	tully(p[i], q[i])


import sys

def merge(arr1, arr2):
	(i, j) = (0, 0)
	arr = []
	for k in range(len(arr1) + len(arr2)):
		if i >= len(arr1):
			arr.append(arr2[j])
			j += 1
		elif j >= len(arr2):
			arr.append(arr1[i])
			i += 1
		elif arr1[i] < arr2[j]:
			arr.append(arr1[i])
			i += 1
		else:
			arr.append(arr2[j])
			j += 1
	return arr

def MergeSort(numbers):
	if len(numbers) <= 1:
		return numbers
	mid = len(numbers) // 2
	left_part = MergeSort(numbers[:mid])
	right_part = MergeSort(numbers[mid:])
	return merge(left_part, right_part)

def answer(a):
	a = MergeSort(a)
	Run = True
	len1 = len(a)
	if len(a) > 1:
		while Run:
			if a[1] - a[0] <= 1:
				a.pop(0)
			if len1 == len(a) or len(a) == 1:
				Run = False
			else:
				len1 = len(a)
	if len(a) == 1:
		sys.stdout.write('YES\n')
	else:
		sys.stdout.write('NO\n')
t = int(sys.stdin.readline().split()[0])
for i in range(t):
	n = int(sys.stdin.readline().split()[0])
	numbers = sys.stdin.readline().split()
	for j in range(n):
		numbers[j] = int(numbers[j])
	answer(numbers)


for i in range(int(input())):
	a = int(input())
	b = [int(i) for i in input().split()]
	b = list(set(b))
	b.sort()
	if len(b) == 1:
		print('YES')
	else:
		flag = True
		for i in range(len(b) - 1):
			if b[i] + 1 != b[i + 1]:
				flag = False
		if flag == True:
			print('YES')
		else:
			print('NO')


t = int(input())
for cases in range(t):
	n = int(input())
	elements = list(map(int, input().split()))
	if sum(elements) % 2 != 0:
		print('YES')
	else:
		(even, odd) = (0, 0)
		for e in sorted(elements):
			if e % 2 == 0:
				even += 1
			else:
				odd += 1
		if even > 0 and odd > 0:
			print('YES')
		else:
			print('NO')


k = int(input())
l = 0
while l < k:
	size = int(input())
	arr = input().split()
	for i in range(size):
		arr[i] = int(arr[i])
	sum_arr = 0
	count = 0
	for i in range(size):
		sum_arr += arr[i]
		if arr[i] % 2 != 0:
			count += 1
	if count % 2 == 0 and size == count or count == 0:
		print('NO')
	else:
		print('YES')
	l += 1


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	print('YES' if sum(s) % 2 or len(set([i % 2 for i in s])) > 1 else 'NO')


t = int(input())
for test in range(t):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	flag = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	x = int(input())
	data = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in data:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even > 0 and odd > 0 or (even == 0 and x % 2 != 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	f = 0
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	tam = int(input())
	numeros = list(map(int, input().split()))
	numeros.sort()
	sePuede = True
	for i in range(len(numeros) - 1):
		if abs(numeros[i] - numeros[i + 1]) > 1:
			sePuede = False
			break
	if sePuede:
		print('YES')
	else:
		print('NO')


test_case = int(input())
for i in range(test_case):
	even = 0
	odd = 0
	length = int(input())
	values = list(map(int, input().split(' ')))
	for j in values:
		if j % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd:
		if length == odd and length % 2 != 0:
			print('YES')
		elif sum(values) % 2 == 0 and length != odd:
			print('YES')
		elif sum(values) % 2 != 0 and length != odd:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	mn = min(a)
	mx = max(a)
	ans = 'YES'
	for i in range(mn, mx + 1):
		if i not in a:
			ans = 'NO'
			break
	print(ans)


mod = 10 ** 9 + 7

def solve():
	d = {}
	n = int(input())
	a = list(map(int, input().split()))
	vec = []
	for x in a:
		if x not in vec:
			vec.append(x)
	print('YES' if max(vec) - min(vec) + 1 == len(vec) else 'NO')
t = 1
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = list(set(a))
	b.sort()
	f = 0
	if len(b) == 1 or len(b) == 0:
		print('YES')
	else:
		i = 0
		while i < len(b) - 1:
			if abs(b[i] - b[i + 1]) <= 1:
				b.pop(i)
				i = 0
			else:
				i += 1
		if len(b) == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))[:n]
	ar.sort()
	p = 0
	for i in range(n - 1):
		if abs(ar[i + 1] - ar[i]) > 1:
			p = 1
			break
	if p:
		print('NO')
	else:
		print('YES')


for y in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort()
	flag = 0
	for i in range(1, n):
		if lst[i] - lst[i - 1] == 0 or lst[i] - lst[i - 1] == 1:
			pass
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if len(a) == 1:
		print('YES')
	else:
		j = 1
		l = len(a)
		while l != 1:
			if abs(a[j - 1] - a[j]) <= 1:
				if a[j - 1] < a[j]:
					a.remove(a[j - 1])
				else:
					a.remove(a[j])
			else:
				print('NO')
				break
			l = len(a)
		if len(a) == 1:
			print('YES')


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


for _ in range(int(input())):
	x = int(input())
	a = sorted(set([int(i) for i in input().split()]))
	x = True
	for i in range(1, len(a)):
		if a[i] - a[i - 1] != 1:
			x = False
			break
	if x:
		print('YES')
	else:
		print('NO')


tests = int(input())
for _ in range(tests):
	n = int(input())
	a = list(map(int, input().split()))
	if max(a) - min(a) == len(set(a)) - 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	s = sum(x)
	if s % 2:
		print('YES')
		continue
	else:
		o = 0
		e = 0
		for each in x:
			if e >= 1 and o >= 1:
				break
			if each % 2 == 0:
				e += 1
			else:
				o += 1
		if e >= 1 and o >= 1:
			print('YES')
		else:
			print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ans = False
			break
	print('YES' if ans else 'NO')


t = int(input())
for _ in range(t):
	a = int(input())
	l = list(map(int, input().strip().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		even = 0
		odd = 0
		for i in l:
			if i % 2 == 0:
				even = even + 1
			else:
				odd = odd + 1
		if odd == a or even == a:
			print('NO')
		else:
			print('YES')


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	odds = sum((1 for x in a if x % 2 == 1))
	evens = sum((1 for x in a if x % 2 == 0))
	if odds and (odds != n or n % 2 == 1):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	t = input()
	arr = list(map(int, input().split()))
	arr.sort()
	chk = 1
	for j in range(1, len(arr)):
		if arr[j] - arr[j - 1] > 1:
			print('NO')
			chk = 0
			break
	if chk == 1:
		print('YES')


ans = []
n = int(input())
for i in range(n):
	k = int(input())
	x = input().split(' ')
	for j in range(k):
		x[j] = int(x[j])
	x = sorted(x)
	j = 0
	while j < len(x) - 1:
		if abs(x[j] - x[j + 1]) <= 1:
			x.pop(j)
			j -= 1
		j += 1
	if len(x) == 1:
		ans.append('YES')
	else:
		ans.append('NO')
for i in ans:
	print(i)


for w in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = True
	for e in range(1, n):
		if a[e] - a[e - 1] > 1:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(j) for j in input().split(' ')]
	arr.sort()
	valid = True
	for j in range(n - 1):
		if abs(arr[j + 1] - arr[j]) > 1:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


def calc():
	print()

def main():
	for _ in range(int(input())):
		n: int = int(input())
		arr: list = list(map(int, input().split()))
		odd: int = 0
		even: int = 0
		total: int = 0
		for i in arr:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
			total += i
		if total % 2 == 1:
			print('YES')
		elif odd != 0 and even != 0:
			print('YES')
		else:
			print('NO')
main()


for t in range(int(input())):
	(n, a) = (int(input()), sorted(map(int, input().split())))
	print('YES' if all((a[i] - a[i - 1] <= 1 for i in range(1, n))) else 'NO')


def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		cnt = 0
		for i in range(n):
			if a[i] % 2 == 0:
				cnt += 1
		if cnt == n:
			print('NO')
		elif cnt == 0 and n % 2 == 0:
			print('NO')
		else:
			print('YES')
main()


no = int(input())
while no > 0:
	n = int(input())
	arr = list(map(int, input().strip().split(' ')))
	arr.sort()
	i = 0
	while i < len(arr) - 1:
		if abs(arr[i] - arr[i + 1]) <= 1:
			arr.pop(i)
		else:
			print('NO')
			break
	if len(arr) == 1:
		print('YES')
	no -= 1


def sovle(arr):
	arr.sort()
	n = len(arr)
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			return 'NO'
	return 'YES'
t = int(input())
while t:
	n = input()
	arr = list(map(int, input().split()))
	print(sovle(arr))
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	numbers = [int(x) for x in input().split()]
	numbers.sort()
	isGood = True
	for i in range(n - 1):
		if abs(numbers[i] - numbers[i + 1]) > 1:
			isGood = False
			break
	if isGood:
		print('YES')
	else:
		print('NO')


def dif1(a, n):
	if n == 1:
		return True
	else:
		a.sort()
		i = 1
		ok = abs(a[0] - a[1]) <= 1
		while ok and i < n - 1:
			ok = abs(a[i] - a[i + 1]) <= 1
			i += 1
		return ok
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if dif1(a, n):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	valid = True
	for i in range(1, n):
		if li[i] - li[i - 1] >= 2:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


def modinv(n, p):
	return pow(n, p - 2, p)

def main():
	for case in range(int(input())):
		n = int(input())
		a = [int(x) for x in input().split()]
		a.sort()
		ans = 'YES'
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				ans = 'NO'
				break
		print(ans)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

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


t = int(input())
for i in range(t):
	a = int(input())
	b = [int(s) for s in input().split()]
	y1 = False
	y2 = False
	for k in b:
		if k % 2 == 0:
			y2 = True
		else:
			y1 = True
		if y1 == y2:
			break
	if y1 and y2 == True or sum(b) % 2 == 1:
		print('YES')
	else:
		print('NO')


def check(l: list) -> str:
	l.sort()
	x = True
	for i in range(1, len(l)):
		x = x and l[i] - l[i - 1] <= 1
	if x:
		return 'YES'
	return 'NO'
t = int(input())
while t > 0:
	n = int(input())
	x = [int(x) for x in input().split()]
	print(check(x))
	t -= 1


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = set(l)
	m = min(s)
	c = 0
	for j in range(1, len(s)):
		if m + j in s:
			c += 1
	if c == len(s) - 1:
		print('YES')
	else:
		print('NO')


import sys
for bruh in range(0, int(sys.stdin.readline())):
	leng = int(sys.stdin.readline())
	mlist = list(map(int, sys.stdin.readline().split()))
	k = min(mlist)
	l = max(mlist)
	works = 'YES\n'
	while k < l + 1:
		if not k in mlist:
			works = 'NO\n'
		k += 1
	sys.stdout.write(works)


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	l = [int(x) for x in input().split()]
	if n == 1:
		print('YES')
		continue
	l.sort()
	fg = 0
	for k in range(n - 1):
		if l[k + 1] - l[k] >= 2:
			fg = 1
			break
	if fg == 1:
		print('NO')
	else:
		print('YES')


def solve(n, as_):
	odd = even = False
	for a in as_:
		odd = odd or a & 1
		even = even or not a & 1
		if odd and (even or n & 1):
			return True
	return False
for T in range(int(input())):
	print('YES' if solve(int(input()), map(int, input().split())) else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	ind = 0
	for j in range(n - 1):
		if l[j + 1] > l[j] + 1:
			ind = 1
	if ind:
		print('NO')
	else:
		print('YES')


def contain(L, a):
	for val in L:
		if val == a:
			return True
	return False

def find_max(L):
	temp = 0
	temp_idx = 0
	for (idx, val) in enumerate(L):
		if val > temp:
			temp = val
			temp_idx = idx
	return (temp_idx, temp)

def find(L, a):
	for (idx, val) in enumerate(L):
		if val == a:
			return (idx, val)
	return (-1, -1)
tests = int(input())
for t in range(tests):
	length = int(input())
	raw = input()
	A = list(map(int, raw.split()))
	(idx, temp) = find_max(A)
	A[idx] = -1
	breaked = False
	for i in range(length - 1):
		(idf, found) = find(A, temp)
		if idf != -1:
			A[idf] = -1
			temp = found
		else:
			(idf, found) = find(A, temp - 1)
			if idf != -1:
				A[idf] = -1
				temp = found
			else:
				print('NO')
				breaked = True
				break
	if not breaked:
		print('YES')


T = int(input())
for case in range(T):
	N = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	impossible = False
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) <= 1:
			continue
		else:
			impossible = True
			break
	if impossible:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	arr = []
	elements = input().split(' ')
	for i in elements:
		arr.append(int(i))
	arr.sort()
	max_diff = -1
	for i in range(1, n):
		max_diff = max(max_diff, abs(arr[i] - arr[i - 1]))
	if n == 1:
		print('YES')
	elif max_diff > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for T in range(t):
	n = int(input())
	a = input().split()
	if len(a) > 1:
		R = [False, False]
		for i in a:
			if int(i) % 2 == 0:
				R[0] = True
			if int(i) % 2 != 0:
				R[1] = True
		if not R[0] and R[1]:
			if len(a) % 2 == 0:
				print('NO')
			else:
				print('YES')
		elif R[0] and R[1]:
			print('YES')
		else:
			print('NO')
	else:
		print('NO') if int(a[0]) % 2 == 0 else print('YES')


for i in range(int(input())):
	n = int(input())
	x = sorted(set([int(k) for k in input().split()]))
	z = min(x)
	a = 'YES'
	for j in x:
		if abs(j - z) <= 1:
			z = j
		else:
			a = 'NO'
			break
	print(a)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		odd = even = 0
		solution = False
		for i in a:
			if i % 2 != 0:
				odd += 1
			else:
				even += 1
			if odd >= 1 and even >= 1:
				solution = True
				break
		if solution:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	flag = False
	a = list(map(int, input().split()))
	soma = sum(a)
	if soma % 2 == 1:
		print('YES')
		continue
	for i in range(n):
		for j in range(i + 1, n):
			if (soma - a[i] + a[j]) % 2 == 1 or soma - a[j] + a[i] % 2 == 1:
				print('YES')
				flag = True
				break
		if flag:
			break
	if not flag:
		print('NO')


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


for i in range(0, int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	a = 'YES'
	l = sorted(l)
	for i in range(0, n - 1):
		if not abs(l[i] - l[i + 1]) <= 1:
			a = 'NO'
			break
	print(a)


import sys
input = sys.stdin.readline
scan_int = lambda : int(input())
scan_string = lambda : input()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

def solve():
	n = scan_int()
	even = 0
	odd = 0
	a = read_list()
	for x in a:
		if x % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == n or (odd == n and odd % 2 == 0):
		print('NO')
	else:
		print('YES')
for _ in range(int(input())):
	solve()


def array(arr, struc):
	return list(map(struc, arr.split()))
n = int(input())
for i in range(n):
	lena = int(input())
	arr = array(input(), int)
	counter = 0
	arr.sort()
	for j in range(lena - 1):
		if abs(arr[j] - arr[j + 1]) > 1:
			counter = 1
	if counter == 0:
		print('YES')
	else:
		print('NO')


try:
	t = int(input())
	for i1 in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		x = 0
		for i in range(n - 1):
			if a[i + 1] <= a[i] + 1:
				x = 0
			else:
				x = 1
				break
		if x == 0:
			print('YES')
		else:
			print('NO')
except:
	pass


q = int(input())
for i in range(q):
	nch = 0
	n = int(input())
	m = list(map(int, input().split()))
	for j in range(n):
		if m[j] % 2 == 1:
			nch += 1
	if nch != 0 and (nch % 2 == 1 or (nch % 2 == 0 and nch != n)):
		print('YES')
	else:
		print('NO')


import sys

def solution(n, arr):
	if sum(arr) % 2 == 1:
		print('YES')
		return
	(eve, odd) = (False, False)
	for x in arr:
		if x % 2 == 0:
			eve = True
		else:
			odd = True
	if eve and odd:
		print('YES')
		return
	print('NO')
for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	solution(n, arr)


t = int(input())
for i in range(t):
	n = int(input())
	lst = [int(i) for i in input().split()]
	lst.sort()
	valid = True
	for i in range(len(lst) - 1):
		if lst[i + 1] - lst[i] > 1:
			valid = False
	if valid:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	a = int(input())
	n = 0
	m = 0
	b = list(map(int, input().split()))
	for i in b:
		if i % 2 == 1:
			n += 1
		else:
			m += 1
	print('YNEOS'[not (n > 0 and m > 0 or n % 2 == 1)::2])


ITR = int(input())
for itr in range(ITR):
	N = int(input())
	li = [int(x) for x in input().split(' ')]
	hasEven = 0
	hasOdd = 0
	for i in li:
		if i % 2 == 0:
			hasEven += 1
		else:
			hasOdd += 1
		if hasEven > 0 and hasOdd > 0:
			break
	if hasEven > 0 and hasOdd > 0:
		print('YES')
	elif hasEven > 0:
		print('NO')
	elif hasOdd % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
results = []
for i in range(t):
	n = int(input())
	a = input().split()
	a = [int(i) for i in a]
	a.sort()
	while a:
		if len(a) == 1:
			results.append('YES')
			break
		mine = a[0]
		nextn = a[1]
		if nextn - mine <= 1:
			if mine < nextn:
				a.pop(0)
			else:
				a.pop(1)
		else:
			results.append('NO')
			break
for every in results:
	print(every)


n = int(input())
while n > 0:
	t = int(input())
	flag = 0
	arr = input().split(' ')
	arr2 = list(map(int, arr))
	arr2.sort()
	for i in range(1, len(arr2)):
		if abs(arr2[i] - arr2[i - 1]) > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')
	n -= 1


def f():
	s = list(map(int, input().split(' ')))
	a = sum(s)
	if a % 2 != 0:
		return 'YES'
	else:
		odd = 0
		even = 0
		for i in s:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd > 0 and even > 0:
			return 'YES'
	return 'NO'
n = int(input())
for i in range(n):
	x = int(input())
	print(f())


I = input
for _ in [0] * int(I()):
	n = int(I())
	o = sum((int(x) % 2 for x in I().split()))
	print('NYOE S'[0 < o < n + n % 2::2])


from sys import stdin

def readline():
	return stdin.readline()
tests = int(readline())

def solve(n, a):
	a.sort()
	ans = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ans = 'NO'
			break
	return ans
for t in range(0, tests):
	n = int(readline().rstrip('\n'))
	a = list(map(int, readline().rstrip('\n').split(' ')))
	print(solve(n, a))


t = int(input())
for i in range(t):
	n = int(input())
	arr = input()
	arr = arr.split(' ')
	arr = [int(x) for x in arr]
	flag = 0
	arr.sort()
	for i in range(n - 1):
		diff = abs(arr[i] - arr[i + 1])
		if diff > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


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

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

def mi():
	return map(int, input().split())
for _ in range(ii()):
	n = ii()
	lst = ai()
	(e_p, o_p) = (False, False)
	s = 0
	for ele in lst:
		s += ele
		if ele % 2:
			o_p = True
		else:
			e_p = True
	if s % 2 or (o_p and e_p):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	co = 0
	ce = 0
	for i in arr:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	if ce == 0 and co % 2 == 0 or co == 0:
		print('NO')
	else:
		print('YES')


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


def remove_smallest(arr):
	idx_set = set()
	for (idx, val) in enumerate(arr):
		if val in idx_set:
			arr[idx] = -1
		else:
			idx_set.add(val)
	if len(idx_set) == 1:
		return True
	n_elems = 0
	for i in range(len(arr)):
		if arr[i] == -1:
			continue
		if arr[i] + 1 in idx_set:
			idx_set.remove(arr[i] + 1)
		else:
			n_elems += 1
		if n_elems > 1:
			return False
	return n_elems <= 1
for i in range(int(input())):
	input()
	res = remove_smallest([int(e) for e in input().split()])
	print('YES' if res else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	j = 0
	k = 1
	while j < n:
		while k < n:
			if abs(a[j] - a[k]) <= 1:
				if a[j] == min(a[j], a[k]):
					del a[j]
				else:
					del a[k]
				n -= 1
			else:
				k += 1
		j += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	temp = arr.copy()
	for i in range(0, n - 1):
		if abs(arr[i] - arr[i + 1]) <= 1:
			temp.remove(arr[i])
	if len(temp) == 1:
		print('YES')
	else:
		print('NO')


def fun(n, arr):
	n -= 1
	i = 0
	j = 1
	cnt = 0
	while n > 0:
		if abs(arr[i] - arr[j]) < 2:
			cnt += 1
		i += 1
		j += 1
		n -= 1
	return cnt

def main():
	t = int(input())
	while t > 0:
		n = int(input())
		arr = [int(x) for x in input().split()]
		arr.sort()
		if n == 1:
			print('YES\n')
			t -= 1
			continue
		cnt = fun(n, arr)
		if n - cnt == 1:
			print('YES\n')
		else:
			print('NO\n')
		t -= 1
main()


z = input
for _ in range(int(z())):
	x = int(z())
	l = list(map(int, z().split()))
	ne = []
	no = []
	t = sum(l)
	if t % 2 != 0:
		print('YES')
		continue
	e = 0
	o = 0
	for i in l:
		if i % 2 == 0 and i not in ne:
			ne.append(i)
			e += 1
		if i % 2 != 0 and i not in no:
			no.append(i)
			o += 1
	if e >= 1 and o >= 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	for x in range(n - 1):
		if l[x + 1] - l[x] <= 1:
			l[x] = -1
	if n - l.count(-1) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	y = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			print('No')
			y = False
			break
	if y:
		print('Yes')


t = int(input())
while t:
	ls = []
	n = int(input())
	for x in map(int, input().split()):
		ls.append(x)
	ls.sort()
	for i in range(n - 1):
		if ls[i + 1] - ls[i] <= 1:
			n -= 1
	if n == 1:
		print('Yes')
	else:
		print('No')
	t -= 1


def diff1(arr, n):
	if n == 1:
		return 'YES'
	temp = abs(arr[0] - arr[1])
	templst = arr[:]
	for i in range(n - 1):
		diff = arr[i + 1] - arr[i]
		if diff > 1:
			return 'NO'
		else:
			x = templst.pop(0)
	if len(templst) == 1:
		return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	print(diff1(arr, n))


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(sys.stdin.readline())
	list_num = list(map(int, sys.stdin.readline().split()))
	check = [0, 0]
	for num in list_num:
		check[num % 2] += 1
	if check[1] and (not check[1] % 2) and check[0]:
		check[1] += 1
	if check[1] % 2:
		print('YES')
	else:
		print('NO')


def num():
	return int(input())

def line():
	return map(int, input().split())
from itertools import repeat
t = num()
for _ in repeat(None, t):
	n = num()
	ass = sorted(set(line()))
	if len(ass) < 2:
		print('YES')
		continue
	for i in range(1, len(ass)):
		if ass[i - 1] + 1 != ass[i]:
			break
	else:
		print('YES')
		continue
	print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	p1 = 0
	p2 = 1
	r = 1
	for i in range(n - 1):
		if l[p2] - l[p1] <= 1:
			l.remove(l[p1])
			r += 1
			p1 = 0
			p2 = 1
		else:
			p1 += 1
			p2 += 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


for s in [*open(0)][2::2]:
	a = {*map(int, s.split())}
	print(['YES', 'NO'][len(a) <= max(a) - min(a)])


cases = int(input(''))
list = []
outputlist = []
for case in range(cases):
	arraysize = int(input(''))
	integers = input('').split()
	if arraysize == 1:
		outputlist.append('YES')
	for integer in range(arraysize):
		list.append(int(integers[integer]))
	list.sort()
	for integer in range(arraysize - 1):
		if abs(list[integer] - list[integer + 1]) <= 1:
			if integer == arraysize - 2:
				outputlist.append('YES')
				list = []
		else:
			outputlist.append('NO')
			list = []
			break
print(*outputlist, sep='\n')


import sys
from math import sqrt
from collections import defaultdict
inpt = sys.stdin.readline

def inp():
	return int(inpt())

def inlist():
	return list(map(int, inpt().split()))

def instr():
	s = inpt()
	return list(s[:len(s) - 1])

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

class Graph:

	def __init__(self, n):
		self.n = n
		self.graph = defaultdict(list)
		self.marked = defaultdict(int)

	def addEdge(self, u, v):
		self.graph[u].append(v)
		self.graph[v].append(u)

	def dfs(self, u):
		self.marked[u] = 1
		for i in self.graph[u]:
			if self.marked[i] == 0:
				self.dfs(i)

def main():
	t = inp()
	for f in range(t):
		n = inp()
		a = inlist()
		a = sorted(a)
		t = True
		for i in range(1, n, 1):
			if a[i] - a[i - 1] > 1:
				t = False
				break
		if t:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	p = a[0]
	for x in a:
		if x - p > 1:
			print('NO')
			break
		p = x
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	xx = 1
	for i in range(n - 1):
		xx &= abs(l[i] - l[i + 1]) <= 1
	if xx:
		print('YES')
	else:
		print('NO')


t = int(input())
for z in range(t):
	n = int(input())
	odd = 0
	even = 0
	arr = [int(i) for i in input().split(' ')]
	for i in range(n):
		check = arr[i]
		if check % 2 == 0:
			even += 1
		else:
			odd += 1
	if n % 2 == 0:
		if even == n or odd == n:
			print('NO')
		else:
			print('YES')
	elif even == n:
		print('NO')
	else:
		print('YES')


def main():
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('YES')
		return
	(odd, even) = (False, False)
	for i in range(n):
		if arr[i] % 2:
			odd = True
		else:
			even = True
	if odd and even:
		print('YES')
		return
	print('NO')
for _ in range(int(input())):
	main()


t = int(input())
anss = [''] * t
for i in range(t):
	n = int(input())
	a = list(map(lambda o: int(o) % 2, input().split()))
	if sum(a) % 2 == 1:
		anss[i] = 'YES'
	elif a.count(0) and a.count(1):
		anss[i] = 'YES'
	else:
		anss[i] = 'NO'
for ans in anss:
	print(ans)


import math
t = int(input())

def good(a):
	for x in range(1, len(a)):
		a = sorted(a)
		if abs(a[x] - a[x - 1]) <= 1:
			pass
		else:
			return False
	return True
while t > 0:
	n = int(input())
	arr = [int(x) for x in input().split()]
	print('YES' if good(arr) else 'NO')
	t -= 1


def solve(a, n):
	cnt_odd = 0
	cnt_even = 0
	for x in a:
		if x % 2 == 0:
			cnt_even += 1
		else:
			cnt_odd += 1
	if cnt_odd == 0:
		return False
	if cnt_even == 0 and n % 2 == 0:
		return False
	return True
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if solve(a, n):
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

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

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

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

def solve():
	n = get_int()
	ls = get_list()
	ls.sort()
	for (i, v) in enumerate(ls[1:], 1):
		if abs(v - ls[i - 1]) > 1:
			return 'NO'
	return 'YES'

def main():
	print(solve())
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = True
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			flag = False
			break
	if flag or n == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	l = []
	n = int(input())
	a = list(map(int, input().rstrip().rsplit()))
	a.sort()
	d = {a[i]: a[i + 1] - a[i] for i in range(n - 1)}
	l = [i <= 1 for i in d.values()]
	if all(l):
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(t):
	n = int(input())
	liste = list(input().split())
	sliste = sorted(liste)
	tal = [int(s) for s in sliste]
	mtal = set(tal)
	if max(mtal) - min(mtal) < len(mtal):
		print('YES')
	else:
		print('NO')


import sys

def remove_smallest(arr):
	min_element = None
	max_element = None
	hset = set()
	tot_sum = 0
	for x in arr:
		if min_element is None:
			min_element = x
		else:
			min_element = min(min_element, x)
		if max_element is None:
			max_element = x
		else:
			max_element = max(max_element, x)
		if x not in hset:
			hset.add(x)
			tot_sum += x
	tot_uniq_n_sum = (max_element * (max_element + 1) - (min_element - 1) * min_element) / 2
	if tot_sum == tot_uniq_n_sum:
		return 'YES'
	else:
		return 'NO'
t = int(sys.stdin.readline().rstrip())
sol = []
for i in range(t):
	n = int(sys.stdin.readline().rstrip())
	arr = [int(x) for x in sys.stdin.readline().rstrip().split(' ')]
	sol.append(remove_smallest(arr))
for s in sol:
	print(s)


final = []
for i in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	flag = 0
	for j in range(len(l) - 1):
		if l[j + 1] - l[j] >= 2:
			final.append('NO')
			break
		else:
			flag += 1
	if flag == len(l) - 1:
		final.append('YES')
for i in range(len(final)):
	print(final[i])


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	ok = False
	a.sort()
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			print('NO')
			ok = True
			break
	if not ok:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [*map(int, input().split())]
	res = False
	if n == 1:
		print('YES')
		continue
	arr = list(set(arr))
	arr.sort()
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			res = True
			break
	if res == False:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))[:n]
	a = [i % 2 for i in s]
	if sum(s) % 2 != 0:
		print('YES')
	elif a.count(1) == len(a) or a.count(0) == len(a):
		print('NO')
	elif s.count(s[0]) == len(s):
		print('NO')
	elif a.count(1) > 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	res = 'YES'
	length = int(input())
	seq = [int(i) for i in input().split(' ')]
	seq.sort()
	for j in range(length - 1):
		if seq[1] - seq[0] <= 1:
			seq.pop(0)
	if len(seq) > 1:
		res = 'NO'
	print(res)


T = int(input())
while T:
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	F = 'YES'
	for i in range(n - 1):
		if abs(A[i + 1] - A[i]) > 1:
			F = 'NO'
	print(F)
	T = T - 1


t = int(input())
while t:
	f = 0
	s = 0
	n = int(input())
	l = list(map(int, input().split()))
	for i in l:
		if i % 2 != 0:
			f = f + 1
		s = s + i
	if s % 2 != 0:
		print('YES')
	elif f == n or f == 0:
		print('NO')
	else:
		print('YES')
	t -= 1


import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = inp()
while t > 0:
	n = inp()
	a = inlt()
	a.sort()
	flag = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = 'NO'
			break
	print(flag)
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr = sorted(arr)
	flag = False
	for i in range(1, n):
		if arr[i] - arr[i - 1] >= 2:
			print('NO')
			flag = True
			break
	if flag == False:
		print('YES')


for t in range(int(input())):
	n = int(input())
	a = sorted([*map(int, input().split())])
	da = [a[i] - a[i - 1] for i in range(1, n)]
	if da.count(1) + da.count(0) != n:
		print(['NO', 'YES'][da.count(1) + da.count(0) == n - 1])


t = int(input())
for q in range(t):
	n = int(input())
	odd = 0
	a = [int(i) for i in input().strip().split(' ')]
	for i in a:
		if i % 2 != 0:
			odd += 1
	even = n - odd
	if even == n:
		print('NO')
	elif (n % 2 == 0) & (odd == n):
		print('NO')
	else:
		print('YES')


def judge(a) -> str:
	length = len(a)
	max_num = max(a)
	min_num = min(a)
	ll = []
	if length == 1:
		return 'YES'
	else:
		for i in range(min_num + 1, max_num):
			if i in a:
				ll.append(1)
			else:
				ll.append(0)
		if 0 in ll:
			return 'NO'
		else:
			return 'YES'

def main():
	numbers = []
	times = int(input())
	for i in range(times):
		cap = int(input())
		new_arr = input().split()
		for counter in range(0, cap):
			new_arr[counter] = int(new_arr[counter])
		numbers.append(new_arr)
	for arr in numbers:
		print(judge(arr))
main()


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

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

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

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

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

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	n = INT()
	a = LIST()
	a.sort()
	flag = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = input()
	a = a.split()
	map_object = map(int, a)
	a = list(map_object)
	a.sort()
	v1 = a[0]
	YESS = True
	for j in range(1, len(a)):
		v2 = a[j]
		if v1 - v2 > 1 or v2 - v1 > 1:
			YESS = False
			break
		v1 = v2
	if YESS == True:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	ans = 'YES'
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			ans = 'NO'
			break
	print(ans)


a = int(input())
for i in range(a):
	b = int(input())
	c = sorted(list(map(int, input().split())))
	d = 0
	if b == 1:
		print('YES')
	else:
		for j in range(b - 1):
			if abs(c[j] - c[j + 1]) == 0 or abs(c[j] - c[j + 1]) == 1:
				d += 1
		if d == b - 1:
			print('YES')
		else:
			print('NO')


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
while t:
	t -= 1
	(n,) = I()
	a = [i % 2 for i in I()]
	ones = a.count(1)
	zero = n - ones
	ans = 'NO'
	if ones and zero or (ones == n and n % 2):
		ans = 'YES'
	print(ans)


for _ in range(int(input())):
	n = map(int, input())
	arr = sorted(list(map(int, input().split())))
	l = [0] * len(arr)
	flag = False
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] <= 1:
			if arr[i] < arr[i - 1]:
				l[i] = 1
			else:
				l[i - 1] = 1
	print('Yes') if l.count(0) == 1 else print('No')


t = int(input())
for i in range(t):
	n = int(input())
	odd = False
	even = False
	even_elements = n % 2 == 0
	data = [int(tmp) for tmp in input().split()]
	for x in data:
		if x % 2 == 0:
			even = True
		else:
			odd = True
	if not even_elements:
		print('YES') if odd else print('NO')
	else:
		print('YES') if odd and even else print('NO')


def possible(nums):
	if len(nums) == 1:
		return True
	if len(nums) == 2:
		return abs(nums[1] - nums[0]) <= 1
	nums.sort()
	for k in range(len(nums) - 1):
		if abs(nums[k] - nums[k + 1]) > 1:
			return False
	return True
t = int(input())
for k in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	if possible(nums):
		print('YES')
	else:
		print('NO')


b = int(input())
for _ in range(b):
	a = int(input())
	c = list(map(int, input().split()))
	c.sort()
	q = 0
	for j in range(a - 1):
		if c[j + 1] - c[j] > 1:
			q += 1
	if q >= 1:
		print('NO')
	else:
		print('YES')
	c = ()


n = int(input())
for i in range(n):
	m = int(input())
	arr = sorted(list(map(int, input().split())))
	yes = True
	for j in range(1, m):
		if arr[j] - arr[j - 1] > 1:
			yes = False
	if yes == True:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	t = int(input())
	s = 0
	odd = 0
	even = 0
	x = list(map(int, input().split()))
	s = sum(x)
	for k in x:
		if k % 2 == 1:
			odd += 1
		else:
			even += 1
	if s % 2 == 1 or (odd != 0 and even != 0):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	x = 0
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(l[i] - l[i + 1]) > 1:
				x = 1
				break
		if x:
			print('NO')
		else:
			print('YES')


t = int(input())
out = []
for i in range(t):
	length = int(input())
	arr = input().split(' ')
	arr = [int(i) for i in arr]
	if sum(arr) % 2 != 0:
		out.append('YES')
	else:
		odd = 0
		for i in arr:
			if i % 2 != 0:
				odd += 1
		if odd % 2 == 0 and odd != length and (odd != 0):
			out.append('YES')
		else:
			out.append('NO')
for i in out:
	print(i)


def solve(arr, n):
	arr.sort(reverse=True)
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) > 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	print(solve(arr, n))


def remove(a):
	stack = []
	for val in a:
		stack.append(val)
		if len(stack) >= 2:
			(val1, val2) = (stack[-1], stack[-2])
			if abs(val1 - val2) <= 1:
				stack.pop()
				stack.pop()
				stack.append(val)
	return stack
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	result = remove(a)
	if len(result) == 1:
		print('YES')
	else:
		print('NO')


test_case = int(input())
for _ in range(test_case):
	n = int(input())
	a = sorted(map(int, input().split()))
	diff_sum = sum([a[i + 1] - a[i] <= 1 for i in range(n - 1)])
	print('YES' if diff_sum == n - 1 or n == 1 else 'NO')


t = int(input())
for item in range(t):
	odd = 0
	even = 0
	n = int(input())
	lo = input()
	li = lo.split(' ')
	for x in range(n):
		li[x] = int(li[x])
	for numbers in li:
		if numbers % 2 != 0:
			odd += 1
		else:
			even += 1
	if odd % 2 != 0 or (even >= 1 and odd != 0):
		print('YES')
	else:
		print('NO')


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = [int(x) for x in stdin.readline().split()]
	(even, odd) = (False, False)
	for i in arr:
		if i % 2 == 0:
			even = True
		else:
			odd = True
	if n % 2 == 0:
		if odd and even:
			print('YES')
		else:
			print('NO')
	elif odd:
		print('YES')
	else:
		print('NO')


def rua():
	n = int(input())
	num = int(0)
	l = list(map(int, input().split()))
	for x in l:
		if x % 2 == 1:
			num = num + 1
	if num % 2 == 1:
		return 1
	if num < n and num > 0:
		return 1
	return 0
t = int(input())
while t:
	if rua() == 1:
		print('YES')
	else:
		print('NO')
	t = t - 1


import sys
input = sys.stdin.readline
print = sys.stdout.write

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

def check(Array):
	for cur in range(1, len(Array)):
		if Array[cur] - Array[cur - 1] > 1:
			return False
	return True
for NaN in range(int(input())):
	input()
	print('YES\n' if check(sorted(getArr())) else 'NO\n')


def analyzeArray(arr):
	if len(arr) == 1:
		return 'YES'
	for j in range(len(arr) - 1):
		if abs(arr[j] - arr[j + 1]) > 1:
			return 'NO'
	return 'YES'
count = int(input())
for i in range(count):
	с = input()
	arr = sorted(list(map(int, input().split())))
	print(analyzeArray(arr))


def find_other(first, rest):
	for x in rest:
		if first % 2 == 0:
			if x % 2 == 1:
				return True
		elif x % 2 == 0:
			return True
	return False

def solve(size, arr):
	t = sum(arr)
	if t % 2 == 1:
		print('YES')
		return
	else:
		if size == 1:
			print('NO')
			return
		ret = find_other(arr[0], arr[1:])
		if ret:
			print('YES')
		else:
			print('NO')

def main():
	N = int(input())
	for _ in range(N):
		size = int(input())
		arr = list(map(int, input().split()))
		solve(size, arr)
main()


tc = int(input())
while tc > 0:
	n = int(input())
	numbers = map(int, input().split())
	sorted_numbers = sorted(numbers)
	flag = 0
	for i in range(len(sorted_numbers) - 1):
		if abs(sorted_numbers[i] - sorted_numbers[i + 1]) < 2:
			continue
		else:
			flag = 1
			break
	if flag:
		print('NO')
	else:
		print('YES')
	tc = tc - 1


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	input()
	(*a,) = map(int, input().split())
	freq = [False] * 101
	for i in a:
		freq[i] = True
	flag = True
	for i in range(min(a), max(a) + 1):
		if not freq[i]:
			flag = False
			break
	print('YES' if flag else 'NO')


_ = int(input())
result = []
for i in range(_):
	n = int(input())
	a = list(map(int, input().split(' ')))
	a.sort()
	while n >= 0:
		if n > 1:
			if a[0] <= a[1]:
				if abs(a[0] - a[1]) == 1 or abs(a[0] - a[1]) == 0:
					a.pop(0)
		n -= 1
	if len(a) > 1:
		result.append('NO')
	elif len(a) == 1:
		result.append('YES')
for i in result:
	print(i)


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	s = 0
	ce = 0
	co = 0
	for j in b:
		if j % 2 == 0:
			ce += 1
		if j % 2 == 1:
			co += 1
		s += j
	if s % 2 == 1 or s == 1:
		print('YES')
	if s % 2 == 0 and ce != 0 and (co != 0):
		print('YES')
	if s % 2 == 0 and ce == a:
		print('NO')
	if s % 2 == 0 and co == a:
		print('NO')


def stdin(t):
	for _ in range(t):
		n = int(input())
		m = sorted([int(x) for x in input().split()][:n])
		print(main(m, n))

def main(obj, n):
	idx = 1
	while idx < n:
		if obj[idx] - obj[idx - 1] <= 1:
			obj.pop(idx - 1)
			n -= 1
		else:
			return 'NO'
	return 'YES'
stdin(int(input()))


n = int(input())
for i in range(n):
	l = int(input())
	m = list(map(int, input().split()))
	lol = list()
	for k in range(l):
		if m[k] % 2 == 0:
			lol.append(0)
		elif m[k] % 2 == 1:
			lol.append(1)
	if 1 in lol and 0 in lol:
		print('YES')
	elif l % 2 == 1:
		notfunny = list()
		for j in range(l):
			if m[j] % 2 == 0:
				notfunny.append('bad')
		if 'bad' in notfunny:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


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

def num():
	return int(input())
from itertools import repeat
t = num()
for _ in repeat(None, t):
	n = num()
	a = list(line())
	q = a[0] % 2
	if any((w % 2 != q for w in a[1:])) or sum(a) % 2:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	temp = 0
	for i in range(1, len(A)):
		if A[i] - A[i - 1] > 1:
			temp = 1
			break
	if temp:
		print('NO')
	else:
		print('YES')


d = {}

def cleard():
	for i in range(1, 101):
		d[i] = False

def f(a):
	for i in a:
		d[i] = True
	c = 0
	for i in range(1, 100):
		if d[i] != d[i + 1]:
			c += 1
	if c <= 2:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	input()
	a = map(int, input().split())
	cleard()
	f(a)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import deque
from heapq import heappush, heappop
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
t = ip()
for _ in range(t):
	n = ip()
	arr = list(inp())
	arr.sort()
	while True:
		if len(arr) == 1:
			flag = True
			break
		elif arr[0] == arr[1]:
			del arr[0]
		elif arr[0] + 1 == arr[1]:
			del arr[0]
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	list1 = list(map(int, input().strip().split()))
	list1.sort()
	ans = 1
	for i in range(n - 1):
		if list1[i + 1] - list1[i] > 1:
			ans = 0
			break
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	Case = False
	ar = list(sorted(map(int, input().rstrip().split(' '))))
	Case = 'YES'
	for i in range(n - 1):
		if abs(ar[i] - ar[i + 1]) > 1:
			Case = 'NO'
			break
	print(Case)


m = int(input())
for i in range(m):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		e = 0
		for j in a:
			if j % 2 == 1:
				e += 1
		if e > 0 and e < n:
			print('YES')
		else:
			print('NO')


import sys
n = int(input())

def count_check(e):
	q = len([e[i] for i in range(len(e)) if e[i] % 2 == 1])
	return q
for _ in range(n):
	a = int(input())
	c = list(map(int, input().split()))
	if sum(c) % 2 == 1:
		if count_check(c) > 0 and a - count_check(c) > 0 or count_check(c) == a:
			print('YES')
		else:
			print('NO')
	elif count_check(c) > 0 and a - count_check(c) > 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = int(input())
	j = 0
	t = 0
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		for i in range(len(l)):
			if l[i] % 2 == 0:
				t += 1
			else:
				j += 1
		if j >= 1 and t >= 1:
			print('YES')
		else:
			print('NO')


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


def isodd(n):
	if n % 2 != 0:
		return True
	else:
		return False
x = int(input())
input_storage = []
for i in range(x):
	si = input()
	listentered = input()
	input_storage.append(listentered)
for i in input_storage:
	new = list()
	x = i.split()
	for i in x:
		count = 0
		num = int(i)
		new.append(num)
	if isodd(sum(new)):
		print('YES')
	else:
		count_odd = 0
		count_even = 0
		for i in new:
			if isodd(i):
				count_odd += 1
			else:
				count_even += 1
		if count_odd > 0 and count_even > 0:
			print('YES')
		else:
			print('No')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = sum(a)
	if s % 2 != 0:
		print('YES')
	else:
		t = list(filter(lambda x: x % 2 == 0, a))
		if 0 < len(t) < n:
			print('Yes')
		else:
			print('NO')


def main():
	n = int(input())
	a = [int(s) for s in input().split()]
	chet = 0
	nechet = 0
	for i in a:
		if i % 2 == 0:
			chet += 1
		else:
			nechet += 1
	if nechet % 2 != 0:
		return 'YES'
	elif n == nechet and n % 2 == 0 or chet == n:
		return 'NO'
	else:
		return 'YES'
t = int(input())
for i in range(t):
	print(main())


def fon(liste):
	odd = 0
	even = 0
	for i in liste:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if sum(s) % 2 != 0:
		return 'YES'
	elif even and odd > 0:
		return 'YES'
	else:
		return 'NO'
n = int(input())
for i in range(n):
	n = input()
	s = [int(i) for i in input().split()]
	print(fon(s))


for i in range(int(input())):
	inp = int(input())
	list_n = list(map(int, input().split(' ')))
	flag = 0
	l = min(list_n)
	list_n = list(set(list_n))
	if len(list_n) == 1:
		print('YES')
	elif list_n.count(l) == len(list_n):
		print('YES')
	else:
		for j in range(len(list_n)):
			if l in list_n:
				l = l + 1
				continue
			else:
				print('NO')
				flag = 1
				break
		if flag == 0:
			print('YES')


def saurabh(a, n):
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'
for i in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()][:n]
	print(saurabh(a, n))


T = int(input())
for i in range(T):
	N = int(input())
	lst = list(map(int, input().split()))
	if N == 1:
		print('YES')
	else:
		flag = 0
		lst.sort()
		for j in range(len(lst) - 1):
			if abs(lst[j] - lst[j + 1]) > 1:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')


T = int(input())
for t in range(1, T + 1):
	N = int(input())
	lst = input().split()
	for i in range(N):
		lst[i] = int(lst[i])
	lst.sort()
	for i in range(N):
		for j in range(N - 1):
			if abs(lst[j + 1] - lst[j]) <= 1:
				lst.remove(lst[j])
				N -= 1
				break
	if N == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	c = False
	a.sort()
	for i in range(1, n):
		if abs(a[i - 1] - a[i]) > 1:
			print('NO')
			c = True
			break
	if not c:
		print('YES')


T = int(input())
for _ in range(T):
	n = int(input())
	flag = 0
	a = list(map(int, input().split()))
	a.sort()
	if n > 1:
		for i in range(1, n):
			if abs(a[i] - a[i - 1]) > 1:
				flag = 1
				break
	if flag == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().strip().split(' ')))
	li = []
	a.sort()
	for i in range(1, n):
		li.append(a[i] - a[i - 1])
	if all((v <= 1 for v in li)):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = sorted([int(i) for i in input().split()])
	check = 1
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			check = 0
			break
	print(['NO', 'YES'][check])


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	q = min(a)
	w = max(a)
	flag = True
	for i in range(q, w + 1):
		if i not in a:
			flag = False
	if flag == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	[odd, even, s] = [0] * 3
	for i in arr:
		s += i
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if s % 2 != 0 or (odd > 0 and even > 0):
		print('YES')
	else:
		print('NO')


a = int(input())
for x in range(a):
	n = input()
	n = [int(x) for x in input().split(' ')]
	n.sort()
	for y in range(len(n)):
		try:
			if abs(n[y] - n[y + 1]) <= 1:
				if n[y] > n[y + 1]:
					(n[y], n[y + 1]) = (n[y + 1], n[y])
				continue
			print('NO')
			break
		except:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	b = [0] * max(a)
	for i in range(n):
		b[a[i] - 1] += 1
	flag = True
	for i in range(max(a)):
		if b[i] == 0 and sum(b[:i]) > 0:
			flag = False
	if len(set(a)) == 1:
		flag = True
	if n == 1:
		flag = True
	print('YES' if flag else 'NO')


for i in range(int(input())):
	a = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		print('YES')
	else:
		(even_count, odd_count) = (0, 0)
		for i in arr:
			if i % 2 == 0:
				even_count += 1
			else:
				odd_count += 1
		if even_count == 0 or odd_count == 0:
			print('NO')
		else:
			print('YES')


import math
q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	flag = 0
	for i in range(n):
		if a[i] % 2 != 0:
			flag = 1
			break
	flag2 = 0
	for i in range(n):
		if a[i] % 2 == 0:
			flag2 = 1
			break
	if flag == 1 and n % 2 == 1:
		print('YES')
	elif flag == 1 and n % 2 == 0 and (flag2 == 1):
		print('YES')
	else:
		print('NO')


def solve():
	b = int(input())
	c = list(map(int, input().split()))
	summa = 0
	c = sorted(c)
	for i in range(len(c) - 1):
		if c[i + 1] - c[i] > 1:
			summa += 1
			break
	if summa == 1:
		print('NO')
	else:
		print('YES')
a = int(input())
for i in range(a):
	solve()


kol = int(input())
for i in range(kol):
	n = int(input())
	string = sorted([int(i) for i in input().split()])
	kol = 0
	for i in range(len(string) - 1):
		if abs(string[i] - string[i + 1]) <= 1:
			kol += 1
	if n - kol == 1:
		print('YES')
	else:
		print('NO')


def ans(a, n):
	if n == 1:
		return 'YES'
	a.sort()
	i = 0
	j = 1
	count = 0
	max_diff = -1
	while j < len(a):
		diff = a[j] - a[i]
		if diff > max_diff:
			max_diff = diff
		i += 1
		j += 1
	if max_diff > 1:
		return 'NO'
	return 'YES'
m = int(input())
for i in range(m):
	n = int(input())
	arr = input().split()
	a = []
	for i in arr:
		a.append(int(i))
	print(ans(a, n))


t = int(input())
from collections import Counter

def check(c):
	left = 0
	for k in c:
		if not left:
			if c[k + 1] == 0:
				left += 1
		elif c[k + 1] == 0:
			return False
	return True
for _ in range(t):
	n = int(input())
	arr = map(int, input().split())
	c = Counter(arr)
	if check(c):
		print('YES')
	else:
		print('NO')


s = -1
k = -1

def perform(n):
	if s == 0 and k == 0:
		print('YES')
	elif s == -1 and k == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')
t = int(input())
for i in range(0, t):
	n = int(input())
	li = []
	s = -1
	k = -1
	li = input().split()
	for m in li:
		if int(m) % 2 == 0:
			s = 0
		else:
			k = 0
	perform(n)


for _ in range(int(input())):
	input()
	lis = [*map(int, input().split())]
	lis.sort()
	yes = True
	key = lis[0]
	for i in range(1, len(lis)):
		if lis[i] - key <= 1:
			key = lis[i]
		else:
			yes = False
			break
	print('YES' if yes else 'NO')


t = int(input())
for x in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = []
	l.sort()
	for i in range(n - 1):
		c = min(l[i], l[i + 1])
		if abs(l[i] - l[i + 1]) <= 1:
			ans.append(c)
	if len(l) - len(ans) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted([int(x) for x in input().split()])
	f = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import bisect
n = int(stdin.readline())
for i in range(n):
	a = int(stdin.readline())
	lst = [int(i) for i in stdin.readline().split()]
	lst.sort()
	ans = 'YES'
	temp = lst[0]
	for i in lst[1:]:
		if i - temp > 1:
			ans = 'NO'
			break
		temp = i
	stdout.write(str(ans) + '\n')


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		A = list(map(int, input().split()))
		A.sort()
		for i in range(N - 1):
			if A[i + 1] - A[i] > 1:
				print('NO')
				break
		else:
			print('YES')
main()


t = int(input())
for k in range(t):
	p = 0
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			p += 1
		else:
			break
	if p == n - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
i = 0
while i < t:
	n = int(input())
	a = list(map(int, input().split()))
	j = 0
	k = []
	for s in a:
		if s % 2 != 0:
			k.append(s)
	if len(a) == len(k) and len(k) % 2 == 0 and (len(k) != 0):
		print('NO')
	elif len(a) > len(k) and len(k) != 0:
		print('YES')
	elif len(k) == len(a) and len(k) % 2 != 0:
		print('YES')
	elif len(k) == 0:
		print('NO')
	i += 1


for _ in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	if n <= 1:
		print('YES')
		continue
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


tc = int(input())
for i in range(tc):
	size = int(input())
	odd_count = 0
	even_count = 0
	num_arr = list(map(int, input().strip().split()))[:size]
	for num in num_arr:
		if num % 2 != 0:
			odd_count += 1
		else:
			even_count += 1
	sum_arr = sum(num_arr)
	if sum_arr % 2 != 0:
		print('YES')
	elif odd_count != 0 and even_count != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	q = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			q = 0
			ans.append('NO')
			break
	if q == 1:
		ans.append('YES')
		m = min(a)
for i in ans:
	print(i)


def is_possible(number_list):
	for index in range(0, len(number_list) - 1):
		if abs(number_list[index] - number_list[index + 1]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
while t > 0:
	n = int(input())
	numbers = []
	arr = input().split()
	for i in range(0, n):
		numbers.append(int(arr[i]))
	numbers.sort()
	print(is_possible(numbers))
	t -= 1


import sys
t = int(sys.stdin.readline().rstrip())
for _ in range(t):
	n = int(sys.stdin.readline().rstrip())
	s = set(map(int, sys.stdin.readline().rstrip().split(' ')))
	n_b = n % 2
	par = False
	impar = False
	if n_b == 0:
		for item in s:
			if item % 2 == 0:
				par = True
			else:
				impar = True
			if par and impar:
				print('YES')
				break
		else:
			print('NO')
	else:
		for item in s:
			if item % 2 == 1:
				print('YES')
				break
		else:
			print('NO')


n = int(input())
for i in range(n):
	k = int(input())
	l = list(map(int, input().split()))
	l.sort()
	bool = True
	for i in range(k - 1):
		if abs(l[i] - l[i + 1]) > 1:
			print('NO')
			bool = False
			break
	if bool:
		print('YES')


t = int(input())
while t:
	t -= 1
	m = int(input())
	lst = list(map(int, input().split(' ')))
	lst.sort()
	flag = False
	for i in range(len(lst) - 1):
		if lst[i + 1] - lst[i] > 1:
			flag = True
			break
	if flag == True:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	sum = 0
	count = 0
	for j in range(n):
		sum += l[j]
	if sum % 2 != 0:
		print('YES')
	else:
		for k in range(n - 1):
			for h in range(k + 1, n):
				if abs(l[k] - l[h]) % 2 != 0:
					count += 1
					break
		if count > 0:
			print('YES')
		else:
			print('NO')


from functools import reduce
t = int(input())
for i in range(t):
	d = int(input())
	string = input()
	s = string.split(' ')
	arr = list(map(lambda a: int(a), s))
	arr = list(filter(lambda a: a % 2 == 1, arr))
	if len(arr) == 0:
		print('No')
	elif len(arr) % 2 == 0:
		if len(arr) == len(s):
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


import itertools
t = int(input())
for l in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		b = [i for i in a if i % 2 != 0]
		if len(b) == len(a) or len(b) == 0:
			print('NO')
			continue
		else:
			print('YES')


def solve(arr, n) -> bool:
	arr.sort()
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			return False
	return True
num_test_cases = int(input())
res = []
while num_test_cases > 0:
	length = int(input())
	arr = input().split(' ')
	A = [int(n) for n in arr]
	res.append(solve(A, length))
	num_test_cases -= 1
for _bool in res:
	if _bool:
		print('YES')
	else:
		print('NO')


t = int(input())
for ii in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	valid = True
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			continue
		else:
			valid = False
	if valid:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	leng = int(input())
	l = list(map(int, input().strip().split()))
	l.sort()
	flag = 1
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] >= 2:
			flag = 0
	if flag == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	brr = list(map(int, input().strip().split()))
	brr.sort()
	x = 0
	while True:
		if x < len(brr) - 1 and brr[x + 1] - brr[x] <= 1 and (len(brr) > 1):
			brr.pop(x)
		else:
			break
	if len(brr) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
a = []
for i in range(t):
	noi = int(input())
	a = input().split()
	a = list(map(int, a))
	a.sort()
	for i in range(0, len(a) - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			break
	else:
		print('YES')


tcase = int(input())
for i in range(tcase):
	cnt_odd = 0
	cnt_even = 0
	alen = int(input())
	a = [int(x) for x in input().split(' ')]
	for item in a:
		if item % 2 == 1:
			cnt_odd += 1
		else:
			cnt_even += 1
	if cnt_even >= 1:
		if cnt_odd >= 1:
			print('YES')
		else:
			print('NO')
	elif cnt_odd % 2 == 1:
		print('YES')
	else:
		print('NO')


from math import *
from collections import *
from itertools import *
from functools import *
from bisect import *
from heapq import *
from operator import *
from sys import *
setrecursionlimit(100000000)
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	f = [1 if x & 1 else 0 for x in l]
	(c1, c0) = (f.count(1), f.count(0))
	if c0 == 0 and (not n & 1) or c1 == 0:
		print('NO')
	else:
		print('YES')


import collections
import itertools
import sys
from collections import defaultdict, Counter
from math import sqrt, ceil
input = sys.stdin.readline

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

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

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

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

def main():
	n = inp()
	for _ in range(n):
		r = inp()
		v = inlt()
		v.sort()
		res = [v[0]]
		for vv in v[1:]:
			if vv - res[-1] <= 1:
				res[-1] = vv
			else:
				res.append(vv)
		print('YES' if len(res) == 1 else 'NO')
main()


def f(a):
	b = []
	while len(a) > 0:
		m = min(a)
		while m in a:
			a.remove(m)
		b.append(m)
	for i in range(len(b)):
		if i + 1 > len(b) - 1:
			return 'YES'
		if abs(b[i + 1] - b[i]) > 1:
			return 'NO'
no_tests = int(input())
for i in range(no_tests):
	n = int(input())
	obj = input()
	astr = obj.split()
	a = []
	for k in range(len(astr)):
		a.append(int(astr[k]))
	print(f(a))


t = int(input())
c = 0
d = 0
for i in range(t):
	n = int(input())
	a = map(int, input().split())
	for s in a:
		if s % 2 != 0:
			c += 1
		else:
			d += 1
	if c == n and c % 2 != 0:
		print('YES')
	elif c >= 1 and c != n:
		print('YES')
	else:
		print('NO')
	c = 0
	d = 0


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	if len(arr) == 0:
		print('NO')
	elif len(arr) == 1:
		print('YES')
	else:
		i = 1
		while i < len(arr):
			if arr[i] - arr[i - 1] > 1:
				print('NO')
				break
			i += 1
		if i == len(arr):
			print('YES')


for i in range(int(input())):
	(_, a) = (input(), sorted([int(x) for x in input().split()]))
	for (i, j) in zip(a, a[1:]):
		if i < j - 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	ectr = 0
	octr = 0
	for i in s:
		if i % 2 == 0:
			ectr += 1
		else:
			octr += 1
	if octr == n and n % 2 == 0 or ectr == n:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	if n == 1:
		print('YES')
		continue
	check = False
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			check = True
			break
	if check:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))
	a.sort()
	m = {}
	for i in a:
		if m.get(i) == None:
			m[i] = 1
		else:
			m[i] += 1
	temp = []
	for i in range(n):
		temp.append(a[i])
	for i in range(n):
		if m.get(a[i]) != None:
			if m.get(a[i]) > 1:
				temp.pop(temp.index(a[i]))
				m[a[i]] -= 1
			elif m.get(a[i] + 1) != None:
				temp.pop(temp.index(a[i]))
				del m[a[i]]
	if len(temp) == 1:
		print('YES')
	else:
		print('NO')


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

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

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	A = Neo()
	A.sort()
	f = 0
	for i in range(1, n):
		p = A[i] - A[i - 1]
		if abs(p) > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	t = int(input())
	a = list(map(int, input().split()))
	b = sorted(a)
	if len(b) == 1:
		print('YES')
	else:
		for j in range(1, t):
			if abs(b[j - 1] - b[j]) > 1:
				print('NO')
				break
		else:
			print('YES')


def isthere(a):
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] == 1:
			return a[i]
	for i in range(len(a) - 1):
		if a[i + 1] == a[i]:
			return a[i]
	return 0
n = int(input())
for i in range(n):
	x = int(input())
	a = list(map(int, input().split()))
	a.sort()
	while isthere(a):
		del a[a.index(isthere(a))]
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	flag = 0
	if n == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if abs(ar[i] - ar[i + 1]) == 1 or abs(ar[i] - ar[i + 1]) == 0:
				nothin = 1
			else:
				flag = 1
		if flag:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	o = 0
	e = 0
	arr = list(map(int, input().split()))
	for i in arr:
		s += i
		if i % 2 == 1:
			o += 1
		else:
			e += 1
	if s % 2 == 0:
		if o > 0 and e > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for t in range(int(input())):
	n = int(input())
	l = [int(i) for i in input().split()]
	if sum(l) % 2 != 0:
		print('YES')
	else:
		o = 0
		e = 0
		for i in range(0, n):
			if l[i] % 2 == 0:
				o += 1
			else:
				e += 1
		if o == n or n == e:
			print('NO')
		else:
			print('YES')


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ok = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ok = 'NO'
	print(ok)


t = int(input())

def solve(a):
	a.sort()
	c = 0
	while True:
		if len(a) == 1:
			return 'YES'
		if abs(a[0] - a[1]) <= 1:
			a = a[1:]
		else:
			return 'NO'

def li():
	return list(map(int, input().split()))
for i in range(t):
	n = int(input())
	a = li()
	print(solve(a))


import sys
from collections import defaultdict
mod = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 8)
INF = float('inf')

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

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


q = int(input())
for i in range(q):
	n = int(input())
	a = [int(i) for i in input().split()]
	chet = len([i for i in a if i % 2 == 0])
	nechet = n - chet
	if nechet != 0 and (sum(a) % 2 == 1 or chet):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if len(set(l)) == 1:
		print('YES')
	else:
		l.sort()
		f = 1
		for i in range(len(l) - 1):
			if l[i + 1] - l[i] <= 1:
				f += 1
				continue
			else:
				print('NO')
				break
		if f == n:
			print('YES')


for ii in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	c = 0
	for i in range(n - 1):
		if a[i] - a[i + 1] > 1:
			c += 1
			print('NO')
			break
	if c == 0:
		print('YES')


t = int(input())
for i in range(t):
	chet = 0
	nechet = 0
	s = 0
	n = int(input())
	a = [int(j) for j in input().split()]
	for i1 in range(n):
		s += a[i1]
	if s % 2 == 1:
		print('YES')
	else:
		for i2 in range(n):
			if a[i2] % 2 == 0:
				chet += 1
			else:
				nechet += 1
		if chet > 0 and nechet > 0:
			print('YES')
		elif chet == 0 and nechet % 2 == 1:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for _ in range(t):
	n = int(input())
	nums = [int(i) for i in input().split(' ')]
	isOdd = False
	isEven = False
	for i in nums:
		if i % 2 == 1:
			isOdd = True
		else:
			isEven = True
	if isOdd and len(nums) % 2 == 1:
		print('YES')
	elif isOdd and isEven:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	oddSum = False
	if not len(a) & 1:
		for i in range(len(a) - 1):
			if a[i] & 1 ^ a[i + 1] & 1:
				oddSum = True
		if oddSum:
			print('YES')
		else:
			print('NO')
	else:
		odd = False
		for i in range(len(a)):
			if a[i] & 1:
				odd = True
		if odd:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split(' ')))
	oddCount = len(list(filter(lambda x: x % 2 != 0, lst)))
	evenCount = len(lst) - oddCount
	sum2 = sum(lst)
	if sum2 % 2 != 0 or (oddCount > 0 and evenCount > 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	data = list(map(int, input().split()))
	if all((data[i] % 2 != 0 for i in range(n))) and n % 2 == 0:
		print('NO')
	elif all((data[i] % 2 == 0 for i in range(n))):
		print('NO')
	else:
		print('YES')


def ispossible(n, arr):
	if n == 1:
		return 'YES'
	arr.sort()
	i = 0
	while n:
		try:
			if abs(arr[i] - arr[i + 1]) <= 1:
				arr.remove(arr[i])
			else:
				i += 1
		except:
			pass
		n -= 1
	try:
		if abs(arr[i] - arr[i + 1]) <= 1:
			arr.remove(arr[i])
			print(arr)
	except:
		pass
	if len(arr) == 1:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(ispossible(n, a))


from collections import deque
T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	if sum(arr) % 2 == 1:
		print('YES')
	else:
		count = [0, 0]
		newArr = list(set(arr))
		for a in newArr:
			if a % 2 == 1:
				count[0] += 1
			else:
				count[1] += 1
			if count[0] > 0 and count[1] > 0:
				break
		if count[0] > 0 and count[1] > 0:
			print('YES')
		else:
			print('NO')


t = int(input())
while int(t) > 0:
	n = int(input())
	q = input()
	a = q.split()
	cnt_odd = 0
	cnt_even = 0
	for i in range(0, n):
		a[i] = int(a[i])
		if a[i] % 2 == 0:
			cnt_even += 1
		else:
			cnt_odd += 1
	if cnt_odd == 0 or (cnt_odd == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) & 1:
		print('YES')
	elif n & 1:
		for i in l:
			if i & 1:
				print('YES')
				break
		else:
			print('NO')
	else:
		ce = 0
		co = 0
		for i in l:
			if i & 1:
				co += 1
			else:
				ce += 1
		if ce == len(l):
			print('NO')
		elif co == len(l):
			print('NO')
		else:
			print('YES')


def all_equal(list):
	return all((i == list[0] for i in list))
t = int(input())
while t > 0:
	f = 0
	n = int(input())
	li = list(map(int, input().split()))
	if all_equal(li) == True:
		if sum(li) % 2 != 0 and li[0] % 2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		odd = [x for x in li if x % 2 == 1]
		o = len(odd)
		e = n - o
		if e == n:
			print('NO')
		elif sum(li) % 2 != 0:
			print('YES')
		else:
			for i in range(0, n):
				if li[i] % 2 == 0:
					print('YES')
					f = 1
					break
			if f == 0:
				print('NO')
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	tf = False
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			tf = True
			break
	if tf:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	mini = min(l)
	f = 0
	if n == 1:
		print('YES')
	else:
		for j in range(n - 1):
			if abs(l[j] - l[j + 1]) > 1:
				f = 1
				break
		if f == 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	q = 0
	m = int(input())
	s = input()
	n = [int(s) for s in s.split()]
	n = sorted(n)
	for j in range(m - 1):
		if abs(n[j] - n[j + 1]) > 1:
			q = 1
			break
	if q == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	element_numbers = int(input())
	elements = list(map(int, input().split()))
	elements_sum = sum(elements)
	odd = list(filter(lambda x: x % 2 != 0, elements))
	if elements_sum % 2 != 0:
		print('YES')
	elif len(odd) != 0 and len(elements) - len(odd) != 0:
		print('YES')
	else:
		print('NO')


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

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

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

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

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

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	n = Int()
	a = sorted(array())
	ok = True
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout

def input():
	return stdin.readline()

def prin(x):
	return stdout.write(str(x) + '\n')
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(k) for k in input().split()]
	a.sort()
	flag = 0
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if abs(a[i - 1] - a[i]) <= 1:
				pass
			else:
				flag = 1
		if flag:
			print('NO')
		else:
			print('YES')


T = int(input().strip())
for t in range(T):
	N = int(input().strip())
	A = list(map(int, input().split()))
	ans = 'NO'
	odds = 0
	even = 0
	for ind in range(0, N):
		if A[ind] % 2 == 0:
			even += 1
		else:
			odds += 1
		if odds > 0 and odds % 2 != 0:
			ans = 'YES'
		elif odds > 0 and odds % 2 == 0 and (even > 0):
			ans = 'YES'
		else:
			ans = 'NO'
	print(ans)


n = int(input())
for i in range(n):
	a = input()
	b = [int(b) for b in input().split()]
	if sum(b) % 2 != 0:
		print('YES')
	else:
		count1 = sum(map(lambda x: x % 2 == 1, b))
		count2 = sum(map(lambda y: y % 2 == 0, b))
		if count1 > 0 and count2 > 0:
			print('YES')
		else:
			print('NO')


def small(b, m):
	l = len(b)
	x = b[0]
	for i in range(0, m):
		if abs(b[i] - x) > 1:
			return 'NO'
		x = b[i]
	return 'YES'
for i in range(int(input())):
	m = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	print(small(ar, m))


t = int(input())
for ti in range(t):
	n = int(input())
	li = [int(i) for i in input().split(' ')]
	o1 = 0
	o2 = 0
	for i in li:
		if i & 1:
			o1 = 1
		else:
			o2 = 1
	if o1 and o2:
		print('YES')
	elif o1 and n & 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	i = 0
	while i < len(a) - 1:
		if a[i + 1] - a[i] <= 1:
			del a[i]
		else:
			i += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	flag = 0
	for j in range(len(l) - 1):
		if l[j + 1] - l[j] >= 2:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


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


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
import itertools

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

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

def Lstr():
	return list(sys.stdin.readline().strip())

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

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

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

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Lcm(x, y):
	return x * y // gcd(x, y)

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

def btod(n):
	return int(n, 2)

def common(l1, l2):
	return set(l1).intersection(l2)

def solution():
	for _ in range(Int()):
		n = Int()
		a = List()
		a.sort()
		ans = a[0]
		p = 0
		for i in range(1, n):
			if a[i] - ans > 1:
				p = 1
				break
			ans = a[i]
		if p == 0:
			print('YES')
		elif p == 1:
			print('NO')
solution()


import math
import sys
import heapq
from collections import deque, defaultdict
from itertools import permutations, combinations, combinations_with_replacement
from sys import *
import random
import os
mod = 10 ** 9 + 7
MAX = sys.maxsize
MIN = -sys.maxsize - 1

def isPrime(n):
	if n > 1:
		for i in range(2, n):
			if n % i == 0:
				return False
		else:
			return True
	else:
		return False

def isPanagram(s):
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	for char in alphabet:
		if char not in s.lower():
			return False
	return True

def diff(list1):
	res = [list1[i + 1] - list1[i] for i in range(len(list1) - 1)]
	return res

def isEqual(list1):
	if len(list1) < 0:
		res = True
	res = all((ele == list1[0] for ele in len(list1)))
	if res:
		return True
	else:
		return False

def remove_duplicate(list1):
	final_list = []
	for i in list1:
		if i not in final_list:
			final_lis.append(i)
	return final_list

def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if len(arr) == 1:
		return 'YES'
	if all((i == arr[0] for i in arr)):
		return 'YES'
	else:
		res = diff(arr)
		if any((i > 1 for i in res)):
			return 'NO'
		else:
			return 'YES'
t = int(stdin.readline())
for i in range(t):
	result = solve()
	stdout.write(str(result) + '\n')


t = int(input())
for i in range(t):
	n = int(input())
	ls = [int(a) for a in input().split()]
	ls.sort()
	bp = False
	for j in range(n - 1):
		if ls[j + 1] - ls[j] > 1:
			bp = True
			break
	if bp:
		print('NO')
	else:
		print('YES')


T = int(input())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split(' ')))
	sm = sum(a)
	if sm % 2 != 0:
		print('YES')
	else:
		allsame = True
		for el in a:
			allsame = allsame and el % 2 == a[0] % 2
		if allsame:
			print('NO')
		else:
			print('YES')


try:
	t = int(input())
	while t != 0:
		n = int(input())
		arr = list(map(int, input().split()))
		arr = set(arr)
		arr = list(arr)
		arr.sort()
		if len(arr) == 1:
			print('YES')
		else:
			s = 1
			for i in range(len(arr) - 1):
				if arr[i + 1] - arr[i] > 1:
					s = 0
					break
			if s == 0:
				print('NO')
			else:
				print('YES')
		t = t - 1
except EOFError:
	print(' ')


def solve():
	n = int(input())
	o = 0
	e = 0
	for j in map(int, input().split()):
		if j % 2 != 0:
			o += 1
		else:
			e += 1
	if o % 2 != 0 or (o > 0 and o % 2 == 0 and (e > 0)):
		return 'YES'
	else:
		return 'NO'
[print(solve()) for _ in range(int(input()))]


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	f = 0
	h = 0
	flag = 0
	if sum(l) % 2 == 0:
		for i in l:
			if i % 2 == 0:
				f = 1
			else:
				h = 1
			if f == 1 and h == 1:
				flag = 1
				break
		if flag == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	if all((a[i] % 2 == 0 for i in range(n))):
		print('NO')
	elif all((a[i] % 2 != 0 for i in range(n))):
		if n % 2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
	return

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


from functools import reduce
for i in range(int(input())):
	arr_size = int(input())
	arr = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for i in arr:
		if i % 2 != 0:
			odd += 1
		else:
			even += 1
	a = reduce(lambda x, y: x + y, arr)
	if a % 2 != 0 or sum == 1:
		print('YES')
	elif odd != 0 and even != 0:
		print('YES')
	else:
		print('NO')


from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

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

def fi():
	return float(stdin.readline())

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

def fmi():
	return map(float, stdin.readline().split())

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

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline()

def sieve(x):
	a = [True] * (x + 1)
	sq = floor(sqrt(x))
	for i in range(3, sq + 1, 2):
		if a[i]:
			for j in range(i * i, x + 1, i):
				a[j] = False
	if x > 1:
		p = [2]
	else:
		p = []
	for i in range(3, x + 1, 2):
		if a[i]:
			p.append(i)
	return p
res = ['YES', 'NO']
for _ in range(ii()):
	n = ii()
	o = e = f = 0
	a = li()
	for i in a:
		if i % 2:
			o += 1
		else:
			e += 1
	if not o % 2:
		if not e * o:
			f = 1
	print(res[f])


def helper(a):
	if len(a) == 1:
		print('YES')
	else:
		a.sort()
		for i in range(1, len(a)):
			if abs(a[i] - a[i - 1]) > 1:
				print('NO')
				return None
		print('YES')
big_n = int(input())
for _ in range(big_n):
	l = int(input())
	row = [int(x) for x in input().split(' ')]
	helper(row)


t = int(input())
while t != 0:
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	elif all(map(lambda x: x % 2 == 0, l)) or all(map(lambda x: x % 2 != 0, l)):
		print('NO')
	else:
		print('YES')
	t = t - 1


def t1(l):
	f = 0
	while len(l) != 1:
		i = 0
		while i < len(l):
			if abs(l[i] - l[i + 1]) <= 1:
				m = min(l[i], l[i + 1])
				l.remove(m)
			else:
				f = 1
				break
			i += 1
			if i == len(l) - 1 or len(l) == 1:
				break
		if f == 1:
			break
	if len(l) == 1:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().strip().split()))
	i = 0
	f = 0
	l.sort()
	while i < len(l) - 1:
		if abs(l[i] - l[i + 1]) <= 1:
			pass
		else:
			f = 1
			break
		i += 1
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	line = list(map(int, input().split()))
	line.sort()
	last_symbol = line[0]
	flag = True
	for i in range(1, len(line)):
		if line[i] - last_symbol > 1:
			flag = False
		last_symbol = line[i]
	if flag:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	while t > 0:
		t = t - 1
		n = int(input())
		if n == 1:
			z = input()
			print('YES')
		elif n == 0:
			print('NO')
		else:
			a = [0 for k in range(n)]
			a = list(map(int, input().strip().split()))
			a.sort()
			check = 0
			for i in range(n - 1):
				temp = a[i + 1] - a[i]
				if temp > 1:
					check = 1
					break
			if check == 1:
				print('NO')
			else:
				print('YES')
main()


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


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = list(set(arr))
	n = len(arr)
	arr.sort()
	ans = 'YES'
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


for i in range(int(input())):
	c = int(input())
	f = [int(i) % 2 for i in input().split()]
	if sum(f) % 2 == 1:
		print('YES')
	elif 1 in f and 0 in f:
		print('YES')
	else:
		print('NO')


def check(n, a):
	a = sorted(a)
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(check(n, a))


import sys
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	a = [int(x) for x in sys.stdin.readline().split()]
	if sum(a) % 2 != 0:
		print('YES')
	elif n == 1:
		print('NO')
	else:
		done = 1
		for i in range(n - 1):
			if a[i] != a[i + 1]:
				done = 0
				break
		if done == 1:
			print('NO')
		else:
			odd = 0
			even = 0
			for g in range(n):
				if a[g] % 2 == 0:
					even += 1
				else:
					odd += 1
			if odd > 0 and even > 0:
				print('YES')
			else:
				print('NO')


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def up(n):
	j = n - 1
	while j > 0:
		if n % j == 0:
			break
		j -= 1
	return j

def fac(n):
	c = 1
	i = 1
	while i <= n:
		c *= i
		i += 1
	return c

def check_happy(n):
	ss = set()
	print(n)
	while n != 1:
		val = n
		s = 0
		print(val)
		while val != 0:
			s += (val % 10) ** 2
			val = val // 10
		print(val)
		print('hi')
		if val in ss:
			return False
		else:
			n = val
			ss.add(n)
	return True

def update(a, b):
	c = 1
	val = a
	while a < b:
		print(c, a)
		c += c
		a += a
	print(1)
	while a > b:
		print()
		a -= val
		c -= 1
	return c
import random as rand

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
from itertools import permutations

def insertion_sort(arr):
	for i in range(len(arr)):
		j = i
		while j > 0:
			if arr[j] < arr[j - 1]:
				temp = arr[j]
				arr[j] = arr[j - 1]
				arr[j - 1] = temp
			j -= 1
	return arr

def quick_sort(arr, low, high):
	i = low
	j = high
	while i < j:
		if arr[i] > arr[low] and arr[j] < arr[low]:
			temp = arr[i]
			arr[i] = arr[j]
			arr[j] = arr[i]
			i += 1
			j -= 1
		elif arr[i] <= arr[low]:
			i += 1
		elif arr[j] >= arr[low]:
			j -= 1
	print(i, j)
	toto = arr[j]
	arr[j] = arr[low]
	arr[low] = toto
	return j

def dodo(arr, low, high):
	if low < high:
		val = quick_sort(arr, low, high)
		dodo(arr, low, val - 1)
		dodo(arr, val + 1, high)

def dp(arr, c, n, k, z, ans):
	if k == 0:
		return ans
	elif c == 0:
		return dp(arr, c + 1, n, k - 1, z, ans + arr[c + 1])
	elif c == n - 1:
		if z == 0:
			return 0
		else:
			return dp(arr, c - 1, n, k - 1, z - 1, ans + arr[c - 1])
	elif z == 0:
		return dp(arr, c + 1, n, k - 1, z, ans + arr[c + 1])
	else:
		return max(dp(arr, c + 1, n, k - 1, z, ans + arr[c + 1]), dp(arr, c - 1, n, k - 1, z - 1, ans + arr[c - 1]))
t = int(stdin.readline())
for i in range(t):
	n = int(stdin.readline())
	l = list(map(int, stdin.readline().split(' ')))
	l.sort()
	boo = True
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			boo = False
			break
	if boo:
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	a = sorted(map(int, input().split()))
	ok = True
	for i in range(1, n):
		if a[i - 1] != a[i] and a[i - 1] + 1 != a[i]:
			ok = False
			break
	print('YES' if ok else 'NO')
t = int(input())
for _ in range(t):
	solve()


for x in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	for x in a:
		if x % 2 != 0:
			count += 1
	if count % 2 != 0:
		print('YES')
	elif count % 2 == 0 and (n % 2 != 0 or n % 2 == 0) and (count < n) and (count > 0):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	k = int(input())
	a = list(map(int, input().split()))
	(c, d, m) = (0, 0, 0)
	for i in a:
		if i % 2 != 0:
			c += 1
		else:
			d += 1
	if sum(a) % 2 != 0:
		m = 1
		print('YES')
	elif len(a) % 2 != 0 and d > 0 and (c > 0):
		print('YES')
		m = 1
	elif len(a) % 2 == 0 and c > 0 and (d > 0):
		print('YES')
		m = 1
	if m == 0:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = sorted([int(j) for j in input().split()])
	while True:
		if len(arr) == 1:
			print('YES')
			break
		if arr[1] - arr[0] <= 1:
			arr.pop(0)
		else:
			print('NO')
			break


def check(arrayList):
	arrayList.sort()
	result = 'YES'
	for item in range(0, len(arrayList) - 1):
		if arrayList[item + 1] - arrayList[item] > 1:
			result = 'NO'
			break
	print(result)
t = int(input())
for i in range(0, t):
	n = int(input())
	lists = list((int(num) for num in input().strip().split()))[:n]
	check(lists)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	f = list(set(a))
	f.sort()
	ans = 'YES'
	for i in range(1, len(f)):
		if f[i] - f[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = {int(x) for x in input().split()}
	a = sorted(a)
	prev = a[0]
	i = 1
	c = 0
	while len(a) > 1:
		if abs(prev - a[i]) <= 1:
			a.remove(min(prev, a[i]))
			prev = a[0]
		else:
			print('NO')
			c = 1
			break
	if c == 0 and len(a) == 1:
		print('YES')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		if n == 1:
			print('YES')
			continue
		a.sort()
		flag = False
		for i in range(n - 1):
			if a[i] + 1 == a[i + 1] or a[i] == a[i + 1]:
				continue
			else:
				flag = True
		if flag:
			print('NO')
		else:
			print('YES')
main()


for i in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	for i in range(len(arr) - 1):
		if arr[1] - arr[0] <= 1:
			arr = arr[1:]
		else:
			break
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


test = int(input())
while test:
	n = int(input())
	l = [int(x) for x in input().split(' ')]
	l.sort(reverse=True)
	i = n - 1
	while i > 0:
		if l[i - 1] - l[i] <= 1:
			l[i] = -5
		i -= 1
	test -= 1
	i = 0
	count = 0
	while i < n:
		if l[i] > 0:
			count += 1
		i += 1
	if count == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	_ = int(input())
	array = sorted(map(int, input().split()))
	for (a, b) in zip(array, array[1:]):
		if b - a > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	(c1, c2) = (0, 0)
	for i in A:
		if i % 2:
			c1 += 1
		else:
			c2 += 1
	if c1 == 0:
		print('NO')
	elif c2 == 0:
		if n % 2:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for x in range(int(input())):
	n = int(input())
	lst = sorted(list(map(int, input().split())))
	f = list()
	i = 1
	while i < n:
		if lst[i] - lst[i - 1] <= 1 and lst[i] - lst[i - 1] > 0:
			f.append(min(lst[i], lst[i - 1]))
		elif lst[i] - lst[i - 1] == 0:
			f.append(lst[i])
		i += 1
	if len(lst) - len(f) == 1:
		print('YES')
	else:
		print('NO')


def solve(n, arr):
	arr.sort()
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
results = []
for _ in range(0, t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	results.append(solve(n, arr))
for result in results:
	print(result)


t = int(input())
for i in range(0, t):
	n = int(input())
	lis = list(map(int, input().split()))
	k = 0
	m = 0
	if len(lis) % 2 == 0:
		for j in range(0, n):
			if lis[j] % 2 != 0:
				k = k + 1
		if k == 0 or k == n:
			print('NO')
		elif k > 0 and k != n:
			print('YES')
	else:
		for j in range(0, n):
			if lis[j] % 2 != 0:
				m = m + 1
		if m == 0:
			print('NO')
		else:
			print('YES')


n = int(input())
for _ in range(n):
	n1 = int(input())
	ll = list(map(int, input().split()))
	ll = sorted(ll)
	max = 0
	for i in range(n1 - 1):
		if abs(ll[i] - ll[i + 1]) > max:
			max = abs(ll[i] - ll[i + 1])
	if max > 1:
		print('NO')
	else:
		print('YES')


import math

def facts(n):
	ans = []
	for i in range(2, int(math.sqrt(n) + 1)):
		if n % i == 0:
			ans.append(i)
			ans.append(n // i)
	ans = sorted(ans)
	return ans
for _ in range(int(input())):
	n = int(input())
	nms = list(map(int, input().split()))
	nms = sorted(nms)
	ans = 0
	state = n
	for i in range(n - 1):
		if abs(nms[i] - nms[i + 1]) == 1 or abs(nms[i] - nms[i + 1]) == 0:
			state -= 1
			if state == 1:
				break
	if state == 1:
		print('YES')
	else:
		print('NO')


ct = int(input())
while ct > 0:
	ct -= 1
	input()
	lis = list(map(int, input().split()))
	lis.sort()
	flag = True
	for i in range(len(lis) - 1):
		if lis[i + 1] - lis[i] > 1:
			flag = False
			break
	print('YES' if flag else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	ai = list(map(int, input().split()))
	ai.sort()
	ans = 'YES'
	for i in range(1, n):
		if ai[i] - ai[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


import sys
import math
import heapq
import collections

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

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

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

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	a = inputlist()
	a.sort()
	good = True
	for i in range(1, n):
		if a[i] - a[i - 1] >= 2:
			good = False
	if good:
		print('YES')
	else:
		print('NO')


test_cases = int(input())
for _ in range(test_cases):
	n = int(input())
	array = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	array.sort()
	look = True
	while look:
		look = False
		for i in range(len(array) - 1):
			if abs(array[i] - array[i + 1]) <= 1:
				look = True
				array.remove(array[i])
				break
		if look == False:
			if len(array) == 1:
				print('YES')
				break
			else:
				print('NO')
				break


t = int(input())
for i in range(t):
	l = int(input())
	a = list(map(int, input().split()))
	a.sort()
	s = ''
	for i in range(l - 1):
		if a[i + 1] - a[i] <= 1:
			continue
		else:
			s = s + 'NO'
			break
	if s == '':
		print('YES')
	elif s == 'NO':
		print(s)


t = int(input())
for p in range(t):
	n = int(input())
	ara = list(map(int, input().strip().split()))
	ara.sort()
	flag = 0
	for i in range(n - 1):
		if ara[i + 1] - ara[i] > 1:
			flag = 1
			break
		else:
			flag = 0
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())

def solve(a):
	a = sorted(a)
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			return
	print('YES')
for i in range(t):
	input()
	a = map(int, input().split())
	solve(a)


for i in range(int(input())):
	a = int(input())
	t = list(map(int, input().split()))
	p = sum(t)
	if p % 2 != 0:
		print('YES')
	else:
		e = 0
		o = 0
		for k in range(a):
			if t[k] % 2 == 0:
				e += 1
			else:
				o += 1
		if min(e, o) >= 1:
			print('YES')
		else:
			print('NO')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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

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

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

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

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	n = ii()
	a = sorted(li())
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			break
	else:
		print('YES')


n = int(input())
for i in range(n):
	l = int(input())
	a = list(map(int, input().strip().split()))
	a.sort()
	f = 0
	for j in range(l - 1):
		if a[j] - a[j + 1] > 1 or a[j] - a[j + 1] < -1:
			f = 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')


def razch(c, m):
	for i in range(c):
		if m[i] != m[i - 1]:
			return True
	return False

def last(c, m):
	(k, j) = (0, 0)
	for i in range(c):
		if mas[i] % 2 == 0:
			k += 1
		else:
			j += 1
	if k == c:
		return False
	elif j == c:
		if sum(m) % 2 == 0:
			return False
	return True
for i in range(int(input())):
	a = int(input())
	mas = list(map(int, input().split()))
	if razch(a, mas) == False:
		if sum(mas) % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		mas = sorted(mas)
		if last(a, mas) == True:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	count = 0
	array = sorted(map(int, input().split()))
	for i in range(1, len(array)):
		if array[i] - array[i - 1] <= 1:
			count += 1
	print('YES' if count == n - 1 else 'NO')


T = int(input())
for k in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = 0
	if sum(arr) % 2 == 0:
		for i in range(len(arr)):
			for j in range(len(arr)):
				if arr[i] % 2 == 0 and arr[j] % 2 != 0:
					flag = 1
	else:
		flag = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for work in range(t):
	k = int(input())
	s = set(map(int, input().split()))
	mini = min(s)
	maxi = max(s)
	for i in range(mini, maxi):
		if i not in s:
			print('NO')
			break
	else:
		print('YES')


import sys
stdin = sys.stdin
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()
t = ni()
for _ in range(t):
	n = ni()
	ar = sorted(na())
	prev = ar[0]
	flag = False
	for i in range(1, n):
		if ar[i] - prev > 1:
			flag = True
			break
		prev = ar[i]
	print('NO' if flag else 'YES')


for _ in range(int(input())):
	n = int(input())
	ni = [_ for _ in map(int, input().split())]
	ni.sort()
	flag = True
	for i in range(n - 1, 0, -1):
		if abs(ni[i] - ni[i - 1]) > 1:
			print('NO')
			flag = False
			break
	if flag:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = True
	for j in range(n - 1):
		if a[j + 1] - a[j] > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


def isOnlyOne(num_set):
	num_lst = sorted(num_set)
	length = len(num_lst)
	for i in range(length - 1):
		if num_lst[i + 1] - num_lst[i] > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for _ in range(t):
	n = int(input())
	num_set = set(map(int, input().rstrip().split()))
	isOnlyOne(num_set)


t = int(input())
while t != 0:
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	count = 0
	while len(a) != 1:
		if abs(a[-1] - a[-2]) > 1:
			count = 1
			break
		a.pop()
	if count != 0:
		print('NO')
	else:
		print('YES')
	t = t - 1


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

def main():
	for t in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		ans = 'YES'
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				ans = 'NO'
				break
		print(ans)
main()


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	sum = 0
	o = 0
	for i in A:
		sum += i
		if i % 2 != 0:
			o += 1
	if sum % 2 != 0:
		print('YES')
		continue
	if o != 0 and (o % 2 == 0 and o != n):
		print('YES')
	else:
		print('NO')


t = int(input())
for v in range(t):
	n = int(input())
	odd1 = 0
	even1 = 0
	arr = [int(i) for i in input().split(' ')]
	for i in range(n):
		check = arr[i]
		if check % 2 == 0:
			even1 += 1
		else:
			odd1 += 1
	if n % 2 == 0:
		if even1 == n or odd1 == n:
			print('NO')
		else:
			print('YES')
	elif even1 == n:
		print('NO')
	else:
		print('YES')


import sys
import math
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = 0
	for i in range(n):
		if arr[i] % 2:
			flag += 1
	if flag == n and n % 2 == 0:
		print('NO')
	elif flag == 0:
		print('NO')
	else:
		print('YES')


try:
	for _ in range(int(input())):
		n = int(input())
		a = [int(i) for i in input().split()]
		s = 'YES'
		if n > 1:
			a.sort()
			for i in range(n - 1):
				if abs(a[i] - a[i + 1]) > 1:
					s = 'NO'
					break
		print(s)
except:
	pass


n = int(input())
l1 = []
l2 = []
for i in range(n):
	l1.append(int(input()))
	for j in range(1):
		l2.append([int(x) for x in input().split()])

def ans():
	for j in range(n):
		l2[j].sort()
		if len(l2[j]) < 2:
			print('YES')
		else:
			i = 0
			while i < l1[j] - 1:
				if l2[j][i + 1] - l2[j][i] < 2:
					if i == l1[j] - 2:
						print('YES')
				else:
					print('NO')
					break
				i = i + 1
	print()
ans()


t = int(input())
while t != 0:
	elements = int(input())
	given = input()
	given = given.split()
	ans = 0
	for i in given:
		ans += int(i)
	if ans % 2 != 0:
		print('YES')
	else:
		oddy = 0
		eveny = 0
		for i in given:
			if int(i) % 2 != 0:
				oddy = 1
			else:
				eveny = 1
		if oddy == 1 and eveny == 1:
			print('YES')
		else:
			print('NO')
	t -= 1


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


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ch = 0
	nech = 0
	for i in range(n):
		if a[i] % 2 == 0:
			ch += 1
		else:
			nech += 1
	if nech != 0 and n % 2 == 1 or (nech != 0 and nech % 2 == 1):
		print('YES')
	elif n % 2 == 0 and nech != 0 and (ch != 0):
		print('YES')
	else:
		print('NO')


def solve(n, ar):
	even = 0
	odd = 0
	if sum(ar) % 2 != 0:
		print('YES')
		return
	else:
		for i in range(n):
			if ar[i] % 2 != 0:
				odd += 1
			else:
				even += 1
			if odd >= 1 and even >= 1:
				print('YES')
				return
		print('NO')
t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	solve(n, ar)


def comp(l):
	l.sort()
	y = len(l)
	x = l[:]
	for i in range(0, len(x) - 1):
		v = x[i:i + 2]
		if v[1] - v[0] == 1 or v[1] - v[0] == 0:
			l.remove(v[0])
	if len(l) == 1:
		return 'YES'
	else:
		return 'NO'
y = input()
v = []
for l in range(0, int(y)):
	k = input()
	input_string = input()
	u = input_string.split()
	for i in range(0, len(u)):
		u[i] = int(u[i])
	v.append(u)
for b in v:
	print(comp(b))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = 'NO'
	even = False
	for d in arr:
		if d % 2 == 1:
			ans = 'YES'
		else:
			even = True
	if not even and n % 2 == 0:
		ans = 'NO'
	print(ans)


import sys
import math
from functools import *
from itertools import *
from collections import *
sys.setrecursionlimit(10 ** 7)
ti = int(input())
for i in range(ti):
	ni = int(input())
	ai = sorted(map(int, input().split()))
	for i in range(1, ni):
		if ai[i] - ai[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(lambda x: int(x) % 2, input().split()))
	if sum(a) % 2:
		print('YES')
		continue
	if len(set(a)) == 1:
		if a[0] * n % 2:
			print('YES')
		else:
			print('NO')
		continue
	print('YES')


t = int(input())
while t != 0:
	arr = []
	n = int(input())
	arr = [int(x) for x in input().split()]
	if sum(arr) % 2 != 0:
		print('YES')
	else:
		count = 0
		temp = 0
		for ele in arr:
			if ele % 2 == 0:
				count += 1
			else:
				temp += 1
		if count == len(arr):
			print('NO')
		elif temp == len(arr) and temp % 2 == 0:
			print('NO')
		else:
			print('YES')
	t = t - 1


def main():
	for _ in range(int(input())):
		en = int(input())
		aa = list((int(ex) for ex in input().split()))
		aa.sort()
		for ai in range(en - 1):
			if aa[ai + 1] - aa[ai] > 1:
				print('NO')
				break
		else:
			print('YES')
main()


t = int(input())
for i in range(0, t):
	n = int(input())
	arr = input().split()
	if n == 1:
		print('YES')
	else:
		for i in range(n):
			arr[i] = int(arr[i])
		arr.sort()
		possible = True
		for i in range(1, n):
			if abs(arr[i] - arr[i - 1]) > 1:
				possible = False
				print('NO')
				break
		if possible == True:
			print('YES')


import sys

def odd(a):
	if 1 in a and 0 in a:
		return 'YES'
	if 0 in a:
		return 'NO'
	if 1 in a and len(a) % 2 == 1:
		return 'YES'
	return 'NO'
for _ in range(int(input())):
	n = int(sys.stdin.readline().split()[0])
	a = list(map(lambda x: int(x) % 2, sys.stdin.readline().split()))
	print(odd(a))


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

def getAns(n, l):
	if n % 2 == 1:
		for i in l:
			if i % 2 == 1:
				return True
	else:
		foundEven = False
		foundOdd = False
		for i in l:
			if i % 2 == 0:
				foundEven = True
			else:
				foundOdd = True
		return foundEven and foundOdd
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if getAns(n, l):
		print('YES')
	else:
		print('NO')


test = int(input())
for _ in range(test):
	input()
	arr = list(map(int, input().split()))
	arr.sort()
	l = len(arr)
	if l == 1:
		print('YES')
		continue
	else:
		noflag = False
		for i in range(1, l):
			if arr[i] - arr[i - 1] > 1:
				noflag = True
				break
	if noflag:
		print('NO')
	else:
		print('YES')


t = int(input())
for count in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	check = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			check = 1
	if check == 1:
		print('NO')
	elif check == 0:
		print('YES')


from sys import stdin
t = int(input())
for _ in range(t):
	n = int(input())
	nums = [int(x) for x in stdin.readline().split()]
	nums.sort()
	for i in range(n - 1):
		if nums[i + 1] - nums[i] > 1:
			print('NO')
			break
	else:
		print('YES')


from sys import stdin
r = stdin.readline

def count_odds(n, A):
	ans = 0
	for x in A:
		if x % 2 == 1:
			ans += 1
	return ans

def solve(n, A):
	if sum(A) % 2 == 1:
		return True
	else:
		odds = count_odds(n, A)
		return n - odds > 0 and odds != 0

def main():
	cases = int(r())
	for case in range(cases):
		n = int(r())
		A = list(map(int, r().strip().split()))
		print('YES' if solve(n, A) else 'NO')
main()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	o = []
	if n == 1:
		print('YES')
	else:
		i = 1
		while i < len(l):
			o.append(abs(l[i] - l[i - 1]))
			i = i + 1
		o.sort()
		if o[-1] == 1 or o[-1] == 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flagodd = False
	flageven = False
	for i in range(n):
		if a[i] % 2:
			flagodd = True
		else:
			flageven = True
	if not flagodd:
		ans = 'NO'
	elif not flageven and n % 2 == 0:
		ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


for t in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	k = 0
	m = 0
	ans = 'YES'
	for j in a:
		if j % 2 == 0:
			k += 1
		else:
			m += 1
	if m == 0 or (k == 0 and len(a) % 2 == 0):
		ans = 'NO'
	print(ans)


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	bul_nec = False
	bul_chet = False
	for el in a:
		if el % 2 == 0:
			bul_chet = True
		else:
			bul_nec = True
	if bul_nec and (bul_chet or n % 2 == 1):
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	a = input().split(' ')
	i = 0
	j = 1
	for b in range(n):
		a[b] = int(a[b])
	a.sort()
	while i <= len(a) - 2 and j <= len(a) - 1:
		if i != j and abs(int(a[i]) - int(a[j])) <= 1:
			a.remove(min(int(a[i]), int(a[j])))
			i = 0
			j = i + 1
		elif j == len(a) - 1:
			i += 1
			j = i + 1
		else:
			j += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


for i in range(int(input())):
	n = int(input())
	c2 = 0
	c1 = 0
	s = list(map(int, input().split()))
	for i in s:
		if i % 2 == 0:
			c2 += 1
		else:
			c1 += 1
	if (c2 * 2 + c1) % 2 != 0:
		ans = 'YES'
	elif c2 != 0 and c1 != 0:
		ans = 'YES'
	else:
		ans = 'NO'
	print(ans)


import sys
read = lambda : list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	n = int(input())
	count = sum([i % 2 for i in read()])
	print(['YES', 'NO'][count == 0 or (count == n and n % 2 == 0)])


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	p = 'YES'
	for j in range(n - 1):
		if l[j + 1] - l[j] > 1:
			p = 'NO'
			break
	print(p)


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

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

def S_():
	return input()

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

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

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

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

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

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def Ra():
	return map(int, open(0).read().split())

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

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

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()
show_flg = False
show_flg = True
ans = 0
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	n = I()
	k = 1
	a = sorted(LI())
	for (i, j) in zip(a, a[1:]):
		if abs(i - j) > 1:
			k = 0
	YN(k)


for _ in range(int(input())):
	n = int(input())
	l = sorted(map(int, input().split()))
	while len(l) > 1 and l[-1] - l[-2] <= 1:
		l.pop()
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


t = int(input(''))
while t != 0:
	n = int(input(''))
	x = input('')
	l = x.split()
	for i in range(len(l)):
		l[i] = int(l[i])
	for i in range(len(l) - 1):
		for j in range(i + 1, len(l)):
			if l[i] > l[j]:
				(l[i], l[j]) = (l[j], l[i])
	for i in l[:len(l) - 1]:
		x = l.index(i)
		if i + 1 == l[x + 1] or i == l[x + 1]:
			l.remove(i)
	if len(l) == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


def fuck(A):
	if len(A) == 1:
		print('YES')
		return
	A.sort()
	for i in range(len(A) - 1):
		if abs(A[i] - A[i + 1]) <= 1:
			continue
		else:
			print('NO')
			return
	print('YES')
	return
t = int(input())
for i in range(t):
	n = int(input())
	A = [int(i) for i in input().split()][:n]
	fuck(A)


for _ in range(int(input())):
	n = int(input())
	li = [int(i) for i in input().split()]
	e = 0
	o = 0
	for i in li:
		if i % 2 == 1:
			o += 1
		else:
			e += 1
		if e >= 1 and o >= 1:
			print('YES')
			break
	else:
		if sum(li) % 2 == 1:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	ans = 'YES'
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	a.sort()
	for j in range(n - 1):
		if a[j + 1] - a[j] > 1:
			ans = 'NO'
			continue
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	s = input().split()
	a = list(map(int, s))
	a.sort()
	k = 0
	for w in range(n - 1):
		if a[w + 1] - a[w] > 1:
			k += 1
	if k == 0:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	flag = 1
	i = 0
	if len(a) == 1:
		print('YES')
	else:
		while len(a) != 1 and flag == 1:
			flag = 0
			while i < len(a) - 1:
				if a[i] == a[i + 1] - 1 or a[i] == a[i + 1] + 1 or a[i] == a[i + 1]:
					a.remove(min(a[i], a[i + 1]))
					flag = 1
				else:
					i += 1
			if i >= len(a) - 1:
				i = 0
		if len(a) == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	od = 0
	for i in a:
		if i & 1:
			od += 1
	sm = sum(a)
	ev = n - od
	if sm & 1:
		print('YES')
	elif od and ev:
		print('YES')
	else:
		print('NO')


T = input()
T = int(T)
for t in range(0, T):
	n = input()
	n = int(n)
	arr = list(map(int, input().split()))
	arr.sort()
	if n == 1:
		print('YES')
	else:
		count = -123
		for i in range(0, n - 1):
			if arr[i + 1] - arr[i] >= 2:
				count = i
				break
		if count != -123:
			print('NO')
		else:
			print('YES')


import math
import os
import random
import re
import sys

def fun(arr, n):
	arr.sort()
	result = None
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			result = 'NO'
			break
		else:
			continue
	if result == None:
		result = 'YES'
	return result
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	result = fun(arr, n)
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	l = input().split()
	total = 0
	pair = 0
	odd = 0
	for i in l:
		total += int(i)
	if total % 2 != 0:
		print('YES')
	else:
		for i in l:
			if int(i) % 2 == 0:
				pair = 1
			else:
				odd = 1
			if pair != 0 and odd != 0:
				print('YES')
				break
		if odd == 0 or pair == 0:
			print('NO')


T = int(input())

def solve(arr):
	arr.sort()
	for i in range(0, len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			return
	print('YES')
while T > 0:
	n = int(input())
	arr = [int(el) for el in input().split(' ')]
	solve(arr)
	T -= 1


t = int(input())
while t > 0:
	flag = 0
	n = int(input())
	lst = list(map(int, input().split()))
	lst = sorted(lst)
	prev = lst[0]
	for i in range(1, len(lst)):
		if abs(prev - lst[i]) > 1:
			flag = 1
			print('NO')
			break
		prev = lst[i]
	if flag == 0:
		print('YES')
	t -= 1


ans = []
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	if n == 1 and a[0] % 2 == 0:
		ans.append('NO')
	elif sum(a) % 2 == 0:
		x = a[0] % 2
		for i in range(1, n):
			if a[i] % 2 != x:
				ans.append('YES')
				break
			elif i == n - 1:
				ans.append('NO')
	else:
		ans.append('YES')
for i in range(len(ans)):
	print(ans[i])


T = int(input())
while T:
	T -= 1
	N = int(input())
	lis = list(map(int, input().split()))
	lis.sort()
	flag = 0
	for i in range(1, len(lis)):
		if lis[i] - lis[i - 1] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


for test in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	count = 0
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			count += 1
		if count == 1:
			break
	if count < 1:
		print('YES')
	else:
		print('NO')


from sys import stdin

def main():
	iint = int
	llist = list
	sset = set
	ssorted = sorted
	mmap = map
	mmin = min
	input = stdin.readline
	t = iint(input())
	for i in range(t):
		n = iint(input())
		arr = llist(mmap(iint, input().split()))
		arr = ssorted(sset(arr))
		if len(arr) == 1:
			print('YES')
			continue
		ans = 0
		i = 0
		while i < len(arr) - 1:
			if abs(arr[i] - arr[i + 1]) > 1:
				ans = ans + 1
				i = i + 1
			else:
				del arr[i]
				i = i
			if ans == 2:
				print('NO')
				break
		else:
			if len(arr) >= 2:
				print('NO')
			else:
				print('YES')
main()


for _ in range(int(input())):
	input()
	a = list(map(int, input().split()))
	s = sum(a)
	if s & 1 == 1:
		print('YES')
	else:
		odd = even = False
		for val in a:
			odd = odd or val & 1 == 1
			even = even or val & 1 == 0
		print('YES' if odd and even else 'NO')


t = int(input())
for j in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	ans = 'YES'
	if not sum(a) & 1:
		even = [i for i in a if not i & 1]
		odd = [i for i in a if i & 1]
		if not even or not odd:
			ans = 'NO'
	print(ans)


for t in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	odd = 0
	even = 0
	for item in arr:
		if item % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 == 1:
		print('YES')
	elif even > 0 and odd > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t != 0:
	n = int(input())
	a = list(map(int, input().split()))[:n]
	yes = 0
	a.sort()
	if len(a) == 1:
		print('YES')
		t -= 1
		continue
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) <= 1 and abs(a[i] - a[i + 1]) >= 0:
			yes = 1
		else:
			yes = 0
			break
	if yes == 0:
		print('NO')
	else:
		print('YES')
	t -= 1


tests = int(input())
for t in range(tests):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = sorted(arr)
	curr = arr[0]
	check = True
	for item in arr[1:]:
		if item - curr > 1:
			check = False
			break
		else:
			curr = item
	if check:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	lt = list(map(int, input().split()))
	if sum(lt) % 2 == 1:
		print('YES')
	else:
		os = 0
		on = 0
		for i in lt:
			if i % 2 == 1:
				os += i
				on += 1
		if on == 0:
			print('NO')
			continue
		if on % 2 == 0 and on != n:
			print('YES')
			continue
		else:
			print('NO')


from math import *
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	f = 0
	while i < len(a) - 1:
		if a[i + 1] - a[i] <= 1:
			a.remove(a[i])
		else:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	ls = [0] * n
	ls = list(map(int, input().split()))
	di = {}
	for i in range(n):
		if ls[i] not in di:
			di[ls[i]] = 1
		else:
			di[ls[i]] = di[ls[i]] + 1
	for i in di:
		if di[i] > 1:
			n = n - di[i] + 1
		if i + 1 in di:
			n = n - 1
	if n > 1:
		print('NO')
	else:
		print('YES')
	t = t - 1


from sys import stdin
x = int(stdin.readline())
for i in range(x):
	n = int(stdin.readline())
	l = list(map(int, stdin.readline().split()))
	l1 = list(set(l))
	if len(l1) == 1:
		print('YES')
	else:
		l1.sort()
		count = 0
		for i in range(len(l1) - 1):
			if abs(l1[i] - l1[i + 1]) <= 1:
				if l1[i] < l1[i + 1]:
					count += 1
				else:
					count += 1
		if count == len(l1) - 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	s = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for j in range(s):
		if a[j] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd != 0 and even != 0:
		print('Yes')
	elif even == 0 and s % 2 == 1:
		print('Yes')
	else:
		print('No')


def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	i = 0
	while i < n - 1:
		if abs(arr[i] - arr[i + 1]) <= 1:
			arr[i] = -1
		i += 1
	if arr.count(-1) < n - 1:
		print('NO')
		return
	print('YES')
t = int(input())
for i in range(t):
	solve()


import sys, math
input = sys.stdin.readline
t = int(input())
for r in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = True
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	c = 0
	n = int(input())
	x = list(map(int, input().split()))
	x.sort()
	for i in range(len(x) - 1):
		if abs(x[i] - x[i + 1]) > 1:
			c = c + 1
	if c == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(1, t + 1):
	t2 = int(input())
	s = list(map(int, input().split()))
	if sum(s) % 2 == 1:
		print('YES')
	elif any((j % 2 == 0 for j in s)) and any((j % 2 == 1 for j in s)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	if sum(li) & 1:
		print('YES')
	else:
		E = 0
		for i in li:
			if i % 2 == 0:
				E += 1
		if E == n or E == 0:
			print('NO')
		else:
			print('YES')


a = int(input())
for x in range(a):
	n = int(input())
	nums = input()
	nums = nums.split(' ')
	nums = [int(y) for y in nums]
	_sum = sum(nums)
	if _sum % 2 == 1:
		print('YES')
	elif all((i % 2 == 1 for i in nums)) and len(nums) % 2 == 0:
		print('NO')
	elif all((i % 2 == 0 for i in nums)):
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	good = True
	for j in range(n - 1):
		if abs(arr[j] - arr[j + 1]) > 1:
			good = False
	if good:
		print('YES')
	else:
		print('NO')


import math
n = int(input())
for i in range(n):
	m = int(input())
	a = [int(i) for i in input().split()]
	a = sorted(a)
	if len(a) == 1:
		print('YES')
	else:
		flag = 0
		for j in range(0, len(a) - 1):
			if abs(a[j] - a[j + 1]) > 1:
				flag = 1
				break
		if flag > 0:
			print('NO')
		else:
			print('YES')


q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		k1 = 0
		k2 = 0
		res = 'NO'
		for x in a:
			if x % 2 == 0:
				k1 += 1
			else:
				k2 += 1
			if k1 > 0 and k2 > 0:
				res = 'YES'
				break
		print(res)


import math

def BubbleSort(tab):
	n = len(tab)
	for i in range(n - 1):
		for j in range(0, n - i - 1):
			if tab[j] > tab[j + 1]:
				(tab[j], tab[j + 1]) = (tab[j + 1], tab[j])
t = int(input())
for i in range(1, t + 1):
	l = int(input())
	a = list(map(int, input().split()))
	j = 0
	b = []
	BubbleSort(a)
	for j in range(0, len(a)):
		try:
			if abs(a[j] - a[j + 1]) <= 1:
				if a[j] < a[j + 1]:
					b.append(a[j])
					j += 1
				elif a[j] > a[j + 1]:
					b.append(a[j + 1])
					j += 1
				else:
					b.append(a[j + 1])
					j += 1
		except:
			pass
	if len(a) - len(b) == 1:
		print('YES')
	else:
		print('NO')


def main(l):
	l.sort()
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			return 'No'
	return 'Yes'
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(main(l))


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		l.sort()
		q = 0
		for i in range(1, n):
			if l[i] - l[i - 1] <= 1:
				pass
			else:
				q = 1
				break
		if q == 1:
			print('NO')
		else:
			print('YES')


n = int(input())
for i in range(0, n):
	l = int(input())
	a = [int(x) for x in input().split()]
	a_odd = [x % 2 for x in a]
	s = sum(a_odd)
	if s > 0:
		if s < l or s % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	s = sorted([int(x) for x in input().split()])
	yes = True
	for j in range(1, n):
		if abs(s[j] - s[j - 1]) > 1:
			yes = False
			break
	print('YES' if yes else 'NO')


for _ in range(int(input())):
	n = int(input())
	(odd, even) = (0, 0)
	l = [int(x) for x in input().split()]
	for i in l:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if sum(l) % 2 != 0 or (odd > 0 and even > 0):
		print('YES')
	else:
		print('NO')


def solve(arr, n):
	even = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
	if even == n:
		print('NO')
		return
	odd = n - even
	if odd == n and n % 2 == 0:
		print('NO')
		return
	print('YES')

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


t = int(input())
for j in range(t):
	n = int(input())
	a = input().split()
	nb = 0
	s = 0
	for element in a:
		x = int(element)
		if x % 2 == 1:
			nb += 1
		s += x
	if s % 2 == 1:
		print('YES')
	elif nb == n or nb == 0:
		print('NO')
	else:
		print('YES')


first = int(input())
while first > 0:
	first -= 1
	b = int(input())
	c = list(map(int, input().split()))
	c.sort()
	x = 0
	while x < b - 1:
		if c[1] - c[0] > 1:
			print('NO')
			break
		else:
			c.remove(c[0])
			x += 1
	else:
		print('YES')


num = int(input(''))
i = 0
while i < num:
	flag = 1
	length = int(input(''))
	array = input('').split()
	int_arr = []
	for k in array:
		int_arr.append(int(k))
	int_arr.sort()
	for j in range(len(int_arr) - 1):
		if int(int_arr[j + 1]) - int(int_arr[j]) > 1:
			print('NO')
			flag = 0
			break
	if flag == 1:
		print('YES')
	i += 1


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	if sum(a) % 2 == 1:
		print('YES')
	else:
		ev = 0
		od = 0
		for i in range(n):
			if a[i] % 2 == 0:
				ev += 1
			else:
				od += 1
		if od == n or ev == n:
			print('NO')
		else:
			print('YES')


def solve(arr, arr_len):
	arr_sum = 0
	odd_count = 0
	even_count = 0
	for number in arr:
		arr_sum += number
		if number % 2 == 1:
			odd_count += 1
		else:
			even_count += 1
	if arr_sum % 2 == 1:
		return 'YES'
	elif odd_count > 0 and even_count > 0:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for m_i in range(0, t):
	array_length = int(input())
	array = [int(input_value) for input_value in input().split(' ')]
	print(solve(array, array_length))


n = int(input())
for i in range(n):
	m = int(input())
	count_even = 0
	count_odd = 0
	global sum
	sum = 0
	x = input()
	l = x.split(' ')
	for k in l:
		sum += int(k)
		if int(k) % 2 == 0:
			count_even += 1
		elif int(k) % 2 != 0:
			count_odd += 1
	if sum % 2 != 0:
		print('YES')
	elif count_even >= 1 and count_odd >= 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	k = sorted(list(map(int, input().split())))
	yes = 0
	n = 0
	for i in range(len(k) - 1):
		if abs(k[i] - k[i + 1]) <= 1:
			yes += 1
		else:
			n += 1
	if n > 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	ans = 'NO'
	n = int(input())
	a = [int(i) for i in input().split()]
	if n % 2 != 0:
		for i in a:
			if i % 2 != 0:
				ans = 'YES'
	else:
		odd = 0
		even = 0
		for i in a:
			if i % 2 == 0:
				even = 1
			if i % 2 != 0:
				odd = 1
		if odd == 1 and even == 1:
			ans = 'YES'
	print(ans)


def solve():
	n = int(input())
	numbers = list(map(int, input().split()))
	numbers.sort()
	for i in range(n - 1):
		if numbers[i + 1] - numbers[i] > 1:
			print('NO')
			break
	else:
		print('YES')
for _ in range(int(input())):
	solve()


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	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
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

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(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
		return
	for j in range(0, n - 1):
		if l[j + 1] - l[j] > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for i in range(0, t):
	main()


for i in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	a = sorted(ar)
	cnt = 0
	for i in range(n):
		if i == n - 1 or a[i + 1] - a[i] > 1:
			cnt += 1
	if cnt > 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	r = True
	for i in range(1, n):
		r = r and l[i] - l[i - 1] <= 1
	if r:
		print('YES')
	else:
		print('NO')


n = int(input())
c = []
for i in range(n):
	x = int(input())
	a = list(map(int, input().split()))
	e = o = 0
	for k in a:
		if k % 2 == 0:
			e = e + 1
		else:
			o = o + 1
	if e == len(a):
		c.append('NO')
	elif o == len(a) and len(a) % 2 == 0:
		c.append('NO')
	elif len(a) == 1 and a[0] % 2 == 0:
		c.append('NO')
	else:
		c.append('YES')
for i in range(len(c)):
	print(c[i])


for _ in range(int(input())):
	n = input()
	a = list(map(int, input().split()))
	evens = list(filter(lambda x: x % 2 == 0, a))
	odds = list(filter(lambda x: x % 2 == 1, a))
	sum_odds = sum(odds)
	if sum_odds % 2 == 0:
		ans = len(evens) > 0 and sum_odds > 0
	else:
		ans = True
	if ans:
		print('YES')
	else:
		print('NO')


T = 1
T = int(input())
for z in range(T):
	N = int(input())
	lst = list(map(int, input().split()))
	odd = 0
	even = 0
	for elem in lst:
		if elem % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd % 2 == 1:
		print('YES')
	elif odd == 0:
		print('NO')
	elif even > 0:
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	L = list(map(int, input().split()))
	L.sort()
	c = len(L)
	for i in range(N):
		for j in range(i + 1, N):
			if abs(L[i] - L[j]) <= 1:
				if L[i] <= L[j]:
					c -= 1
					break
				else:
					c -= 1
					break
			else:
				break
	if c <= 1:
		print('YES')
	else:
		print('NO')


def check_arr(arr):
	if sum(arr) % 2 != 0:
		return 'YES'
	oddcount = 0
	for x in arr:
		if x % 2 != 0:
			oddcount += 1
	if oddcount < len(arr) and oddcount != 0:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(check_arr(arr))


def main():
	for _ in range(int(input())):
		__ = int(input())
		x = list(map(int, input().split()))
		if all((num % 2 == 0 for num in x)) or (len(x) % 2 == 0 and all((num % 2 != 0 for num in x))):
			print('NO')
		else:
			print('YES')
main()


for _ in range(int(input())):
	input()
	nums = sorted(map(int, input().split()))
	ret = True
	for x in range(1, len(nums)):
		if nums[x] - nums[x - 1] > 1:
			ret = False
			break
	print('Yes' if ret else 'No')


import math
T = int(input())
for i in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	d = False
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			print('NO')
			d = True
			break
	if not d:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	flag = 0
	if n == 1:
		print('YES')
		continue
	for j in range(0, n - 1):
		if abs(li[j] - li[j + 1]) > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


a = int(input())
ans = []
for i in range(a):
	b = int(input())
	l = list(map(int, input().split()))
	ch = 0
	nc = 0
	for j in range(b):
		if l[j] % 2 == 0:
			ch += 1
		else:
			nc += 1
	if nc > 0:
		if ch > 0:
			ans.append('YES')
		elif nc % 2 != 0:
			ans.append('YES')
		else:
			ans.append('NO')
	else:
		ans.append('NO')
for i in range(a):
	print(ans[i])


def func():
	n = int(input())
	a = sorted(list(map(int, input().split())))
	i = 0
	b = a
	while i < n - 1:
		if abs(a[i] - a[i + 1]) > 1:
			return 'NO'
		i += 1
	return 'YES'
for _ in range(int(input())):
	print(func())


def solve(a):
	n_odd = sum((1 for x in a if x % 2 == 1))
	n_even = sum((1 for x in a if x % 2 == 0))
	assert n_even + n_odd == len(a)
	if n_even and n_odd:
		return True
	if not n_even and n_odd % 2 == 1:
		return True
	return False
n = int(input())
for _ in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	res = solve(a)
	print('YES' if res else 'NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	m = 0
	e = 0
	b = set(a)
	if sum(a) % 2 == 1:
		print('YES')
		continue
	for i in b:
		if i % 2 == 0:
			e += 1
		else:
			m += 1
		if m > 0 and e > 0:
			print('YES')
			break
	if m < 1 or e < 1:
		print('NO')


def nod(a, b):
	while a != b:
		(a, b) = (max(a, b), min(a, b))
		if a % b == 0:
			a -= (a // b - 1) * b
		else:
			a -= a // b * b
	return a
for t in range(int(input())):
	n = int(input())
	a = list(sorted([int(x) for x in input().split()]))
	res = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			res = False
			break
	print('YES' if res else 'NO')


import sys
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	a = True
	l.sort()
	i = 1
	while i < n:
		if abs(l[i - 1] - l[i]) <= 1:
			i = i + 1
		else:
			print('NO')
			a = False
			break
	if a:
		print('YES')


rest = int(input())
while rest:
	np = int(input())
	l = list(map(int, input().split()))
	l.sort()
	io = []
	for i in range(len(l) - 1):
		s = l[i + 1] - l[i]
		io.append(s)
	c = 0
	for i in io:
		if i > 1:
			c = 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')
	rest -= 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	cev = 0
	codd = 0
	for i in range(n):
		if l[i] % 2 == 0:
			cev += 1
		else:
			codd += 1
	if s % 2 != 0:
		print('YES')
	elif cev > 0 and codd > 0:
		print('YES')
	else:
		print('NO')


n = int(input())
while n > 0:
	count = 0
	z = int(input())
	l = input()
	k = [int(n) for n in l.split()]
	k.sort()
	if z > 1:
		for i in range(1, z):
			if abs(k[i] - k[i - 1]) <= 1:
				count += 1
			else:
				break
		if count + 1 == z:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
	n = n - 1


test_case = int(input())
for _ in range(test_case):
	n = int(input())
	a = list(map(int, input().split()))
	temp = sum([1 for i in a if i % 2 == 0]) == n
	temp1 = sum([1 for i in a if i % 2 == 1]) == n
	if temp or (temp1 and n % 2 == 0):
		print('NO')
		continue
	print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(sorted(set(map(int, input().split()))))
	l = len(a)
	print('Yes' if a[-1] - a[0] + 1 == l else 'No')


test = int(input())
for t in range(test):
	n = int(input())
	arr = list(sorted(map(int, input().split())))
	valid = True
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	n = sInt()
	a = lInt()
	a.sort()
	b = 1
	for i in range(1, n):
		if a[i] - a[i - 1] == 0 or a[i] - a[i - 1] == 1:
			pass
		else:
			b = 0
			break
	if b == 1:
		print('YES')
	else:
		print('NO')


def solve(arr):
	mn = min(arr)
	mx = max(arr)
	for i in range(mn, mx + 1):
		if i not in arr:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = input()
	arr = list(map(int, input().split()))
	result = solve(arr)
	print(result)


t = int(input())
while t > 0:
	t -= 1
	n = input()
	n = None
	a = input().split(' ')
	n = 0
	for _ in a:
		a[n] = int(_)
		n += 1
	a.sort()
	n = 0
	check = 0
	while n < len(a) - 1:
		if a[n + 1] - a[n] > 1:
			check += 1
		n += 1
	if check == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	t = int(input())
	arr = []
	str_ = input()
	for j in str_.split(' '):
		arr.append(int(j))
	a = False
	arr = sorted(arr)
	for j in range(t - 1):
		if arr[j + 1] - arr[j] > 1:
			a = True
	if a:
		print('NO')
	else:
		print('YES')


n = int(input())
for ni in range(n):
	run = 1
	m = int(input())
	t = [int(z) for z in input().split()]
	t.sort()
	while run == 1:
		if len(t) == 1:
			run = 0
		else:
			diff = t[1] - t[0]
			if diff >= 0 and diff <= 1:
				del t[0]
			else:
				run = 0
	if len(t) == 1:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


n = int(input())
s = [[int(input()), list(map(int, input().split()))] for i in range(n)]
t = [sorted(x[1]) for x in s]
for v in t:
	ans = 'Yes'
	for j in range(len(v) - 1):
		if v[j + 1] - v[j] > 1:
			ans = 'NO'
			break
	print(ans)


for tc in range(int(input())):
	n = int(input())
	lis = [int(i) for i in input().split()]
	s = sum(lis)
	if s % 2 != 0:
		print('YES')
	else:
		ec = 0
		oc = 0
		for i in lis:
			if i % 2 == 0:
				ec += 1
			else:
				oc += 1
		if ec > 0 and oc > 0:
			print('YES')
		else:
			print('NO')


def odd_sum(a, n):
	even = odd = 0
	for i in range(n):
		if int(a[i] % 2) == 0:
			even += 1
		else:
			odd += 1
	if even == n:
		return 0
	if int(odd % 2) != 0:
		return 1
	if int(odd % 2) == 0:
		if odd == n:
			return 0
		elif even >= 1 and odd > 1:
			return 1
n = int(input())
for i in range(n):
	s = int(input())
	a = list(map(int, input().split()))
	res = odd_sum(a, s)
	if res == 0:
		print('NO', end='\n')
	else:
		print('YES', end='\n')


t = int(input())
answers = []
for i in range(t):
	ok = 1
	yep = 0
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		answers.append('YES')
		yep = 1
	else:
		for j in range(n - 1):
			if abs(a[j] - a[j + 1]) > 1:
				ok = 0
				break
	if ok == 1 and yep == 0:
		answers.append('YES')
	elif ok == 0 and yep == 0:
		answers.append('NO')
for k in range(t):
	print(answers[k])


def odd_sum(array, n):
	(odd_count, even_count) = (0, 0)
	for j in array:
		if j % 2 == 0:
			even_count += 1
		else:
			odd_count += 1
	if odd_count == 0 and even_count != 0:
		return 'NO'
	if odd_count != 0 and even_count != 0:
		return 'YES'
	if even_count == 0 and odd_count % 2 == 1:
		return 'YES'
	if even_count == 0 and odd_count % 2 == 0:
		return 'NO'
	return 'NO'
for i in range(int(input())):
	n = int(input())
	array = list(map(int, input().strip().split(' ')))
	print(odd_sum(array, n))


a = int(input())
for item in range(a):
	b = int(input())
	lst = [int(i) for i in input().split()]
	lst.sort()
	if b == 1:
		print('YES')
	else:
		for u in range(1, b):
			if abs(lst[u - 1] - lst[u]) > 1:
				print('NO')
				break
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	lis = sorted(map(int, input().split()))
	dif = lis[-1] - lis[0]
	if len(set(lis)) == dif + 1:
		print('YES')
	else:
		print('NO')


t = input()

def remove_smallest():
	n = int(input())
	list_num = [int(element) for element in input().split(' ')]
	list_num.sort()
	ans = 'YES'
	for i in range(n - 1):
		if list_num[i] == list_num[i + 1] or list_num[i] == int(list_num[i + 1]) - 1:
			ans = 'YES'
		else:
			ans = 'NO'
			break
	print(ans)
for a in range(int(t)):
	remove_smallest()


import copy
import sys
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve(n, a):
	b = sorted(a)
	c = list(zip(b, b[1:]))
	for x in c:
		if x[1] - x[0] > 1:
			print('NO')
			return False
	print('YES')
	return True
t = int(input())
for i in range(t):
	n = int(input())
	a = [int(n) for n in input().split()]
	solve(n, a)


x = int(input())
for i in range(x):
	y = int(input())
	l = []
	z = input().split()
	c = 1
	for j in z:
		j = int(j)
		l.append(j)
	l.sort()
	for i in range(y - 1):
		if abs(l[i] - l[i + 1]) <= 1:
			c += 1
	if c == y:
		print('YES')
	else:
		print('NO')


out = []
for i in range(int(input())):
	size = input()
	arr = [int(x) for x in input().split()]
	count_odd = 0
	count_even = 0
	for a in arr:
		if a % 2 == 0:
			count_even += 1
		else:
			count_odd += 1
	if count_odd == 0:
		out.append('No')
	elif count_odd % 2 == 0:
		if count_even >= 1:
			out.append('YES')
		else:
			out.append('NO')
	else:
		out.append('YES')
for o in out:
	print(o)


import sys
input = lambda : sys.stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	n = INT()
	l = sorted(mp())
	ans = 0
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			print('NO')
			ans = 1
			break
	if ans == 0:
		print('YES')


test = int(input())
for _ in range(test):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	seta = set(arr)
	if len(seta) == 1:
		print('YES')
	else:
		mini = min(arr)
		maxi = max(arr)
		flag = True
		for i in range(mini, maxi + 1):
			if i not in seta:
				flag = False
				break
		if flag:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	x = int(input())
	l = list(map(int, input().split()))
	e = 0
	for j in l:
		if j % 2 == 0:
			e += 1
	if e == x or (x % 2 == 0 and e == 0):
		print('NO')
	else:
		print('YES')


def solution(a):
	l = list(set(a))
	l.sort()
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			c = 1
			print('NO')
			return ()
	print('YES')
for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	solution(l)


def gameNEw(a, length):
	a = list(set(a))
	a.sort()
	i = 0
	poss = 0
	while len(a) != 1:
		if abs(a[i] - a[i + 1]) <= 1:
			a.remove(a[i])
		else:
			return 'NO'
	return 'YES'
n = int(input())
ans = []
for i in range(n):
	length = int(input())
	a = list(map(int, input().split()))
	ans.append(gameNEw(a, length))
for i in ans:
	print(i)


from sys import stdin
ip = stdin.readline
for _ in range(int(ip())):
	n = int(ip())
	a = list(map(int, ip().split()))
	a.sort()
	f = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			f = False
			break
	print('YES' if f else 'NO')


def p1(n, lst):
	if n == 1:
		return 'YES'
	else:
		a = sorted(lst)
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				return 'NO'
		return 'YES'

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		lst = list(map(int, input().split()))
		print(p1(n, lst))
main()


n = int(input())
for i in range(n):
	q = int(input())
	l = list(map(int, input().split()))
	(a, b) = (0, 0)
	for j in range(q):
		if l[j] % 2 == 0:
			a += 1
		else:
			b += 1
	if a == 0 and q % 2 == 0 or b == 0 or (q == 1 and l[0] % 2 == 0):
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = list(set(a))
	if max(a) - min(a) + 1 <= len(a):
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	arr = []
	arr = list(map(int, input().split()))
	arr.sort()
	while len(arr) > 1:
		if arr[1] - arr[0] <= 1:
			arr.pop(0)
		else:
			print('NO')
			return
	print('YES')

def main():
	t = int(input())
	while t:
		solve()
		t -= 1
main()


tot = int(input().strip())
while tot > 0:
	n = int(input().strip())
	a = sorted([int(x) for x in input().strip().split(' ')])
	tot -= 1
	ok = True
	for i in range(1, len(a)):
		if abs(a[i] - a[i - 1]) > 1:
			print('NO')
			ok = False
			break
	if ok:
		print('YES')


for _ in range(int(input())):
	r = int(input())
	a = list(map(int, input().strip().split()))
	a.sort()
	diff = 0
	for i in range(r - 1):
		t = abs(a[i] - a[i + 1])
		diff = max(t, diff)
	if diff <= 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	num = int(input())
	l = list(map(int, input().split()))
	odd = 0
	even = 0
	for k in range(num):
		if l[k] & 1 != 0:
			odd += 1
		else:
			even += 1
	if odd == 0 or (odd % 2 == 0 and even == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	k = int(input())
	l = list(map(int, input().split()))
	if k == 1:
		print('YES')
	else:
		l.sort()
		c = 0
		for i in range(k - 1):
			if abs(l[i] - l[i + 1]) <= 1:
				c = 1
			else:
				c = 0
				break
		if c:
			print('YES')
		else:
			print('NO')


def solution(A):
	A.sort()
	n = len(A)
	ans = n
	for i in range(1, n):
		if A[i] - A[i - 1] <= 1:
			ans -= 1
	return ans == 1
T = int(input())
for _ in range(T):
	n = int(input())
	A = list(map(int, input().split()))
	res = solution(A)
	print('YES' if res else 'NO')


for ifregrebgggggggggggg in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	c = 0
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			c += 1
	if c != 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for k in range(t):
	l = int(input())
	a = input()
	a = [int(e) for e in a.split(' ')]
	a.sort()
	f = False
	for i in range(l - 1):
		if abs(a[i] - a[i + 1]) > 1:
			f = True
			break
	if f:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	f = 1
	for i in range(n - 1):
		if abs(arr[i + 1] - arr[i]) > 1:
			print('NO')
			f = 0
			break
	if f:
		print('YES')


import sys

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

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

def input():
	return sys.stdin.readline().strip()
t = int(input())
for tt in range(t):
	n = int(input())
	arr = get_array()
	a1 = int(0)
	a2 = int(0)
	for v in arr:
		if v % 2 == 1:
			a1 += 1
		else:
			a2 += 1
	if a1 > 0 and a2 > 0:
		print('YES')
	elif a1 % 2 == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	count = 0
	ar = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if ar[i + 1] - ar[i] > 1:
			print('NO')
			count = 1
			break
	if count == 0:
		print('YES')


for _ in ' ' * int(input()):
	a = int(input())
	ans = 0
	b = sorted(map(int, input().split()))
	for i in range(a - 1):
		if b[i + 1] - b[i] > 1:
			ans = 1
			break
	if ans == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	t = int(input())
	c = list(map(int, input().split()))
	c = sorted(c)
	flag = 0
	for j in range(t - 1):
		if c[j + 1] - c[j] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


test_cases = int(input())
for e in range(test_cases):
	n = int(input())
	elements = list(map(int, input().split()))
	elements.sort()
	ans = 'YES'
	for i in range(n - 1):
		if elements[i + 1] - elements[i] > 1:
			ans = 'NO'
			break
	print(ans)


for j in range(int(input())):
	x = int(input())
	A = sorted(list(map(int, input().split())))
	bool = 'YES'
	for i in range(x - 1):
		if A[i + 1] - A[i] > 1:
			bool = 'NO'
	print(bool)


import sys

def check_arr(arr):
	if sum(arr) % 2:
		return 'YES'
	(even, odd) = (0, 0)
	for i in arr:
		if i % 2:
			odd = 1
		else:
			even = 1
		if odd and even:
			return 'YES'
	return 'NO'
n = 1
n = int(sys.stdin.readline())
for i in range(n):
	sys.stdin.readline()
	arr = list(map(int, sys.stdin.readline().split()))
	print(check_arr(arr))


n = int(input())
for t in range(n):
	l = int(input())
	arr = map(int, input().split())
	temp = 0
	cnt = 0
	for x in arr:
		if x % 2 == 1:
			temp = 1
			cnt = cnt + 1
	if l % 2 == 0:
		if l == cnt:
			print('NO')
		elif temp == 1:
			print('YES')
		else:
			print('NO')
	elif temp == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	s = int(input())
	q = list(map(int, input().split()))
	a = False
	b = False
	d = False
	for i in range(s):
		if q[i] % 2 == 0:
			a = True
		else:
			b = True
		if a and b:
			d = True
			print('YES')
			break
	if s % 2 != 0 and a == False and (b == True):
		print('YES')
	elif d == False:
		print('NO')


def solve(array):
	odd_count = 0
	even_count = 0
	for num in array:
		if num % 2 == 0:
			even_count += 1
		else:
			odd_count += 1
	if odd_count == 0:
		return 'NO'
	if odd_count % 2 == 0 and even_count > 0 or odd_count % 2 != 0:
		return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	array = list(map(int, input().split()))
	print(solve(array))


for _ in range(int(input())):
	N = int(input())
	a = list(map(int, input().split()))
	sum_ = 0
	for i in range(N):
		sum_ += a[i]
	if sum_ % 2 == 1:
		print('YES')
	else:
		(even, odd) = (False, False)
		for i in range(N):
			if a[i] % 2 == 1:
				odd = True
			else:
				even = True
		if not even or not odd:
			print('NO')
		else:
			print('YES')


import sys
import os

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

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

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

def take_input():
	if os.environ.get('check'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
take_input()
for _ in range(int(input())):
	n = int(input())
	arr = sorted(int_array())[::-1]
	ans = 'Yes'
	for i in range(n - 1):
		if arr[i] - arr[i + 1] > 1:
			ans = 'No'
			break
	print(ans)


t = int(input())
for i in range(t):
	a = int(input())
	b = list(map(int, input().split(' ')))
	sum = 0
	(odd, even) = (False, False)
	for i in b:
		sum += i
		odd = odd | (i % 2 == 0)
		even = even | (i % 2 != 0)
	if sum % 2 != 0 or (odd and even):
		print('YES')
	else:
		print('NO')


t = int(input().strip())
for _ in range(t):
	n = int(input().strip())
	alist = list(map(int, input().split()))
	c = 0
	for a in alist:
		if a % 2:
			c += 1
	if c and (c % 2 or c != n):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = [int(s) for s in input().split()]
	k = 0
	for item in a:
		if item % 2 != 0:
			k = k + 1
	if k == 0:
		print('NO')
	elif k == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


n = 0
v = []

def solve():
	v.sort()
	d = 0
	for i in range(1, len(v)):
		if v[i] - v[i - 1] > 1:
			return 'No'
	return 'YES'
T = int(input())
for x in range(1, T + 1):
	n = int(input())
	v = [int(n) for n in input().split()]
	res = solve()
	print(res)


import re
t = int(input())
for i in range(t):
	n = input()
	x = list(map(int, input('').strip().split()))
	x.sort()
	flag = 0
	for j in range(len(x) - 1):
		if abs(x[j] - x[j + 1]) > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


import sys, math

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

def main():
	q = int(input())
	for _ in range(q):
		n = int(input())
		a = list(map(int, input().split()))
		t = sum(a)
		(f, g) = (0, 0)
		for e in a:
			if e % 2 == 0:
				f = 1
			else:
				g = 1
		if t % 2 == 1 or f * g > 0:
			print('YES')
		else:
			print('NO')
main()


for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split()))
	val = 0
	x = 0
	y = 0
	for i in range(len(A)):
		val += A[i]
		if A[i] % 2 == 0:
			x += 1
		else:
			y += 1
	if val % 2 == 0:
		if x > 0 and y > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for i in range(int(input())):
	l = int(input())
	a = list(map(int, input().split()))
	sa = sorted(a)
	if any((sa[i + 1] - sa[i] > 1 for i in range(l - 1))):
		print('NO')
	else:
		print('YES')


def remove_smallest(elements):
	if len(elements) == 0:
		return 'NO'
	elif len(elements) == 1:
		return 'YES'
	elements.sort()
	for i in range(len(elements) - 1):
		if abs(elements[i + 1] - elements[i]) <= 1:
			continue
		return 'NO'
	return 'YES'
number_banks = int(input())
for _ in range(number_banks):
	num_elem_in_bank = input()
	bank = [int(el) for el in input().split(' ')]
	print(remove_smallest(bank))


kl = int(input())
for l in range(kl):
	n = int(input())
	s = [int(i) for i in input().split()]
	prn = 1
	prc = 1
	if n % 2 != 0:
		for i in range(n):
			if s[i] % 2 != 0:
				print('YES')
				prn = 0
				break
		if prn:
			print('NO')
	else:
		a = s[0] % 2
		for i in range(1, n):
			if s[i] % 2 != a:
				print('YES')
				prc = 0
				break
		if prc:
			print('NO')


T = int(input())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	flag = 0
	a.sort()
	for i in range(1, n):
		if abs(a[i - 1] - a[i]) > 1:
			flag = 1
			break
	if flag == 0:
		print('Yes')
	else:
		print('No')


def main():
	test = int(input())
	for _ in range(test):
		n = int(input())
		arr = list(map(int, input().split()))
		arr.sort()
		if len(arr) == 1:
			print('YES')
		else:
			mx = 0
			for i in range(n - 1):
				mx = max(mx, abs(arr[i + 1] - arr[i]))
			if mx > 1:
				print('NO')
			else:
				print('YES')
main()


cases = int(input())
for i in range(cases):
	lenth = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	pri = 'YES'
	for j in range(lenth - 1):
		if lenth == 1:
			pri = 'YES'
		elif arr[j + 1] - arr[j] > 1:
			pri = 'NO'
			break
	print(pri)


t = int(input())
for _ in range(t):
	n = int(input())
	(*arr,) = map(int, input().split())
	odd = -1
	even = -1
	count_odd = 0
	count_even = 0
	for i in range(n):
		if arr[i] % 2 == 1:
			count_odd += 1
			odd = i
		else:
			count_even += 1
			even = i
	if count_odd == -1:
		print('NO')
	elif count_odd % 2 == 1:
		print('YES')
	else:
		for i in range(odd):
			if arr[i] % 2 == 0:
				print('YES')
				break
		else:
			for i in range(even):
				if arr[i] % 2 == 1:
					print('YES')
					break
			else:
				print('NO')


for _ in range(int(input())):
	n = int(input())
	a = []
	od = 0
	even = 0
	s = [*map(int, input().split())]
	for i in s:
		a.append(i)
	s = sum(a)
	for j in a:
		if j % 2 == 0:
			even += 1
		else:
			od += 1
	if s % 2 == 1:
		print('Yes')
	elif even == n:
		print('NO')
	elif od == n:
		print('NO')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	m = int(input())
	p = list(map(int, input().split()))
	if sum(p) % 2 != 0:
		print('YES')
	else:
		s = 0
		f = 0
		for j in range(len(p)):
			if p[j] % 2 != 0:
				s = 1
			else:
				f = 1
		if s - f == 0:
			print('YES')
		else:
			print('NO')


for u in range(int(input())):
	n = int(input())
	x = [int(w) for w in input().split()]
	x = sorted(x)
	f = True
	for i in range(1, n):
		if x[i] - x[i - 1] >= 2:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
from os import path
if path.exists('inp.txt'):
	stdin = open('inp.txt', 'r')
q = int(stdin.readline())
for _ in range(q):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	chan = 0
	le = 0
	for i in range(n):
		if a[i] % 2 == 1:
			le += 1
		else:
			chan += 1
	if le >= 1 and chan >= 1:
		print('YES')
	elif chan == 0 and n % 2 == 1:
		print('YES')
	else:
		print('NO')


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

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

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

def instr():
	s = input()
	return list(s[:len(s)])

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

def main():
	t = inp()
	for _ in range(t):
		n = inp()
		a = inlist()
		a = sorted(a)
		f = True
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				f = False
				break
		if f:
			print('YES')
		else:
			print('NO')
main()


import sys
input = sys.stdin.readline
t = int(input())
for ti in range(t):
	n = int(input())
	exi = [False] * 101
	arr = list(map(int, input().split()))
	for v in arr:
		exi[v] = True
	mi = min(arr)
	ma = max(arr)
	ok = True
	for i in range(mi, ma + 1):
		if not exi[i]:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


T = int(input())

def find2(arr):
	arr = sorted(arr)
	for i in range(1, len(arr)):
		if abs(arr[i - 1] - arr[i]) >= 2:
			return False
	return True
for _ in range(T):
	N = int(input())
	board = list(map(int, input().split()))
	if find2(board):
		print('YES')
	else:
		print('NO')


for u in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	for i in range(1, n):
		x = abs(l[i] - l[i - 1])
		if x > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


import sys
t = int(sys.stdin.readline())
for testCase in range(t):
	n = int(sys.stdin.readline())
	odd = sum([0 if int(e) % 2 == 0 else 1 for e in sys.stdin.readline().split()])
	even = n - odd
	isDoable = True
	if even == 0 and odd % 2 == 0:
		isDoable = False
	if odd == 0:
		isDoable = False
	print('YES' if isDoable else 'NO')


t = int(input())
for step in range(t):
	n = int(input())
	a = [int(data) for data in input().split()]
	a.sort()
	prev = a[0]
	answer = 'YES'
	for curr in a[1:]:
		if abs(curr - prev) > 1:
			answer = 'NO'
			break
		prev = curr
	print(answer)


for i in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	ret = 'YES'
	for i in range(1, n):
		if arr[i] - arr[i - 1] >= 2:
			ret = 'NO'
	print(ret)


import os
from sys import stdin, stdout

def solve(tc):
	n = int(stdin.readline().strip())
	seq = list(map(int, stdin.readline().split()))
	seq = sorted(seq)
	base = seq[0]
	for i in range(1, n):
		if seq[i] - base > 1:
			print('NO')
			return
		base = seq[i]
	print('YES')
tcs = 1
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


for i in range(int(input())):
	a = input()
	nums = sorted(map(int, input().split()))
	if {nums[i + 1] - nums[i] for i in range(len(nums) - 1)} - {1, 0} == set():
		print('YES')
	else:
		print('NO')


from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce

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

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

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

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

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)))
for _ in range(iinput()):
	n = iinput()
	a = rlinput()
	odd = 0
	for i in a:
		if i % 2:
			odd += 1
	even = n - odd
	if even > 0 and odd > 0:
		print('YES')
	elif even == 0:
		if n % 2:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	lst = input()
	lst = lst.split(' ')
	lst = [int(x) for x in lst]
	lst.sort()
	mx = 0
	x = lst[0]
	for val in lst:
		mx = max(mx, val - x)
		x = val
	if mx > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	count_odd = 0
	for i in a:
		if i % 2 != 0:
			count_odd += 1
	if count_odd == 0:
		print('NO')
	elif count_odd % 2 != 0:
		print('YES')
	elif n - count_odd > 0:
		print('YES')
	else:
		print('NO')


ans = []

def fun(n, arr):
	arr = sorted(arr)
	if len(arr) == 1:
		ans.append('YES')
	else:
		for i in range(len(arr) - 1):
			if abs(arr[i] - arr[i + 1]) <= 1:
				arr[i] = -1
		if arr.count(-1) == len(arr) - 1:
			ans.append('YES')
		else:
			ans.append('NO')
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	fun(n, arr)
for i in ans:
	print(i)


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

def oddsum():
	for _ in range(t):
		n = int(input())
		a = [int(x) for x in input().split()]
		(counto, counte) = (False, False)
		for i in range(n):
			if a[i] % 2 == 0 and (not counte):
				counte = True
			elif a[i] % 2 == 1 and (not counto):
				counto = True
			if counto and counte:
				break
		if counto and counte:
			yield 'YES'
		elif counto and n % 2 == 1:
			yield 'YES'
		else:
			yield 'NO'
t = int(input())
ans = oddsum()
print(*ans, sep='\n')


t = int(input())
for t1 in range(t):
	n = int(input())
	a = [int(n1) for n1 in input().split()]
	a = sorted(a)
	count = 0
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			pass
		else:
			count = 1
			break
	if count == 1:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
import collections
import itertools
import operator
import functools

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

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

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

def si():
	return stdin.readline()
for _ in range(ii()):
	n = ii()
	l1 = li()
	o = 0
	e = 0
	sum1 = 0
	for i in l1:
		sum1 += i
		if i & 1:
			o += 1
		else:
			e += 1
	if sum1 & 1:
		print('YES')
	elif e == 0 or o == 0:
		print('NO')
	else:
		print('YES')


y = int(input())
for i in range(y):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		print('YES')
		continue
	a.append(a[-1])
	f = 0
	for j in range(n):
		if a[j + 1] - a[j] > 1:
			f = 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')


t = int(input().strip())
for case in range(t):
	n = int(input().strip())
	data = list(map(int, input().strip().split()))
	(a, b, s) = (0, 0, 0)
	for i in range(0, n):
		if data[i] % 2 == 0:
			a = 1
		else:
			b = 1
		s += data[i]
	if a + b == 2:
		print('YES')
	elif s % 2 == 1:
		print('YES')
	else:
		print('NO')


def ans():
	c = 0
	a.sort()
	while len(a) >= 2:
		if abs(a[0] - a[1]) <= 1:
			a.remove(min(a[0], a[1]))
			c += 1
		else:
			return 'NO'
			break
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(ans())


for _ in range(int(input())):
	n = int(input())
	arr = [int(a) for a in input().strip().split(' ')]
	arr.sort()
	flag = True
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	fla = 0
	cnt = 0
	for i in arr:
		if i % 2 != 0:
			fla = 1
			cnt += 1
	if cnt == n and n % 2 == 0:
		fla = 0
	if fla == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	s = sum(arr)
	hasodd = any((x % 2 == 1 for x in arr))
	haseven = any((x % 2 == 0 for x in arr))
	if hasodd and haseven or s % 2 == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	while i < len(a) - 1:
		if a[i + 1] - a[i] <= 1:
			del a[i]
			i = 0
		else:
			i += 1
	if len(a) == 2:
		if a[1] - a[0] <= 1:
			del a[0]
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


import sys
inint = lambda : int(sys.stdin.readline())
inintm = lambda : map(int, sys.stdin.readline().split())
inintl = lambda : list(inintm())
instrm = lambda : map(str, sys.stdin.readline().split())
instrl = lambda : list(instrm())
t = inint()
for _ in range(t):
	n = inint()
	A = inintl()
	A.sort()
	d = A[0]
	for i in range(1, n):
		if abs(d - A[i]) > 1:
			print('NO')
			break
		else:
			d = A[i]
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd = False
	cnt = 0
	for e in a:
		if e % 2 == 1:
			odd = True
			cnt = cnt + 1
	if cnt == n and n % 2 != 0:
		print('YES')
	elif cnt != n and odd:
		print('YES')
	else:
		print('NO')


from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	d = Counter(l)
	d = sorted(list(d.keys()))
	flag = 0
	for i in range(len(d) - 1):
		if d[i + 1] != d[i] + 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


from math import *
t = int(input())
while t > 0:
	n = int(input())
	c = n
	lst = [int(i) for i in input().split()]
	lst.sort()
	for i in range(n - 1):
		if abs(lst[i] - lst[i + 1]) <= 1:
			c -= 1
	if c == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


def main():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] >= 2:
			print('No')
			return
	print('Yes')
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
	return
test()


for i in range(int(input())):
	l = int(input())
	num = sorted(map(int, input().split()))
	ans = 1
	for i in range(l - 1):
		if abs(num[i] - num[i + 1]) > 1:
			ans = 0
			break
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n):
		if len(arr) == 1:
			print('YES')
			break
		elif arr[1] - arr[0] <= 1:
			arr.pop(0)
		else:
			print('NO')
			break


for _ in range(int(input())):
	c = 0
	c1 = 0
	n = int(input())
	j = list(map(int, input().split()))
	for v in j:
		if v % 2 == 0:
			c += 1
		else:
			c1 += 1
	if c1 > 0 and c > 0 or c1 % 2 == 1:
		print('YES')
	else:
		print('NO')


tests = int(input())
for test in range(tests):
	n = int(input())
	A = list(set(map(int, input().split())))
	A.sort()
	if n == 1:
		print('YES')
	elif n == 1:
		print('NO')
	else:
		ans = True
		for i in range(1, len(A)):
			if abs(A[i] - A[i - 1]) != 1:
				ans = False
		if ans:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		print('Yes')
		continue
	odd = False
	even = False
	for i in a:
		if i % 2 == 1:
			odd = True
		else:
			even = True
	print('Yes' if even and odd else 'No')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(list(set(map(int, input().split()))))
	if len(a) <= 1:
		print('YES')
		continue
	count = 0
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			count += 1
	if count >= 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for x in range(t):
	a = int(input())
	almenounpari = False
	almenoundispari = False
	somma = 0
	L = list(map(int, input().split()))
	for elemento in L:
		if elemento % 2 == 0:
			almenounpari = True
		else:
			almenoundispari = True
		somma += elemento
	if somma % 2 == 1:
		print('YES')
	elif somma % 2 == 0 and almenounpari == True and (almenoundispari == True):
		print('YES')
	else:
		print('NO')


test = int(input())
while test:
	n = int(input())
	arr = input().split(' ')
	sum = 0
	odd = 0
	even = 0
	for i in arr:
		tmp = int(i)
		if tmp % 2 != 0:
			odd += 1
		else:
			even += 1
		sum += tmp
	if sum % 2:
		print('YES')
	elif odd != 0 and even != 0:
		print('YES')
	else:
		print('NO')
	test -= 1


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	cho = 0
	che = 0
	for i in a:
		if i % 2 == 1:
			cho = 1
		else:
			che = 1
	if cho == 1:
		if che == 1:
			print('YES')
		elif n % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	m = int(input())
	a = set(map(int, input().split()))
	print('YES' if max(a) - min(a) < len(a) else 'NO')


for i in range(int(input())):
	n = int(input())
	ok = True
	lista = list(map(int, input().split()))
	lista = sorted(lista)
	for j in range(1, n):
		if abs(lista[j] - lista[j - 1]) > 1:
			ok = False
			break
	if ok == True:
		print('YES')
	else:
		print('NO')


def readn():
	return int(input())

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

def readnos():
	return map(int, input().split())
for _ in range(readn()):
	n = int(input())
	a = readlist()
	a.sort()
	f = 1
	for i in range(0, n - 1):
		if a[i + 1] - a[i] > 1:
			f = 0
			break
	if f == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	llist = list(map(int, input().split()))
	llist.sort()
	u = 0
	temp = 0
	while u < n - 1:
		if llist[u + 1] - llist[u] <= 1:
			temp += 1
		u += 1
	if temp == n - 1:
		print('YES')
	else:
		print('NO')


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


def ans(l, n):
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
while t:
	n = int(input())
	l = [int(x) for x in input().split()]
	l = sorted(list(set(l)))
	print(ans(l, len(l)))
	t -= 1


def check(N, array):
	for i in range(1, N):
		if array[i] - array[i - 1] > 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	N = int(input())
	array = sorted([int(x) for x in input().split()])
	print(check(N, array))


testCases = int(input())
while testCases > 0:
	elements = int(input())
	values_str = str(input())
	values = [int(x) for x in values_str.split()]
	(even_count, odd_count, summation) = (0, 0, 0)
	for i in values:
		if i % 2 != 0 or i == 1:
			odd_count += 1
		else:
			even_count += 1
		summation += i
	if summation % 2 != 0 or summation == 1:
		print('YES')
	elif odd_count != 0 and even_count != 0:
		print('YES')
	else:
		print('NO')
	testCases -= 1


def sid():
	f = 1
	s = 'abcd'
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	sid()
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')


t = int(input())
temp = []
sizes = []
elements = []
odd = False
even = False
for i in range(t):
	sizes.append(int(input()))
	temp = input().split()
	elements.append(temp)
	temp = []
for i in range(t):
	for j in range(sizes[i]):
		if int(elements[i][j]) % 2 == 1:
			odd = True
		else:
			even = True
		if odd == True and even == True:
			break
	if odd == True and even == False and (sizes[i] % 2 == 0):
		print('NO')
	elif odd == True and even == False and (sizes[i] % 2 == 1):
		print('YES')
	elif odd == True and even == True:
		print('YES')
	elif odd == False:
		print('NO')
	odd = False
	even = False


def counteven(l):
	c = 0
	for i in l:
		if i % 2 == 0:
			c += 1
	return c

def countodd(l):
	c1 = 0
	for i in l:
		if i % 2 != 0 or i == 1:
			c1 += 1
	return c1
t = int(input())
for i in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	if sum(l) % 2 != 0 or sum(l) == 1:
		print('YES')
	elif sum(l) % 2 == 0:
		a = counteven(l)
		b = countodd(l)
		if a != 0 and b != 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for j in range(0, t):
	n = int(input())
	numbers = input()
	numbers = numbers.split(' ')
	numbers = [int(j) for j in numbers]
	numbers.sort()
	if n == 1:
		print('YES')
		continue
	for i in range(0, n - 1):
		if numbers[i] + 1 < numbers[i + 1]:
			print('NO')
			break
		if i == n - 2:
			print('YES')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	i = 0
	a.sort()
	while i < n - 1:
		if abs(a[i] - a[i + 1]) <= 1:
			if a[i] <= a[i + 1]:
				a.pop(i)
				n -= 1
				i -= 1
			elif a[i + 1] < a[i]:
				a.pop(i + 1)
				n -= 1
				i -= 1
		i += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

def test():
	n = int(input())
	l = sorted(list(map(int, input().split())))
	if any((abs(l[i] - l[i - 1]) > 1 for i in range(1, n))):
		return 'NO'
	else:
		return 'YES'
t = int(input())
for _ in range(t):
	print(test())


for i in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	ans = 'Yes'
	if sum(a) % 2 == 0:
		num = 0
		for j in range(n):
			if a[j] % 2 != 0:
				num += 1
		if num == n or num == 0:
			ans = 'No'
	print(ans)


t = int(input())
for i in range(t):
	ok = True
	n = int(input())
	data = sorted(list(map(int, input().split())))
	for j in range(n - 1):
		if data[j + 1] - data[j] > 1:
			ok = False
			break
	print('YES' if ok else 'NO')


import sys
input = sys.stdin.buffer.readline
from collections import deque as que, defaultdict as vector
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
INF = float('inf')
testcase = inin()
for Case in range(testcase):
	n = inin()
	a = inar()
	a.sort()
	ans = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans = 'NO'
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	k = list(map(int, input().split()))
	counte = 0
	for i in range(n):
		if k[i] % 2 == 0:
			counte += 1
	if counte == n or (counte == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


from queue import Queue

def fast(arr):
	visited = set()
	q = Queue()
	q.put(0)
	while not q.empty():
		i = q.get()
		if i in visited:
			continue
		visited.add(i)
		for j in range(len(arr)):
			if i == j:
				continue
			if abs(arr[i] - arr[j]) <= 1:
				q.put(j)
	return len(visited) == len(arr)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = list(map(int, input().split()))
		result = fast(arr)
		if result:
			print('YES')
		else:
			print('NO')
main()


def oddSubArray(array):
	i = 0
	while i <= len(array) - 1:
		j = 0
		while j <= len(array):
			if i < j:
				if sum(array[i:j]) % 2 != 0 and j - i != 1:
					print(array[i:j])
					return True
			elif sum(array[j:i]) % 2 != 0 and i - j != 1:
				print(array[j:i])
				return True
			j += 1
		i += 1
	return False

def oddify(array):
	if sum(array) % 2 != 0:
		return True
	impar = False
	par = False
	for i in array:
		if i % 2 == 0:
			par = True
		else:
			impar = True
		if impar == True and par == True:
			return True
	return False
t = int(input())
while t > 0:
	n = int(input())
	numArray = input().split(' ')
	numArray = [int(i) for i in numArray]
	if oddify(numArray):
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	b.sort()
	j = 1
	f = 0
	while j < n:
		if b[j] - b[j - 1] > 1:
			f = 1
			break
		j += 1
	if f == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	leng = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	mark = 0
	for j in range(len(nums) - 1):
		if abs(nums[j + 1] - nums[j]) > 1:
			mark = 1
			break
	if mark == 0:
		print('YES')
	else:
		print('NO')


import math
import sys
import itertools
import random
import bisect
import heapq
import collections

def lcm(x, y):
	return x * y // math.gcd(x, y)

def hcf(x, y):
	return math.gcd(x, y)

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

def primeFactors(n):
	res = []
	while n % 2 == 0:
		res.append(2)
		n //= 2
	for i in range(3, math.sqrt(n) + 1, 2):
		while n % i == 0:
			res.append(i)
			n //= i
	if n > 2:
		res.append(n)
	return res
for _ in range(0, int(input())):
	n = int(input())
	l = list(map(int, input().strip().split()))
	l.sort()
	flag = 0
	for i in range(0, n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(od, ev) = (0, 0)
	for i in range(n):
		if a[i] & 1:
			od += 1
		else:
			ev += 1
	if od == 0:
		print('NO')
		continue
	if od & 1:
		print('YES')
	elif ev > 0:
		print('YES')
	else:
		print('NO')


def binarySearch(sequence, value):
	(low, high) = (0, len(sequence) - 1)
	while low <= high:
		mid = (low + high) // 2
		if sequence[mid] < value:
			low = mid + 1
		elif value < sequence[mid]:
			high = mid - 1
		else:
			return mid
	return -1

def findPair(A, diff):
	li = []
	c = 0
	A.sort()
	i = 0
	while i < len(A):
		while i < len(A) - 1 and A[i] == A[i + 1]:
			i = i + 1
			c = c + 1
		if binarySearch(A, A[i] - diff) >= 0:
			c = c + 1
		i = i + 1
	return c
t = int(input())
while t > 0:
	n = int(input())
	li = [int(ele) for ele in input().split()]
	if len(li) - findPair(li, 1) <= 1:
		print('YES')
	else:
		print('NO')
	t = t - 1


n = int(input())
for i in range(n):
	m = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	e = 0
	o = 0
	for i in range(m):
		if l[i] % 2 == 0:
			e += 1
		else:
			o += 1
		if e >= 1 and o >= 1:
			break
	if s % 2 == 1:
		print('YES')
	elif s % 2 == 0 and e >= 1 and (o >= 1):
		print('YES')
	else:
		print('NO')


def f(a):
	pass
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = True
	for i in range(len(a) - 1):
		if a[i] == a[i + 1] or a[i] + 1 == a[i + 1] or a[i] == a[i] + 1:
			continue
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


import functools
import math

def sol(ls):
	v = sum(ls)
	if v % 2:
		return 'YES'
	for i in range(len(ls)):
		for j in range(len(ls)):
			if (v - ls[i] + ls[j]) % 2:
				return 'YES'
	return 'NO'
t = int(input().strip())
for i in range(t):
	_ = int(input().strip())
	ls = list(map(int, input().strip().split()))
	print(sol(ls))


for i in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))[:n]
	switch = True
	lst.sort()
	for j in range(len(lst) - 1):
		if lst[j + 1] - lst[j] > 1:
			switch = False
			break
	if switch:
		print('YES')
	else:
		print('NO')


test = int(input())

def solve():
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] >= 2:
			print('NO')
			return
	print('YES')
while test:
	solve()
	test -= 1


def solve(arr):
	if len(arr) == 1:
		return 'YES'
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			return 'NO'
	return 'YES'
try:
	t = int(input())
	for _ in range(t):
		l = int(input())
		arr = list(map(int, input().split()))
		arr.sort()
		print(solve(arr))
except EOFError:
	pass


from sys import stdin
import sys
tt = int(stdin.readline())
for loop in range(tt):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	a.sort()
	flag = True
	for i in range(n - 1):
		if abs(a[i + 1] - a[i]) > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


output = []
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	diff = []
	count = 1
	arr.sort()
	for i in range(1, len(arr)):
		diff.append(abs(arr[i] - arr[i - 1]))
		if diff[-1] > 1:
			count += 1
	if count <= 1:
		output.append('YES')
	else:
		output.append('NO')
for o in output:
	print(o)


def get_answer(a, n):
	if n == 1:
		return 'YES'
	a = sorted(a)
	cum_diff = [a[i] - a[i - 1] for i in range(1, n)]
	for diff in cum_diff:
		if diff > 1:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	a = map(int, input().split())
	print(get_answer(a, n))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('YES')
	else:
		i = 0
		while i < n:
			if l[i] % 2 == 0:
				a = l[i]
				break
			else:
				i += 1
		if i == n:
			a = 0
		j = 0
		while j < n:
			if l[j] % 2 != 0:
				b = l[j]
				break
			else:
				j += 1
		if j == n:
			b = 0
		if a == 0 or b == 0:
			print('NO')
		else:
			print('YES')


a = int(input())
for i in range(0, a):
	aux = int(input())
	c = list(map(int, input().split(' ')))
	d = True
	for i in range(min(c), max(c)):
		d = i in c
		if d == False:
			break
	if d == True:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(set(map(int, input().split()))))
	flag = 1
	for j in range(len(a) - 1):
		if a[j + 1] - a[j] > 1:
			print('NO')
			flag = 0
			break
	if flag:
		print('YES')


def fun(arr, n):
	for i in range(n - 1):
		if abs(arr[i + 1] - arr[i]) > 1:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if fun(arr, n):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	new = sorted(arr)
	flag = 0
	count = 0
	for i in range(1, len(new)):
		if len(new) > 1:
			sub = abs(new[i] - new[i - 1])
			if sub > 1:
				flag = 1
				break
			else:
				flag = 0
		else:
			flag = 1
	if flag:
		print('NO')
	else:
		print('YES')


def remove(inputList):
	mySet = set(inputList)
	if len(mySet) == 1:
		print('YES')
	else:
		maxElem = max(mySet)
		if maxElem - 1 in mySet:
			mySet.remove(maxElem)
			remove(mySet)
		else:
			print('NO')

def main():
	t = int(input())
	inputList = []
	for i in range(t):
		numOfInput = int(input())
		myList = [int(x) for x in input().strip().split()]
		inputList.append(myList)
	for l in inputList:
		remove(l)
main()


from sys import stdin
input = stdin.readline
for xoxo in range(1):
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		s = sum(a)
		if s % 2 == 1:
			print('YES')
			continue
		else:
			ce = 0
			co = 0
			for i in a:
				if i % 2 == 0:
					ce += 1
				else:
					co += 1
			if ce >= 1 and co >= 1:
				print('YES')
			elif co == n:
				if n % 2 == 0:
					print('NO')
				else:
					print('YES')
			else:
				print('NO')


for _ in range(int(input())):
	n = int(input())
	s = 0
	A = list(map(int, input().split()))
	for i in A:
		s += i % 2
	print('YES' if s % 2 or (s and s < n) else 'NO')


tom = int(input())
for lol in range(tom):
	fog = 0
	neat = int(input())
	a = [int(neat) for neat in input().split()]
	a.sort()
	for i in range(neat - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			fog = 1
			break
		else:
			continue
	if fog == 0:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	l = [int(i) for i in input().split()]
	c = 0
	for i in l:
		if i & 1 == 1:
			c = c + 1
	if c & 1 == 1:
		print('YES')
	elif c > 1 and c & 1 == 0 and (len(l) > c):
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	a = sum(l)
	flag = 0
	flg = 0
	if a % 2 == 0:
		for i in l:
			if i % 2 == 0:
				flag = 1
			elif i % 2 != 0:
				flg = 1
	if flag == 1 and flg == 1:
		print('YES')
	elif a % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	a = list(filter(lambda x: x % 2 != 0, l))
	if len(a) == n and n % 2 == 0:
		print('NO')
	elif len(a) == 0:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	x = int(input())
	k = list(map(int, input().split()))
	if x % 2 == 0:
		(c, d) = (0, 0)
		for i in k:
			if i % 2 == 0:
				c = 1
			else:
				d = 1
			if c == 1 and d == 1:
				break
		if c == 1 and d == 1:
			print('YES')
		elif c == 1 and d == 0 or (c == 0 and d == 1):
			print('NO')
	else:
		c = 0
		for i in k:
			if i % 2 == 1:
				c = 1
				break
		if c == 1:
			print('YES')
		else:
			print('NO')


t = int(input())

def main():
	n = int(input())
	As = list(map(int, input().split()))
	odds = [a % 2 for a in As]
	s = sum(odds)
	if sum(odds) == n and n % 2 == 0 or sum(odds) == 0:
		print('NO')
	else:
		print('YES')
for _ in range(t):
	main()


t = int(input())
for _ in range(t):
	n = input()
	l = [int(x) % 2 for x in input().split()]
	if l.count(0) == len(l):
		print('NO')
	elif l.count(1) == len(l) and len(l) % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	flag = True
	for i in range(0, n - 1):
		if abs(s[i + 1] - s[i]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	an = 'YES'
	for j in range(1, n):
		if a[j] - a[j - 1] > 1:
			an = 'NO'
			break
	print(an)


t = int(input())
while t > 0:
	n = int(input())
	l = [int(i) for i in input().split()]
	l.sort()
	flag = 0
	for i in range(1, len(l)):
		if l[i] - l[i - 1] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


t = int(input())
for x in range(t):
	n = int(input())
	nums = set(map(int, input().split()))
	nums = list(nums)
	nums.sort()
	for i in range(len(nums)):
		if i != 0:
			if abs(nums[i] - nums[i - 1]) == 1:
				nums[i - 1] = -1
	if nums.count(-1) == len(nums) - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	f = 0
	for x in range(n - 1):
		if a[x + 1] - a[x] > 1:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	odd = 0
	for j in range(n):
		if arr[j] & 1:
			odd += 1
	print('YES' if odd % 2 == 1 or (odd < n and odd != 0) else 'NO')


t = int(input())
for case in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	if len(set(a)) == 1 or len(a) == 1:
		print('YES')
	else:
		a.sort()
		if any([x - a[i - 1] > 1 for (i, x) in enumerate(a) if i > 0]):
			print('NO')
		else:
			print('YES')


def resolveProblem():
	length = int(input())
	array = list(map(int, input().split()))
	array.sort()
	j = 0
	while j < length - 1:
		if abs(array[j] - array[j + 1]) <= 1:
			if array[j] <= array[j + 1]:
				array.pop(j)
			else:
				array.pop(j + 1)
			j = 0
			length -= 1
		else:
			j += 1
	if length == 1:
		return 'YES'
	else:
		return 'NO'
n = int(input())
for i in range(n):
	print(resolveProblem())


t = int(input())
for t_qr in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	a.sort()
	s = []
	for i in range(1, len(a)):
		if a[i] - a[i - 1] <= 1:
			s.append(a[i])
	if len(a) - len(s) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = input()
	lis = [int(k) for k in str(input()).split()]
	lis.sort()
	a = lis[0]
	aa = 'YES'
	for k in range(len(lis)):
		if lis[k] - a >= 2:
			aa = 'NO'
			break
		a = lis[k]
	print(aa)


n = int(input())
for i in range(n):
	q = int(input())
	a = list(map(int, input().split()))
	a.sort()
	j = 0
	a = list(set(a))
	a.sort()
	q = len(a)
	while q != 1 and j <= q - 2:
		if abs(a[j + 1] - a[j]) == 1:
			a.remove(a[j])
		else:
			j = j + 1
		q = len(a)
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


for test in range(0, int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	key = 1
	for i in range(0, len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			print('NO')
			key = 0
			break
	if key == 1:
		print('YES')


n = int(input())
for i in range(n):
	m = int(input())
	a = list(map(int, input().split(' ')))
	a.sort()
	j = 0
	k = 1
	if len(a) == 1:
		print('YES')
	else:
		while j < len(a):
			if len(a) == 1:
				break
			if k == len(a):
				break
			k = j + 1
			while k <= len(a) - 1:
				if abs(a[j] - a[k]) <= 1:
					if a[j] < a[k]:
						a.remove(a[j])
						break
					else:
						a.remove(a[k])
						break
				else:
					k += 1
		if len(a) == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
while t:
	t -= 1
	(e, o) = (0, 0)
	input()
	for i in input().split():
		if int(i) % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0:
		print('NO')
	elif o % 2 == 0 and e > 0:
		print('YES')
	elif o % 2 != 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = even = 0
	ans = 'YES'
	for val in a:
		if val % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 0:
		if odd % 2 == 0:
			ans = 'NO'
	elif odd == 0:
		ans = 'NO'
	print(ans)


def remove_smallest():
	t = int(input())
	for iter in range(t):
		n = int(input())
		a_list = list(map(int, input().split()))
		a_list.sort()
		count = 0
		for i in range(n - 1):
			if abs(a_list[i + 1] - a_list[i]) > 1:
				print('NO')
				break
			else:
				count += 1
		if count == n - 1:
			print('YES')
remove_smallest()


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


count = int(input())
for _ in range(count):
	size = int(input())
	data = [int(i) for i in input().split()]
	sortt = sorted(data)
	failed = False
	for i in range(size - 1):
		if sortt[i + 1] - sortt[i] > 1:
			print('NO')
			failed = True
			break
	if not failed:
		print('YES')


n = int(input())

def fun(l):
	l.sort()
	ln = len(l)
	i = 0
	while i < ln:
		if ln > 1:
			j = i + 1
			if j <= ln - 1 and l[j] - l[i] <= 1:
				b = min(l[i], l[j])
				ln -= 1
				l.remove(b)
				i = 0
			else:
				i += 1
		if len(l) == 1:
			return 'YES'
	else:
		return 'NO'
for i in range(n):
	a = int(input())
	a1 = list(map(int, input().split()))
	print(fun(a1))


input_length = int(input())
while input_length != 0:
	arraylength = int(input())
	inp_string = str(input())
	input_length -= 1
	input_array = tuple(inp_string.split())
	input_array = [int(i) for i in input_array]
	input_array = sorted(input_array)
	found = False
	for i in range(0, arraylength - 1):
		if input_array[i + 1] - input_array[i] > 1:
			found = True
			break
	if found:
		print('NO')
	else:
		print('YES')


t = int(input())
index1 = 0
index2 = 1
result = []
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for j in range(len(l)):
		if len(l) == 1:
			result.append('YES')
			break
		else:
			getAbsolute = abs(l[index1] - l[index2])
			if getAbsolute <= 1:
				l.remove(l[index1])
			else:
				result.append('NO')
				break
	l.clear()
for i in range(len(result)):
	print(result[i], end='\n')


def solve(N, arr):
	if N == 1:
		return 'YES'
	arr.sort()
	for i in range(N - 1):
		currentEle = arr[i]
		nextEle = arr[i + 1]
		if abs(currentEle - nextEle) > 1:
			return 'NO'
	return 'YES'
testCases = int(input())
for case in range(testCases):
	N = int(input())
	arr = list(map(int, input().split()))
	print(solve(N, arr))


t = int(input())
for r in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	o = False
	e = False
	for i in l:
		if i % 2 == 0:
			e = True
		if i % 2 != 0:
			o = True
	if e == True and o == False or (o == True and e == False and (n % 2 == 0)):
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
import math
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
(t,) = mp()
for _ in range(t):
	(n,) = mp()
	a = sorted(mp())
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			cout('NO\n')
			break
	else:
		cout('YES\n')


from math import ceil
from math import factorial
from collections import *
from operator import itemgetter
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
t = ii()
for i in range(t):
	n = ii()
	a = iia()
	o = 0
	e = 0
	for i in range(n):
		if a[i] % 2:
			o += 1
		else:
			e += 1
	if o != n and o >= 1 or (n % 2 == 1 and o >= 1):
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout

def count(list, func):
	count_even = 0
	for j in list:
		if j % 2 == 0:
			count_even += 1
	if func == 'even':
		return count_even
	else:
		return len(list) - count_even
T = int(stdin.readline())
for i in range(T):
	size = stdin.readline()
	a = [int(i) for i in stdin.readline().split()]
	if sum(a) % 2 == 1:
		print('YES')
	elif count(a, 'even') != len(a):
		if count(a, 'odd') == len(a):
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	num = int(input())
	li = [int(i) for i in input().split()]
	li.sort()
	flag = True
	for i in range(1, len(li)):
		if li[i] - li[i - 1] > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] >= 2:
			print('NO')
			break
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	diff = []
	for i in range(1, len(a)):
		diff.append(abs(a[i] - a[i - 1]))
	if any((y >= 2 for y in diff)):
		print('NO')
	else:
		print('YES')


import math
T = int(input())
n = [0] * T
a = [0] * T
for t in range(T):
	n[t] = int(input())
	a[t] = [int(i) for i in input().split(' ')]
for t in range(T):
	if sum(a[t]) % 2 == 1:
		print('YES')
	else:
		d = False
		for i in a[t]:
			if a[t][0] % 2 != i % 2:
				print('YES')
				d = True
				break
		if not d:
			print('NO')


from sys import stdin
for _ in range(int(input())):
	n = int(input())
	nums = sorted(list(set(list(map(int, stdin.readline().split())))))
	counter = 0
	flag = False
	for i in range(len(nums) - 1):
		if nums[i + 1] - nums[i] > 1:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	result = 'YES'
	for i in range(1, N):
		if A[i - 1] + 1 < A[i]:
			result = 'NO'
			break
	print(result)


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	flag = 0
	for i in range(n):
		if A[i] % 2 != 0:
			flag += 1
	if flag == 0:
		print('NO')
	elif flag == n:
		if sum(A) % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


from collections import deque as d
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = 'YES'
	l.sort()
	l = d(l)
	for i in range(n - 1):
		if abs(l[0] - l[1]) <= 1:
			l.popleft()
		else:
			s = 'NO'
			break
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	par = False
	impar = False
	if len(l) % 2 == 1:
		for _ in range(n):
			if l[_] % 2 == 1:
				impar = True
			else:
				par = True
		if impar:
			print('YES')
		else:
			print('NO')
	else:
		for _ in range(n):
			if l[_] % 2 == 1:
				impar = True
			else:
				par = True
		if not par or not impar:
			print('NO')
		else:
			print('YES')


for t in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	(start, end) = (0, len(arr) - 1)
	while start < end:
		if arr[start + 1] - arr[start] <= 1:
			start += 1
		else:
			break
	if end - start >= 1:
		print('NO')
	else:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	a = [int(i) for i in input().split()]
	if sum(a) % 2 != 0:
		print('YES')
		t = t - 1
		continue
	b = set(a)
	if len(a) == 1:
		if a[0] % 2 == 0:
			print('NO')
			t = t - 1
			continue
		else:
			t = t - 1
			print('YES')
			continue
	else:
		odd_count = len(list(filter(lambda x: x % 2 != 0, a)))
		even_count = len(list(filter(lambda x: x % 2 == 0, a)))
		if odd_count >= 1 and even_count >= 1:
			print('YES')
		else:
			print('NO')
	t = t - 1


from time import time
from random import randint

class Failed(Exception):
	pass

def submit():
	for _ in range(int(input())):
		input()
		numbers = sorted([int(e) for e in input().split()])
		failed = False
		for i in range(1, len(numbers)):
			if numbers[i] - numbers[i - 1] > 1:
				print('NO')
				failed = True
				break
		if failed == False:
			print('YES')

def tryOut():
	start_time = time()
	print(f'Execution time: {time() - start_time}s')
submit()


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a)
	while len(a) > 1:
		if a[1] - a[0] <= 1:
			a.remove(a[0])
		else:
			break
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	r = 1
	if n == 1:
		c = 1
	l.sort()
	for i in range(n):
		for j in range(i + 1, n):
			if l[i] - l[j] == -1 or l[i] - l[j] == 0 or l[i] - l[j] == 1:
				r += 1
				break
	if c == 1:
		print('YES', end='\n')
	elif r == n:
		print('YES', end='\n')
	else:
		print('NO', end='\n')
	r = 1
	c = 0


import sys
t = int(input())
tests = []
for _ in range(t):
	n = int(input())
	a = [int(a) for a in input().split()]
	tests.append((n, a))
for (n, a) in tests:
	a.sort()
	b = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			b = False
			break
	print('YES' if b else 'NO')


def smallest(arr):
	if len(arr) == 1:
		return 'YES'
	arr.sort()
	ans = []
	i = 0
	while i < len(arr) - 1:
		if arr[i + 1] - arr[i] <= 1:
			i = i + 1
		else:
			ans.append(arr[i])
			i = i + 1
	if i < len(arr):
		ans.append(arr[i])
	if len(ans) == 1:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	print(smallest(arr))


a = int(input())
for i in range(a):
	b = int(input())
	c = list(map(int, input().split(' ')[:b]))
	k = 0
	count = 0
	c.sort()
	for j in range(len(c) - 1):
		for k1 in range(1, len(c)):
			if k1 > j and c[k1] - c[j] <= 1:
				c[j] = 0
				break
		else:
			count = count + 1
			break
		if count == 1:
			break
	if count == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	m = int(input())
	lisstt = sorted(list(map(int, input().split())))
	mcmyes = True
	for number in range(m - 1):
		if lisstt[number + 1] - lisstt[number] > 1:
			mcmyes = False
	if mcmyes:
		print('YES')
	else:
		print('NO')


import sys
import math
import itertools
import functools
import collections
import operator

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

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

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

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

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
t = ii()
for _ in range(t):
	n = ii()
	a = li()
	if all((a[i] & 1 for i in range(n))) and (not n & 1) or all((not a[i] & 1 for i in range(n))):
		print('NO')
	else:
		print('YES')


t = int(input())
for x in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	yes = 'YES'
	no = 'NO'
	a.sort()
	for x in range(n - 1):
		if a[x + 1] - a[x] > 1:
			print(no)
			break
	else:
		print(yes)


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	lis.sort()
	ctr = 0
	for i in range(n - 1):
		if lis[i + 1] - lis[i] == 1 or lis[i + 1] == lis[i]:
			ctr += 1
		else:
			break
	if ctr == n - 1:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import math
input = stdin.readline

def print(*args, end='\n'):
	s = []
	for i in args:
		s.append(str(i) + ' ')
	s = ''.join(s)
	stdout.write(s + end)

def solve():
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
		return
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			print('NO')
			return
	print('YES')
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		m = list(map(lambda x: 'odd' if x % 2 == 1 else 'even', a))
		print('YES' if m.count('odd') > 0 and m.count('even') > 0 or m.count('odd') % 2 == 1 else 'NO')
main()


r = lambda : [*map(int, input().split())]
for _ in range(r()[0]):
	n = r()[0]
	a = sorted(r())
	x = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			x = 1
			print('No')
			break
	if x == 0:
		print('Yes')


for tt in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	ans = True
	for i in range(1, n):
		ans = ans and a[i] - a[i - 1] <= 1
	if ans:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	l = int(input())
	arr = sorted(list(map(int, input().split())))
	if l == 1:
		print('YES')
	else:
		s = 0
		for j in range(l - 1):
			if arr[j + 1] - arr[j] <= 1:
				s += 1
		if s == l - 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	if n > 1:
		if l[-1] - l[-2] <= 1:
			for j in range(n - 1):
				if l[1] - l[0] <= 1:
					l.pop(0)
				else:
					f = 1
					break
			if f == 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	arr.sort()
	result = 'YES'
	for i in range(n):
		if i != n - 1:
			if abs(arr[i + 1] - arr[i]) > 1:
				result = 'No'
				break
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = 'NO'
	if sum(arr) % 2:
		ans = 'YES'
	else:
		for (i, j) in zip(arr, arr[1:]):
			if (i + j) % 2:
				ans = 'YES'
				break
	print(ans, '\n')


for i in range(int(input())):
	input()
	inpu = [int(x) for x in input().split()]
	if len(set(inpu)) == 1 + max(inpu) - min(inpu):
		print('YES')
	else:
		print('NO')


import sys
import math

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

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

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	b = get_array()
	a = sorted(b)
	flag = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


tests = int(input())
while tests > 0:
	length = int(input())
	array = [int(i) for i in input().split(' ')]
	hasEven = False
	hasOdd = False
	for i in array:
		if not hasEven:
			if i % 2 == 0:
				hasEven = True
		if not hasOdd:
			if i % 2 == 1:
				hasOdd = True
		if hasOdd and hasEven:
			break
	if not hasOdd or (not hasEven and length % 2 == 0):
		print('NO')
	else:
		print('YES')
	tests = tests - 1


def check(a):
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			return False
	return True
for i in range(int(input())):
	n = input()
	a = [int(i) for i in input().split()]
	a.sort()
	print('YES' if check(a) else 'NO')


testcases = int(input())
for t in range(testcases):
	ans = 0
	n = int(input())
	odd = 0
	even = 0
	l = list(map(int, input().split()))
	for i in range(n):
		if l[i] % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd >= 1 and even == 0 and (n % 2 == 0):
		ans = 'NO'
	elif even >= 1 and odd == 0:
		ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	n_odd = 0
	n_even = 0
	for q in arr:
		if q % 2 == 0:
			n_even += 1
		else:
			n_odd += 1
	if n_odd == 0:
		print('NO')
		continue
	elif n_odd % 2 == 0 and n_even == 0:
		print('NO')
		continue
	elif len(arr) == 0:
		print('NO')
		continue
	else:
		print('YES')
		continue


t = int(input())
while t:
	n = int(input())
	a = list(map(lambda x: int(x), input().split()))
	a.sort()
	flag = False
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			flag = True
			break
	if not flag:
		print('YES')
	else:
		print('NO')
	t -= 1


def solve(n, a):
	s = sum(a)
	if s % 2 == 1:
		print('YES')
		return
	if all([x % 2 == 0 for x in a]) or all([x % 2 == 1 for x in a]):
		print('NO')
		return
	print('YES')

def main():
	tc = int(input())
	for _ in range(tc):
		n = int(input())
		a = [int(x) for x in input().split()]
		solve(n, a)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	result = True
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			result = False
			break
	print('YES' if result else 'NO')


n = int(input())
for _ in range(n):
	m = int(input())
	(e, o) = ([], [])
	[o.append(i) if int(i) % 2 else e.append(i) for i in input().split()]
	if len(e) == m or (len(o) == m and (not m % 2)):
		print('NO')
	else:
		print('YES')


import re
test_size = int(input())
lines = list()
no_lines = 2 * test_size
for line in range(no_lines):
	lines.append(input().strip())
n = 0
array_size = list()
arraies = list()
for element in lines:
	if n % 2 != 0:
		num_array = re.findall('[0-9]+', element)
		arraies.append(num_array)
	n += 1
for i in range(test_size):
	m = 0
	array = arraies[i]
	a_size = len(array)
	for ix in range(a_size):
		for j in range(a_size):
			if j < a_size - 1:
				n1 = int(array[j])
				n2 = int(array[j + 1])
				if n1 > n2:
					temp = array[j + 1]
					array[j + 1] = array[j]
					array[j] = temp
	for j in range(a_size):
		if j < a_size - 1 and a_size != 1:
			n1 = int(array[j])
			n2 = int(array[j + 1])
			if abs(n1 - n2) <= 1:
				m += 1
	if m == a_size - 1:
		print('YES')
	else:
		print('NO')


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

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

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
for _ in range(int(input())):
	N = int(input())
	A = alele()
	if N == 1:
		Y(1)
	else:
		A.sort()
		f = 1
		for (i, j) in zip(A, A[1:]):
			if abs(i - j) > 1:
				f = 0
				break
		Y(f)


num_t = int(input())
for _ in range(num_t):
	input()
	arr = [int(i) for i in input().split()]
	odd = False
	even = False
	s = 0
	for e in arr:
		odd |= e & 1
		even |= e & 1 ^ 1
		s += e
	if s & 1 or (odd and even):
		print('YES')
	else:
		print('NO')


def func(arr):
	n = len(arr)
	if n == 1:
		return True
	i = 0
	j = 1
	cnt = 0
	arr.sort()
	while j < n:
		if arr[j] - arr[i] <= 1:
			i += 1
			j += 1
			cnt += 1
		else:
			break
	if cnt == n - 1:
		return True
	return False
t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	if func(arr):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	c = 0
	d = 0
	for i in a:
		if i % 2 != 0:
			c += 1
		else:
			d += 1
	if c == 0 or (d == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	x = sorted(list(map(int, input().split())))
	x.reverse()
	y = True
	for j in range(n - 1):
		if x[j] - x[j + 1] > 1:
			y = False
	if y == True:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	l = len(arr)
	k = 0
	c = 0
	if l % 2 == 0:
		for j in range(0, l):
			if arr[j] % 2 == 0:
				k += 1
			else:
				c += 1
		if k > 0 and c > 0:
			print('YES')
		else:
			print('NO')
	else:
		for j in range(0, l):
			if arr[j] % 2 == 0:
				k += 1
			else:
				c += 1
		if c > 0:
			print('YES')
		else:
			print('NO')


t = int(input())
from math import *
from sys import *
from math import *

def f(arr, k, x):
	count = 0
	for il in arr:
		count += il // x
	if count >= k:
		return True
	else:
		return False
for ip in range(t):
	n = int(input())
	arr = [int(x) for x in input().strip().split()]
	arr = sorted(arr)
	kp = 'YES'
	for il in range(1, n):
		if arr[il] - arr[il - 1] > 1:
			kp = 'NO'
			break
	print(kp)


def main():
	for _ in range(int(input())):
		n = int(input())
		a = [int(x) for x in input().split()]
		a.sort()
		c = 0
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				c = c + 1
		if c > 0:
			print('NO')
		else:
			print('YES')
main()


n = int(input())
for i in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	if m % 2 == 0:
		s = 0
		for j in range(m):
			s += a[j] % 2
		if s == 0 or s == len(a):
			print('No')
		else:
			print('Yes')
	else:
		s = 0
		for j in range(m):
			s += a[j] % 2
		if s == 0:
			print('No')
		else:
			print('Yes')


for _ in [0] * int(input()):
	n = int(input())
	arr = [int(a) for a in input().split()]
	arr.sort()
	ct = arr[0]
	flag = False
	for i in arr:
		if ct == i or ct + 1 == i:
			ct = i
		else:
			flag = True
			break
	if flag == False:
		print('YES')
	else:
		print('NO')


def solve(n, l):
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			return 0
	return 1
t = int(input())
for we in range(t):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	if solve(n, l):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	lis = list(map(int, input().split()))
	lis = sorted(lis)
	ans = 0
	for i in range(1, n):
		if abs(lis[i - 1] - lis[i]) > 1:
			print('NO')
			ans = 1
			break
	if ans == 0:
		print('YES')


t = int(input())
for i in range(t):
	x = []
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	count = 0
	for j in range(1, n):
		if l[j] - l[j - 1] <= 1:
			count = count + 1
	if n - count == 1:
		print('YES')
	else:
		print('NO')


t = input()
i = 0
while i < int(t):
	t2 = int(input())
	n = str(input()).split(' ')
	ni = 0
	np = 0
	for j in range(len(n)):
		if int(n[j]) % 2 == 0:
			np += 1
		else:
			ni += 1
	if np == t2:
		print('NO')
	elif t2 % 2 == 0 and ni == t2:
		print('NO')
	else:
		print('YES')
	i += 1


def possible(a: list, n: int) -> bool:
	(odd, even) = (0, 0)
	for num in a:
		if num % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 != 0:
		return True
	if odd > 0 and even > 0:
		return True
	return False
t = int(input())
while t > 0:
	n = int(input())
	arr = list(map(int, input().split()))
	if possible(arr, n):
		print('YES')
	else:
		print('NO')
	t -= 1


def run():
	n = int(input())
	nums = [int(i) for i in input().split()]
	temp = 0
	for i in nums:
		if i & 1:
			temp += 1
	if temp & 1 or (temp & 1 ^ 1 and 0 < temp < n):
		print('YES')
	else:
		print('NO')
t = int(input())
while t:
	run()
	t -= 1


def check(arr, n):
	for i in range(1, n):
		if abs(ar[i] - ar[i - 1]) > 1:
			return False
	return True
t = int(input())
while t:
	t -= 1
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	if check(ar, n) == True:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = input()
	a = set([int(k) for k in input().split()])
	a = list(a)
	if a:
		while len(a) > 1:
			if min(a) + 1 in a:
				a.remove(min(a))
			else:
				print('NO')
				break
		if len(a) <= 1:
			print('YES')


t = int(input())
for i in range(t):
	par = False
	impar = False
	n = int(input())
	f = [int(j) for j in input().split()]
	if sum(f) % 2 != 0:
		print('YES')
	else:
		for j in f:
			if j % 2 == 0:
				par = True
			else:
				impar = True
		if par and impar:
			print('YES')
		elif impar and n % 2 != 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	FLAG = 1
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			FLAG = 0
			break
	if FLAG == 1:
		print('YES')
	else:
		print('NO')


production = True
import sys, math, collections, bisect, itertools, heapq, decimal, random, copy, re

def input(f=0, m=0):
	if m > 0:
		return [input(f) for i in range(m)]
	else:
		l = sys.stdin.readline()[:-1]
		if f >= 10:
			u = False
			f = int(str(f)[-1])
		else:
			u = True
		if f == 0:
			p = [l]
		elif f == 1:
			p = list(map(int, l.split()))
		elif f == 2:
			p = list(map(float, l.split()))
		elif f == 3:
			p = list(l)
		elif f == 4:
			p = list(map(int, list(l)))
		elif f == 5:
			p = l.split()
		return p if u else p[0]

def out(l, f=0, n=True):
	if f == 0:
		p = str(l)
	elif f == 1:
		p = ' '.join(map(str, l))
	elif f == 2:
		p = '\n'.join(map(str, l))
	elif f == 3:
		p = ''.join(map(str, l))
	print(p, end='\n' if n else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: a + 1 & 1

def mapl(i, f=0):
	if f == 0:
		return list(map(int, i))
	elif f == 1:
		return list(map(str, i))
	elif f == 2:
		return list(map(list, i))

def solve():
	n = input(11)
	a = input(1)
	s = sorted(a)
	for (i, j) in zip(s, s[1:]):
		if abs(i - j) > 1:
			out('NO')
			return
	out('YES')
	return
for i in range(input(11)):
	solve()


test_cases = int(input())
for z in range(test_cases):
	sum = 0
	a = 0
	k = 0
	l = 0
	n = int(input())
	array = input().split()
	for i in array:
		sum += int(i)
	if sum % 2 != 0:
		print('YES')
		a += 1
	else:
		for j in array:
			if int(j) % 2 == 1:
				k += 1
			if int(j) % 2 == 0:
				l += 1
		if k == n or l == n:
			print('NO')
			a += 1
		else:
			print('YES')
			a += 1
	if a == 0:
		print('NO')


t = int(input())
for z in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if n == 1:
		print('YES')
		continue
	pos = True
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			pos = False
			break
	if pos:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flg = 1
	for j in range(n - 1):
		if a[j + 1] - a[j] <= 1:
			continue
		else:
			flg = 0
	if flg:
		print('YES')
	else:
		print('NO')


import heapq
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	q = []
	for val in arr:
		heapq.heappush(q, val)
	while len(q) != 1:
		tmp1 = heapq.heappop(q)
		tmp2 = heapq.heappop(q)
		if abs(tmp1 - tmp2) >= 2:
			print('NO')
			break
		heapq.heappush(q, tmp2)
	else:
		print('YES')


pt = int(input())
for i in range(pt):
	pn = int(input())
	df = list(map(int, input().split()))
	(eve, odd) = (0, 0)
	for j in df:
		if j % 2 == 0:
			eve += 1
		else:
			odd += 1
	if odd == 0 or (eve == 0 and pn % 2 == 0):
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	booo = True
	for j in range(len(li) - 1):
		if abs(li[j] - li[j + 1]) > 1:
			booo = False
			break
	if booo:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	ch = input()
	L = [int(i) for i in ch.split()]
	nbp = 0
	nbimp = 0
	for i in L:
		if i % 2 == 0:
			nbp += 1
		else:
			nbimp += 1
	if n % 2 == 0:
		if nbp > 0 and nbimp > 0:
			print('YES')
		else:
			print('NO')
	elif nbimp > 0:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		A = list(map(int, input().split()))
		A.sort()
		tmp = A[0]
		ok = True
		for a in A:
			if a == tmp or a == tmp + 1:
				tmp = a
			else:
				ok = False
				break
		print('YES') if ok else print('NO')
main()


tc = int(input())
for r in range(tc):
	n = int(input())
	arr = list(map(lambda a: int(a) % 2, input().split()))
	a = sum(arr)
	b = len(arr) - a
	if a % 2 != 0 and a > 0:
		print('YES')
	elif b > 0 and a > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for case in range(t):
	n = int(input())
	A = [int(x) for x in input().split(' ')]
	A.sort()
	ans = True
	for i in range(n - 1):
		if A[i + 1] - A[i] >= 2:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


cnt = int(input())
for times in range(cnt):
	odd = []
	even = []
	b = []
	n = int(input())
	a = input().split()
	for i in range(n):
		i = int(a[i])
		b.append(i)
	if sum(b) % 2 == 1:
		print('YES')
	else:
		for item in b:
			if item % 2 == 1:
				odd.append(item)
			else:
				even.append(item)
		if len(odd) >= 1 and len(even) >= 1:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ans = 'YES'
	if n == 1:
		print(ans)
		continue
	ar.sort()
	for i in range(1, n):
		if ar[i] - ar[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	L = sorted(a)
	counter = 0
	for i in range(n - 1):
		if L[i] == L[i + 1] or L[i] + 1 == L[i + 1]:
			counter += 1
	if counter == n - 1:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	a = []
	for i in range(n):
		if arr[i] not in a:
			a.append(arr[i])
	c = 0
	for i in range(len(a) - 1):
		if a[i] + 1 == a[i + 1]:
			c += 1
	if c == len(a) - 1:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	n = int(input())
	a = input().split(' ')
	for j in range(n):
		a[j] = int(a[j])
	a.sort()
	k = 0
	if n == 1:
		print('YES')
	else:
		for j in range(1, n):
			if a[j] - a[j - 1] > 1:
				k = 1
				break
		if k == 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	nechet = sum(a) % 2 != 0
	if nechet:
		print('YES')
	else:
		has_chet = False
		has_hechet = False
		for item in a:
			if item % 2 == 0:
				has_chet = True
			else:
				has_hechet = True
		if has_chet and has_hechet:
			print('YES')
		else:
			print('NO')


testcase = int(input())
while testcase > 0:
	n = int(input())
	l = list(map(int, input().split()))
	o = 0
	e = 0
	for i in l:
		if i % 2 == 1:
			o += 1
		else:
			e += 1
	if n % 2 == 0 and e == 0:
		print('NO')
	elif o == 0:
		print('NO')
	elif n % 2 != 0 and e == 0:
		print('YES')
	else:
		print('YES')
	testcase -= 1


n = int(input())
for i in range(n):
	j = int(input())
	nums = set(list(map(int, input().split())))
	print('YES') if max(nums) - min(nums) < len(nums) else print('NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	count = 1
	for i in range(1, n):
		if count > 1:
			break
		if abs(a[i - 1] - a[i]) > 1:
			count += 1
	else:
		if count < 2:
			print('YES')
	if count > 1:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c0 = 0
	ce = 0
	flag = 1
	for i in l:
		if i % 2 == 0:
			ce += 1
		else:
			c0 += 1
	if c0 == 0:
		flag = 0
	elif ce == 0:
		if n % 2 != 0:
			flag = 1
		else:
			flag = 0
	else:
		flag = 1
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	x = int(input())
	mylist = list(map(int, input().split()))
	ev = odd = 0
	for i in mylist:
		if i % 2 == 0:
			ev += 1
		else:
			odd += 1
	print('YES' if odd > 0 and ev > 0 or odd % 2 != 0 else 'NO')


t = int(input())
out = []
for i in range(t):
	n = input()
	a = list(map(int, input().split(' ')))
	a.sort()
	out.append('YES')
	for j in range(len(a) - 1):
		if abs(a[j] - a[j + 1]) > 1:
			out[i] = 'NO'
			break
for i in out:
	print(i)


def getFreq(s):
	cnt = [0] * 256
	for x in s:
		cnt[ord(x)] += 1
	return cnt

def main():
	for _ in range(int(input())):
		n = int(input())
		cnt = [0] * 2
		for x in map(int, input().split()):
			cnt[x % 2] += 1
		if cnt[0] == n or (cnt[1] == n and n % 2 == 0):
			print('NO')
		else:
			print('YES')
main()


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 0
	o = 0
	sum1 = 0
	for r in range(n):
		if a[r] % 2 == 0:
			s += 1
		else:
			o += 1
		sum1 += a[r]
	if sum1 % 2 == 1:
		print('YES')
	elif s != 0 and o != 0 and (sum1 % 2 == 0):
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout

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

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')
for t in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	ok = True
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	c1 = 0
	c2 = 0
	n = int(input())
	l = [int(x) for x in input().split()]
	s = sum(l)
	if s % 2 != 0:
		print('YES')
		continue
	for j in range(n):
		if l[j] % 2 != 0:
			c1 += 1
		else:
			c2 += 1
	if c1 % 2 == 0:
		if c1 != 0 and c2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def solve(n, ar):
	ar.sort()
	flag = False
	for i in range(n - 1):
		if abs(ar[i] - ar[i + 1]) <= 1:
			continue
		else:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	solve(n, ar)


t = int(input())
for j in range(t):
	n = int(input())
	l = input().split()
	for i in range(n):
		l[i] = int(l[i])
	l.sort()
	fl = []
	for i in range(1, len(l)):
		if l[i] - l[i - 1] <= 1:
			fl.append(l[i])
	for i in fl:
		if i in l:
			l.remove(i)
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(v) for v in input().split()]
	a.sort()
	j = 0
	f = 0
	while j < n - 1:
		if abs(a[j] - a[j + 1]) <= 1:
			j = j + 1
		else:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	input()
	st = set([int(i) for i in input().split()])
	m = max(st)
	if len(st) == 1:
		print('YES')
	else:
		for i in range(len(st) - 1):
			if i == len(st) - 2 and m - 1 in st:
				print('YES')
			elif m - 1 in st:
				m -= 1
			else:
				print('NO')
				break


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = 0
	flag = 0
	for i in range(len(l)):
		if l[i] % 2 == 0:
			x = x + 1
	if x == len(l):
		print('NO')
		flag = 1
	if len(l) % 2 == 0:
		x = 0
		for i in range(len(l)):
			if l[i] % 2 != 0:
				x = x + 1
		if x == len(l):
			print('NO')
			flag = 1
	if flag == 0:
		print('YES')


for t in range(int(input())):
	n = int(input())
	m = list(sorted([int(y) for y in input().strip().split()]))
	for i in range(1, n):
		if m[i] - m[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for x in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	p = True
	ans = True
	if a[0] % 2 == 0:
		p = False
	for i in range(1, n):
		if p:
			if a[i] % 2 == 0:
				ans = False
				break
		elif a[i] % 2 != 0:
			ans = False
			break
	if ans:
		if n % 2 == 0:
			print('NO')
		elif p:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def solve(A, n):
	A.sort()
	c = 0
	for i in range(n - 1):
		if A[i + 1] - A[i] <= 1:
			c += 1
	if c == n - 1:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split(' ')))
	print(solve(A, n))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	first = arr[0]
	if first % 2 == 0:
		flag = 'even'
	else:
		flag = 'odd'
	temp = 1
	if sum(arr) % 2 != 0:
		print('YES')
		temp = 0
	if flag == 'odd' and temp == 1:
		for item in arr:
			if item % 2 == 0:
				print('YES')
				temp = 0
				break
	if flag == 'even' and temp == 1:
		for item in arr:
			if item % 2 != 0:
				print('YES')
				temp = 0
				break
	if temp == 1:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	possible = True
	for i in range(n - 1):
		if a[i + 1] - a[i] >= 2:
			possible = False
	if possible:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	bool = True
	arr = sorted(list(map(int, input().split())))
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			bool = False
			print('NO')
			break
	if bool == True:
		print('YES')


def fun(arr):
	arr.sort()
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for j in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(fun(arr))


def main():
	for _ in range(int(input())):
		n = int(input())
		_odd = False
		li = list(map(int, input().split()))
		_odd = False
		if sum(li) & 1:
			print('YES')
		else:
			for i in range(len(li) - 1):
				if li[i] & 1 ^ li[i + 1] & 1:
					_odd = True
					break
			if _odd:
				print('YES')
			else:
				print('NO')
main()


for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	o = sum([x & 1 for x in l])
	if s & 1 or o & 1 or 1 < o < n:
		t = 0
	else:
		t = 1
	print('YNEOS'[t::2])


n = int(input())
for i in range(n):
	count = int(input())
	array = [int(j) for j in input().split()]
	array = sorted(array)
	word = 'YES'
	for j in range(count - 1):
		if array[j + 1] - array[j] > 1:
			word = 'NO'
	print(word)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if len(arr) > 1:
		check = True
		for i in range(1, n):
			if arr[i - 1] - arr[i] >= -1 and arr[i - 1] - arr[i] <= 1:
				continue
			else:
				check = False
				break
		if check == False:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


import sys
import math
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	flg = 0
	for i in a:
		if i & 1:
			flg += 1
	if flg == 0:
		print('NO')
	elif flg == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	inp = [int(j) for j in input().split()]
	inp.sort()
	cnt = 0
	for i in range(n - 1):
		if abs(inp[i] - inp[i + 1]) <= 1:
			cnt += 1
	if cnt == n - 1:
		print('YES')
	else:
		print('NO')


def solve():
	N = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if any((a[i] + 1 < a[i + 1] for i in range(N - 1))):
		print('NO')
	else:
		print('YES')
	return

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


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	ch = len([i for i in arr if i % 2 == 0])
	nech = len(arr) - ch
	if nech > 0:
		if ch > 0:
			print('YES')
		elif nech % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


import math, collections, sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	oc = 0
	for i in a:
		oc += i % 2
	if oc:
		if oc % 2:
			print('YES')
		elif n - oc:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	(i, j) = (0, 1)
	flag = 0
	while len(l) > 1:
		if l[j] - l[i] <= 1:
			l.remove(l[i])
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
T = int(stdin.readline())
for _ in range(T):
	N = int(stdin.readline())
	arr = [int(x) for x in stdin.readline().split()]
	arr.sort()
	flag = 1
	for i in range(1, N):
		if arr[i] > arr[i - 1] + 1:
			flag = 0
	if flag == 1:
		print('YES')
	else:
		print('NO')


def solve(x):
	for i in range(1, len(x)):
		if abs(x[i] - x[i - 1] > 1):
			return 'NO'
	return 'YES'
cases = int(input())
for i in range(cases):
	size = int(input())
	x = list(map(int, input().split(' ')))
	x = sorted(x)
	print(solve(x))


for _ in range(int(input())):
	lens = int(input())
	arrs = sorted([int(x) for x in input().split()])
	ans = 'YES'
	for i in range(1, len(arrs)):
		if arrs[i] - arrs[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
a = []
for i in range(t):
	l = 0
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	a.sort()
	for j in range(1, len(a)):
		if a[j] - a[j - 1] > 1:
			print('NO\n')
			l = 1
			break
	if l == 0:
		print('YES\n')


tests = int(input())

def solve():
	n = int(input())
	s = input()
	a = [int(x) for x in s.split(' ')]
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'
for i in range(tests):
	print(solve())


from functools import lru_cache
from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	ans = 'YES'
	for i in range(1, n):
		if ar[i] - ar[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


for _ in range(int(input())):
	n = int(input())
	m = sorted(list(map(int, input().split())))
	flag = 0
	for i in range(1, n):
		if m[i] - m[i - 1] > 1:
			flag = 1
			break
	print(['YES', 'NO'][flag == 1])


def solve(d, n):
	res = 'YES'
	while len(d) > 1:
		if d[1] - d[0] <= 1:
			d.remove(d[0])
		else:
			res = 'NO'
			break
	print(res)
for _ in range(int(input())):
	n = int(input())
	d = list(map(int, input().split()))
	d.sort()
	solve(d, n)


for ti in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	while 1:
		if len(l) > 1:
			if l[-1] - l[-2] <= 1:
				l.pop()
			else:
				break
		else:
			break
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	a.sort()
	i = 0
	n = len(a)
	while n >= 1 and i < n - 1:
		if abs(a[i] - a[i + 1]) <= 1:
			a.pop(i)
			n -= 1
		else:
			i += 1
	if len(a) == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
rpta = []
for j in range(t):
	number = int(input())
	main = list(map(int, input().split()))
	main.sort()
	flag = 1
	for i in range(number):
		if i != 0:
			if main[i] - main[i - 1] <= 1:
				pass
			else:
				flag = 0
				break
	if flag == 1:
		rpta.append('YES')
	else:
		rpta.append('NO')
for maiden in rpta:
	print(maiden)


t = int(input())
q = []
for y in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if len(a) == 1:
		q.append('YES')
	for x in range(1, n):
		if a[x] - a[x - 1] >= 2:
			q.append('NO')
			break
		if x == n - 1:
			q.append('YES')
for x in q:
	print(x)


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	new = []
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			new.append(0)
		else:
			new.append(1)
	if new.count(0) == 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	s = 'YES'
	for j in range(n - 1):
		if a[j + 1] - a[j] > 1:
			s = 'NO'
	print(s)


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	c = 0
	for x in a:
		if x % 2 == 1:
			c += 1
	if c % 2 == 0:
		if n - c > 0 and c > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def func(a):
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			return 'NO'
	return 'YES'
q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	print(func(a))


a = int(input())
for _ in range(a):
	n = int(input())
	l = list(map(int, input().split()))
	even = 0
	odd = 0
	for y in range(len(l)):
		if l[y] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
		continue
	elif even == 0 and odd % 2 == 0:
		print('NO')
		continue
	else:
		print('YES')
		continue


for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
	else:
		flag = 0
		for i in range(n - 1):
			if abs(l[i + 1] - l[i]) <= 1:
				continue
			else:
				flag = 1
		if flag == 0:
			print('YES')
		else:
			print('NO')


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


n = int(input())
for i in range(n):
	n1 = int(input())
	li = list(map(int, input().split()))
	counto = 0
	counte = 0
	for i in range(n1):
		if li[i] % 2 == 0:
			counte += 1
		else:
			counto += 1
	if counto % 2 != 0:
		print('YES')
	elif counte != 0 and counto != 0:
		print('YES')
	else:
		print('NO')


from heapq import *

def smallest_number(nums, n):
	if n == 1:
		return 'YES'
	min_heap = []
	for num in nums:
		heappush(min_heap, num)
	final_list = []
	while len(min_heap) >= 2:
		x1 = heappop(min_heap)
		x2 = min_heap[0]
		if abs(x2 - x1) <= 1:
			pass
		else:
			final_list.append(x1)
		if len(final_list) >= 1:
			return 'NO'
	return 'YES' if len(final_list) + len(min_heap) == 1 else 'NO'
test_cases = int(input())
while test_cases:
	n = int(input())
	input_str = input()
	nums = list(map(int, input_str.split(' ')))
	print(smallest_number(nums, n))
	test_cases -= 1


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		odd = 0
		even = 0
		for i in range(n):
			if a[i] % 2 != 0:
				odd += 1
			else:
				even += 1
		if odd == n and max(a) == min(a):
			if n % 2 == 0:
				print('NO')
			else:
				print('YES')
		elif odd == 0:
			print('NO')
		elif odd != 0 and even != 0:
			print('YES')
		else:
			print('NO')
	t -= 1


t = int(input())
for p in range(t):
	n = int(input())
	lis = list(map(int, input().split()))
	odd = 0
	eve = 0
	for k in lis:
		if k % 2 == 0:
			eve = eve + 1
		else:
			odd = odd + 1
	if odd % 2 == 1:
		print('YES')
	elif odd > 0 and eve > 0:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = 0
	if len(a) == 1:
		print('YES')
	else:
		a.sort()
		for i in range(n - 1):
			if math.fabs(a[i] - a[i + 1]) > 1:
				ans += 1
		if ans == 0:
			print('YES')
		else:
			print('NO')


def result(arr):
	x = sum(arr)
	if x % 2 != 0:
		return True
	i = 0
	a = [0, 0]
	while i < len(arr):
		if arr[i] % 2 == 0:
			a[0] = 1
		else:
			a[1] = 1
		i += 1
	return sum(a) == 2
t = int(input())
for w in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	if result(arr):
		print('YES')
	else:
		print('NO')


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


t = int(input())
f = ''
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	x = 0
	for i in range(n):
		if a[i] % 2 == 1:
			x += 1
	if x == 0:
		f += 'NO\n'
	elif x == n:
		if sum(a) % 2 == 0:
			f += 'NO\n'
		else:
			f += 'YES\n'
	else:
		f += 'YES\n'
print(f)


import math
from sys import stdin, stdout
T = int(stdin.readline())
for i in range(T):
	N = int(stdin.readline())
	x = list(map(int, stdin.readline().split()))
	s = sum(x)
	ans = 'NO'
	if N <= 2 and s % 2 == 1:
		ans = 'YES'
	elif s % 2 == 1:
		ans = 'YES'
	elif x[0] % 2 == 0:
		for i in x:
			if i % 2 == 1:
				ans = 'YES'
				break
	else:
		for i in x:
			if i % 2 == 0:
				ans = 'YES'
				break
	print(ans)


n = int(input())
result = []
for i in range(n):
	leng = int(input())
	lista = list(map(int, input().split()))
	lista.sort()
	matchs = 0
	for j in range(leng - 1):
		if abs(lista[j] - lista[j + 1]) <= 1:
			matchs += 1
	if matchs == leng - 1:
		result.append('YES')
	else:
		result.append('NO')
for i in result:
	print(i)


t = int(input())
while t > 0:
	n = int(input())
	string = input().split(' ')
	arr = [int(i) for i in string]
	already_printed = False
	arr.sort()
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			print('NO')
			already_printed = True
			break
	if already_printed == False:
		print('YES')
	t -= 1


try:
	t = int(input())
	for i in range(t):
		n = int(input())
		l = list(map(int, input().split()))
		l.sort()
		a = 0
		flag = 0
		for i in range(n - 1):
			if abs(l[i] - l[i + 1]) >= 2:
				a += 1
				if a == 1:
					flag = 1
					break
		if flag == 1:
			print('NO')
		else:
			print('YES')
except:
	pass


t = int(input())
for t in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = list(set(l))
	l.sort()
	s = 0
	i = 0
	while i < len(l) - 1:
		if abs(l[i] - l[i + 1]) <= 1:
			l.remove(min(l[i], l[i + 1]))
			i = i - 1
		else:
			print('NO')
			c = 1
			break
		i = i + 1
	if len(l) == 1:
		print('YES')


x = int(input())
ans = []
for i in range(x):
	input()
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		ans.append('YES')
	else:
		a = [i % 2 for i in a]
		if 0 in a and 1 in a:
			ans.append('YES')
		else:
			ans.append('NO')
print('\n'.join(ans))


import math
t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = [int(x) for x in input().split()]
	diff = 0
	arr.sort()
	for i in range(n - 1):
		diff = max(diff, abs(arr[i] - arr[i + 1]))
	if diff <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	all1 = 1
	all2 = 1
	for j in range(n):
		if a[j] % 2 == 1:
			all1 = 0
		else:
			all2 = 0
	q = sum(a) % 2
	if q:
		print('YES')
	elif not q and (all1 or all2):
		print('NO')
	else:
		print('YES')


t = int(input())
A = []
for i in range(t):
	n = int(input())
	s = sorted(list(map(int, input().split())))
	c = 0
	for j in range(n - 1):
		if abs(s[j] - s[j + 1]) <= 1:
			c += 1
	if c == n - 1:
		A.append('YES')
	else:
		A.append('NO')
for i in A:
	print(i)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	x1 = 0
	x2 = 0
	for j in range(n):
		if a[j] % 2 == 0:
			x2 += 1
		else:
			x1 += 1
	if x1 % 2 == 1 or (x1 % 2 == 0 and x2 != 0 and (x1 != 0)):
		print('YES')
	else:
		print('NO')


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

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

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

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

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

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

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 mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

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

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt

def knapsack(li, sumi, s, n, dp):
	if s == sumi // 2:
		return 1
	elif n == 0:
		return 0
	elif dp[n][s] != -1:
		return dp[n][s]
	else:
		if li[n - 1] <= s:
			dp[n][s] = knapsack(li, sumi, s - li[n - 1], n - 1, dp) or knapsack(li, sumi, s, n - 1, dp)
		else:
			dp[n][s] = knapsack(li, sumi, s, n - 1, dp)
		return dp[n][s]

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum
from math import *
from collections import deque
max_steps = 100005
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	maxi = max(a)
	mini = min(a)
	f = 1
	for i in range(mini, maxi + 1):
		if i not in a:
			f = 0
	print('YES' if f == 1 else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	out = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			out = 'NO'
	print(out)


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	f = 0
	o = 0
	for j in range(n):
		if a[j] % 2 != 0:
			f = 1
		else:
			o = 1
	if f and (o or n % 2 == 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	k = a[0]
	ch = True
	for i in a:
		if abs(k - i) > 1 and ch:
			print('NO')
			ch = False
			break
		k = i
	if ch:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	s = s.split(' ')
	summ = 0
	for i in s:
		summ = summ + int(i)
	if summ % 2 != 0:
		print('Yes')
	else:
		numodd = 0
		for j in s:
			if int(j) % 2 != 0:
				numodd += 1
		if numodd != n and numodd != 0:
			print('Yes')
		else:
			print('No')


n = int(input())
Result = []
for i in range(0, n):
	even = 0
	odd = 0
	len_ = int(input())
	List = list(map(int, input().strip().split()))[0:len_]
	for i in range(0, len_):
		if List[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even > 0:
		if odd > 0:
			Result.append('YES')
		else:
			Result.append('NO')
	elif odd % 2 == 0:
		Result.append('NO')
	else:
		Result.append('YES')
for i in Result:
	print(i)


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('YES')
	else:
		odd = 0
		even = 0
		for i in range(n):
			if arr[i] % 2 == 1:
				odd += 1
			if arr[i] % 2 == 0:
				even += 1
			if even > 0 and odd > 0:
				break
		if even > 0 and odd > 0:
			print('YES')
		else:
			print('NO')


testCases = int(input())
while testCases > 0:
	a = input()
	numList = [int(i) for i in input().split()]
	numSet = list(set(numList))
	numSet.sort()
	f = False
	for i in range(len(numSet) - 1):
		if numSet[i] + 1 is not numSet[i + 1]:
			print('NO')
			f = True
			break
	if not f:
		print('YES')
	testCases -= 1


from collections import Counter, defaultdict as dft

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

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

def solve():
	n = int(input())
	arr = ml()
	arr = sorted(arr)
	h = []
	for i in arr:
		while h and abs(h[-1] - i) <= 1:
			h.pop()
		h.append(i)
	res = len(h) == 1
	if res:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solve()


import sys
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	c = 0
	for i in range(1, len(a)):
		if a[i] - a[i - 1] <= 1:
			c += 1
	if c == len(a) - 1:
		print('YES')
	else:
		print('NO')


def game():
	list1 = []
	output_list = []
	a = input()
	for i in range(2 * int(a)):
		a = input()
		if i % 2 != 0:
			listr = sorted([int(j) for j in a.split(' ')])
			list1.append(listr)
	for i in list1:
		count = 0
		init_var = i[0]
		for j in i:
			if j - init_var > 1:
				output_list.append('NO')
				break
			count += 1
			init_var = j
		if count == len(i):
			output_list.append('YES')
	print('\n'.join(output_list))
game()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	i = 0
	c = 0
	if len(l) == 1:
		print('YES')
		continue
	while i < len(l) - 1:
		if l[i + 1] - l[i] <= 1:
			c += 1
		i += 1
	if c == len(l) - 1:
		print('YES')
	else:
		print('NO')


def solve(nums):
	for i in range(len(nums) - 1):
		if nums[i + 1] - nums[i] > 1:
			return False
	return True
n = int(input())
results = []
for t in range(n):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	results.append(solve(nums))
for _ in results:
	if _:
		print('YES')
	else:
		print('NO')


def solution(arr):
	arr.sort()
	for i in range(1, len(arr)):
		val = arr[i] - arr[i - 1]
		if val > 1:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	cond = solution(arr)
	if cond:
		print('YES')
	else:
		print('NO')


from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
for _ in range(I()):
	n = I()
	a = LI()
	a.sort()
	flag = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')


rounds = int(input())
for i in range(rounds):
	_ = input()
	numbers = list(set([int(token) for token in input().split(' ')]))
	numbers.sort()
	print('YES' if len(numbers) - 1 == numbers[-1] - numbers[0] else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()))
	good = 1
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] >= 2:
			good = 0
	if good:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout, setrecursionlimit
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007
tc = ii1()
for _ in range(tc):
	n = ii1()
	arr = sorted(iia())
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = input()
	arr = list(map(int, input().split()))
	arr.sort()
	isOk = 1
	answers = ['NO', 'YES']
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			isOk = 0
	print(answers[isOk])


t = int(input())
for _ in range(t):
	n = int(input())
	a = [*map(int, input().split())]
	pair = 0
	odd = 0
	for i in range(n):
		if a[i] & 1:
			odd += 1
		else:
			pair += 1
	if n == 1:
		print('NO' if odd == 0 else 'YES')
	elif pair == 0 and odd & 1 == 0 or odd == 0:
		print('NO')
	else:
		print('YES')


def solve(a):
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return False
	return True
T = int(input())
while T > 0:
	T -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if solve(a):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	if sum(a) % 2 == 1:
		print('YES')
	else:
		for i in a:
			if i % 2 == 1:
				count += 1
		if count < n and count > 0:
			print('YES')
		else:
			print('NO')


test = int(input())
for x in range(test):
	checkEven = 0
	checkOdd = 0
	n = int(input())
	z = input()
	a = z.split()
	for i in range(n):
		z = int(a[i])
		if z % 2 == 0:
			checkEven = 1
		if z % 2 == 1:
			checkOdd = 1
	if checkOdd == 0:
		print('NO')
	elif checkEven == 0 and n % 2 == 0:
		print('NO')
	else:
		print('YES')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		return 'YES'
	ct = [0] * 2
	for i in a:
		ct[i % 2] += 1
	if ct[0] == n or ct[1] == n:
		return 'NO'
	return 'YES'

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


import math, sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
S = lambda : input().strip()
mod = 1000000007
for i in range(I()):
	n = I()
	a = li()
	c = 0
	d = 0
	for i in a:
		if i % 2 != 0:
			c += 1
		else:
			d += 1
	if c == 0:
		print('NO')
	elif d == 0 and n % 2 == 0:
		print('NO')
	else:
		print('YES')


def evod(l):
	e = 0
	o = 0
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	return [e, o]

def summ(l):
	n = len(l)
	l = evod(l)
	e = l[0]
	o = l[1]
	if n % 2 != 0:
		if o == 0:
			print('NO')
		else:
			print('YES')
	elif o == 0:
		print('NO')
	elif o > 0 and e == 0:
		print('NO')
	else:
		print('YES')

def solve(n, l):
	summ(l)
t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	solve(n, l)
	t -= 1


t = int(input())
for i in range(t):
	n = int(input().strip())
	a = list(map(int, input().split()))
	l = len(a)
	o = 0
	e = 0
	for i in a:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if l % 2 == 0 and (e == l or o == l):
		print('NO')
	elif l % 2 == 1 and e == l:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	ai = list(map(int, input().split()))
	num = 0
	for i in range(n):
		num += ai[i] % 2
	if sum(ai) % 2 != 0 or (num != n and num != 0):
		print('YES')
	else:
		print('NO')


t = int(input(''))
for i in range(t):
	la = int(input(''))
	a = [int(x) for x in input('').split()]
	a.sort()
	for i in range(la - 1):
		if a[i + 1] - a[i] <= 1:
			a[i] = 0
	if la - a.count(0) == 1:
		print('Yes')
	else:
		print('NO')


getlist = lambda : list(map(int, input().split()))

def adjacent_diff(ais):
	ais.sort()
	curr = ais[0]
	for ai in ais[1:]:
		if abs(curr - ai) > 1:
			return 'NO'
		curr = ai
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	ais = getlist()
	print(adjacent_diff(ais))


def main():
	t = int(input().strip())
	for _ in range(t):
		n = int(input().strip())
		A = [int(s) for s in input().strip().split()]
		if sum(A) % 2 == 1 or (any((a % 2 == 0 for a in A)) and any((a % 2 == 1 for a in A))):
			print('YES')
		else:
			print('NO')
main()


from collections import *
import sys

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

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	n = ri()
	a = rl()
	odd = sum([1 for x in a if x % 2 == 1])
	even = sum([1 for x in a if x % 2 == 0])
	s = sum(a) % 2
	ans = ''
	if s == 1:
		ans = 'YES'
	elif odd != 0 and even != 0:
		ans = 'YES'
	else:
		ans = 'NO'
	print(ans)


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = sorted([int(x) for x in stdin.readline().split()])
	mybool = True
	for x in range(1, n):
		if a[x] > a[x - 1] + 1:
			mybool = False
	if mybool:
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


t = int(input())
for i in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	sm = sum(l)
	if sm & 1:
		print('YES')
		continue
	c = sum((i % 2 for i in l))
	c1 = n - c
	if c == n or c1 == n:
		print('NO')
	else:
		print('YES')


from sys import stdin
t = int(stdin.readline())
for it in range(t):
	n = int(stdin.readline())
	nums = list(map(int, stdin.readline().split()))
	if sum(nums) % 2 != 0:
		print('YES')
	else:
		odds = len(list(filter(lambda x: x % 2 != 0, nums)))
		even = len(nums) - odds
		if odds == 0 or even == 0:
			print('NO')
			continue
		print('YES')


n = int(input())
data = []
i = 0
while i < n:
	size = int(input())
	numbers = input().split(' ')
	numbers = list(map(int, numbers))
	data.append(numbers)
	i += 1
i = 0
while i < n:
	if len(data[i]) == 1:
		print('YES')
		i += 1
		continue
	data[i].sort()
	if data[i][1] - data[i][0] >= 2 or data[i][-1] - data[i][-2] >= 2:
		print('NO')
		i += 1
		continue
	can = True
	j = 1
	while j < len(data[i]) - 1:
		if data[i][j] - data[i][j - 1] >= 2 or data[i][j + 1] - data[i][j] >= 2:
			print('NO')
			can = False
			break
		j += 1
	if can:
		print('YES')
	i += 1


T = int(input())
for i in range(T):
	a = int(input())
	b = list(map(int, input().split(' ')))
	b.sort()
	c = 0
	for i in range(a - 1):
		difference = b[i + 1] - b[i]
		if difference > 1:
			c = 1
			break
		else:
			continue
	if c == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	i_liczb = int(input())
	liczby = sorted(list(map(int, input().split())))
	for x in range(i_liczb - 1):
		if abs(liczby[x] - liczby[x + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right
import math
ai = lambda : list(map(int, stdin.readline().split()))
ei = lambda : map(int, stdin.readline().split())
ip = lambda : int(stdin.readline().strip())
for i in range(ip()):
	n = ip()
	arr = ai()
	arr.sort()
	i = 0
	while n > 1 and abs(arr[i] - arr[i + 1]) <= 1:
		arr.pop(0)
		n -= 1
	if n == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t != 0:
	n = int(input())
	a = list(map(int, input().split()))
	odd_count = 0
	even_count = 0
	for num in a:
		if num % 2 == 0:
			even_count += 1
		else:
			odd_count += 1
	if odd_count == 0:
		print('NO')
	elif odd_count % 2 == 1:
		print('YES')
	elif even_count > 0:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for i in range(t):
	l = list()
	j = int(input())
	l = sorted(list(set(map(int, input().split()))))
	test = True
	i = 1
	while test == True and i < len(l):
		if l[i] - l[i - 1] > 1:
			test = False
		i += 1
	if test == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()

	def f():
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				return 'NO'
		return 'YES'
	print(f())


for _ in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	diff = 0
	for i in range(1, n):
		diff = max(diff, l[i] - l[i - 1])
	print('YES' if diff <= 1 else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	g = input().split()
	for i in range(n):
		g[i] = int(g[i])
	g.sort()
	ok = True
	for i in range(1, n):
		if not (g[i] == g[i - 1] or g[i] == g[i - 1] + 1):
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	a = map(int, input().split())
	odd = 0
	for ele in a:
		if ele & 1 == 1:
			odd += 1
	if odd == 0 or (odd == n and n % 2 == 0):
		print('No')
	else:
		print('Yes')
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		ec = 0
		oc = 0
		for i in range(len(a)):
			if a[i] % 2 == 0:
				ec += a[i]
			else:
				oc += a[i]
		if ec > 0 and oc > 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	if sum(lst) % 2 != 0:
		print('YES')
	else:
		yo = False
		yo2 = False
		for i in lst:
			if i % 2 == 0:
				yo = True
			elif i % 2 != 0:
				yo2 = True
		if yo and yo2:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr = sorted(arr)
	f = 1
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			f = 0
			break
	if f:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	ct = 0
	for i in s:
		if i % 2 != 0:
			ct += 1
	if ct % 2 != 0 or (ct > 0 and n - ct > 0):
		print('YES')
	else:
		print('NO')


t = int(input())
for _t in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	s = 'YES'
	for i in range(1, n):
		if l[i - 1] < l[i] - 1:
			s = 'NO'
	print(s)


for _ in range(int(input())):
	n = int(input())
	li = [int(i) for i in input().split()]
	if sum(li) % 2 != 0:
		print('YES')
	else:
		s = 0
		c = len(list(filter(lambda x: x % 2 == 0, li)))
		if len(set(li)) == 1:
			print('NO')
		elif c == len(li):
			print('NO')
		else:
			for j in range(len(li)):
				sumodd = sum(li)
				for k in range(len(li)):
					if j != k:
						if li[j] % 2 == 0 and li[k] % 2 != 0:
							if li[j] < li[k]:
								sumodd += li[k] - li[j]
							elif li[k] < li[j]:
								sumodd -= li[j] - li[k]
							if sumodd % 2 != 0:
								s = 1
								print('YES')
								break
				if s == 1:
					break
			else:
				print('NO')


t = int(input())
for te in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	s = sum(l)
	if s % 2 != 0:
		print('YES')
	else:
		ce = int(0)
		co = int(0)
		for i in l:
			if i % 2 == 0:
				ce += 1
			else:
				co += 1
		if ce == n or co == n:
			print('NO')
		else:
			print('YES')


for i in range(int(input())):
	n = int(input())
	a = [int(j) for j in input().split()]
	(e, o) = (0, 0)
	for j in a:
		if j % 2 == 0:
			e = 1
		else:
			o = 1
	if sum(a) % 2 != 0 or (e == 1 and o == 1):
		print('YES')
	else:
		print('NO')


import sys
for _ in range(int(input())):
	n = int(input())
	a = [int(o) for o in input().split()]
	a.sort()
	pref = []
	flag = 0
	for i in range(1, n):
		pref.append(a[i] - a[i - 1])
		if pref[-1] > 1:
			flag = 1
	print('Yes' if flag == 0 else 'No')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(lambda x: int(x), input().split(' ')))
	arr.sort()
	prevlen = None
	newlen = len(arr)
	retval = ''
	while True:
		prevlen = newlen
		j = 0
		while j < len(arr) - 1:
			if arr[j + 1] == arr[j]:
				arr.pop(j + 1)
			elif arr[j + 1] - arr[j] == 1:
				arr.pop(j)
			elif arr[j] - arr[j + 1] == 1:
				arr.pop(j)
			else:
				j += 1
		newlen = len(arr)
		if prevlen == newlen:
			if newlen == 1:
				print('YES')
			else:
				print('NO')
			break


def ii():
	int(input())

def si():
	input()

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

def sli():
	list(input().strip().split())
from functools import reduce
for _ in range(int(input())):
	n = ii()
	arr = list(map(int, input().strip().split()))
	s = reduce(lambda x, y: x + y, arr)
	(e, o) = (0, 0)
	for d in arr:
		if d & 1 is 0:
			e += 1
		else:
			o += 1
	if s & 1 is 0 and e is 0:
		print('NO')
	elif s & 1 is 0 and o is 0:
		print('NO')
	else:
		print('YES')


for inp in range(int(input())):
	n = int(input())
	l = sorted(map(int, input().split()))
	print(['YES', 'NO'][any((l[i + 1] - l[i] > 1 for i in range(n - 1)))])


MOD = 1000000007

def i():
	return input()

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

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

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

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

def twod(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
t = ii()
while t:
	t -= 1
	n = ii()
	a = li()
	if n == 1:
		print('YES')
		continue
	f = 0
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			f = 1
			print('NO')
			break
	if f == 0:
		print('YES')


for _ in range(int(input())):
	input()
	A = list(map(int, input().split()))
	print('YES' if sum(A) % 2 or (any((a % 2 for a in A)) and any((a % 2 == 0 for a in A))) else 'NO')


t = int(input())
ls = [list(map(int, input().split())) for _ in range(2 * t)]
n = []
a = []
for i in range(2 * t):
	if i % 2 == 0:
		n.append(ls[i])
	elif i % 2 == 1:
		a.append(ls[i])
for j in range(t):
	if sum(a[j]) % 2 == 1:
		print('YES')
	elif sum(a[j]) % 2 == 0:
		if n[j][0] == 1:
			print('NO')
		elif n[j][0] >= 2:
			if a[j][0] % 2 == 0:
				for k in range(1, n[j][0]):
					if a[j][k] % 2 == 1:
						print('YES')
						break
					elif k == n[j][0] - 1:
						print('NO')
			elif a[j][0] % 2 == 1:
				for k in range(1, n[j][0]):
					if a[j][k] % 2 == 0:
						print('YES')
						break
					elif k == n[j][0] - 1:
						print('NO')


cases = int(input())
for i in range(cases):
	n = int(input())
	l2 = input().split(' ')
	arr = []
	for a in l2:
		arr.append(int(a))
	arr.sort()
	pos = True
	for j in range(len(arr) - 1):
		ele1 = arr[j]
		ele2 = arr[j + 1]
		if ele2 - ele1 >= 2:
			print('NO')
			pos = False
			break
	if pos:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	co = 0
	ce = 0
	for i in range(0, len(li)):
		if li[i] % 2 != 0:
			co += 1
	if co == len(li):
		if co % 2 != 0:
			print('YES')
		else:
			print('NO')
	elif co == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for k in range(t):
	n = int(input())
	a = input()
	a = list(map(int, a.split(' ')))
	l = len(a)
	even_nos = list(filter(lambda x: x % 2 == 0, a))
	odd_nos = list(filter(lambda x: x % 2 != 0, a))
	if len(even_nos) == l:
		print('NO')
	elif len(odd_nos) == l:
		if sum(odd_nos) % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n - 1):
		if arr[i] == arr[i + 1] or arr[i] == arr[i + 1] - 1:
			pass
		else:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	chk = l[0]
	flag = False
	for i in range(1, len(l)):
		if l[0] % 2 == 0:
			if l[i] % 2 != 0:
				flag = False
				break
			else:
				flag = True
		elif l[i] % 2 == 0:
			flag = False
			break
		else:
			flag = True
	if flag:
		if l[0] % 2 == 0:
			print('NO')
		elif len(l) % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif len(l) == 1:
		if l[0] % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	line = sys.stdin.readline().split()
	nums = list(map(int, line))
	odd = 0
	eve = 0
	for i in range(n):
		if nums[i] % 2 == 0:
			eve += 1
		else:
			odd += 1
	if odd % 2 != 0:
		print('YES')
	elif eve >= 1 and odd >= 1:
		print('YES')
	else:
		print('NO')


inp = lambda : list(map(int, input().split()))
for i in range(int(input())):
	N = int(input())
	A = inp()
	if N == 1:
		print('YES')
		continue
	A = list(set(A))
	if len(A) == 1:
		print('YES')
		continue
	A.sort()
	p = len(A)
	c = p
	for i in range(p - 1):
		if A[i + 1] - A[i] == 1:
			c = c - 1
		if c == 1:
			print('YES')
			break
	else:
		print('NO')


t = int(input())
for _ in range(t):
	hashtable = {}
	n = int(input())
	a = list(map(int, input().split()))
	for x in a:
		if x not in hashtable:
			hashtable[x] = True
	i = min(a)
	j = max(a)
	ans = True
	for k in range(i, j + 1):
		if k not in hashtable:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	x = int(input())
	lst = list(map(int, input().split()))
	p = sorted(lst)
	count = x
	for j in range(x - 1):
		if abs(p[j + 1] - p[j]) <= 1:
			count -= 1
		else:
			pass
	if count == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	sa = sorted(a)
	an = True
	for i in range(n - 1):
		if sa[i + 1] - sa[i] > 1:
			an = False
			break
	if an == True:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	lst = []
	n = int(input())
	lst = [int(i) for i in input().split()][:n]
	lst.sort()
	count = 0
	for i in range(1, n):
		if abs(lst[i] - lst[i - 1]) <= 1:
			count += 1
	if count == n - 1:
		print('YES')
	else:
		print('NO')


for test_i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	i = 0
	while i < n - 1 and arr[i] - arr[i + 1] <= 1:
		i += 1
	print('YES' if i == n - 1 else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	elif n == 2:
		a.sort()
		if a[1] - a[0] <= 1:
			print('YES')
		else:
			print('NO')
	else:
		a.sort()
		f = 0
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				f = 1
				break
		if f == 1:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	(nech, ch) = (False, False)
	for i in range(len(s)):
		nech = True if s[i] % 2 != 0 else nech
		ch = True if s[i] % 2 == 0 else ch
	print('YES' if sum(s) % 2 != 0 or (ch and nech) else 'NO')


t = int(input())
Arr = []
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	if sum(s) % 2 == 1:
		Arr.append('YES')
		continue
	else:
		d = 0
		f = 0
		for j in s:
			if j % 2 == 0:
				d += 1
			if j % 2 == 1:
				f += 1
		if d == len(s) or f == len(s):
			Arr.append('NO')
		else:
			Arr.append('YES')
for i in Arr:
	print(i)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().strip().split()]
	od = 0
	ev = 0
	for k in range(len(a)):
		if a[k] % 2 == 0:
			ev += 1
		else:
			od += 1
	if sum(a) % 2 != 0 or (ev > 0 and od > 0):
		print('YES')
	else:
		print('NO')


testCases = int(input())
j = 0
k = 1
count = 0
newArray = []
for i in range(testCases):
	n = int(input())
	if n > 1:
		array = list(map(int, input().split()))
		newArray = sorted(array)
		while count != n - 1:
			a = newArray[j] - newArray[k]
			if abs(a) < 2:
				newArray.pop(newArray.index(min(newArray[j], newArray[k])))
			else:
				j += 1
				k += 1
			count += 1
		j = 0
		k = 1
		count = 0
		if len(newArray) == 1:
			print('YES')
		else:
			print('NO')
	else:
		dummy = input()
		print('YES')


t = int(input())
ans = []

def solve(arr, n):
	arr.sort()
	for j in range(n - 1):
		if abs(arr[j + 1] - arr[j]) > 1:
			return 'NO'
	return 'YES'
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	if n == 1:
		ans.append('YES')
	else:
		ans.append(solve(arr, n))
for a in ans:
	print(a)


T = int(input())
for _ in range(T):
	N = int(input())
	arr = [int(a) for a in input().split()]
	p = set(arr)
	M = 0
	m = 0
	ans = 'YES'
	for el in arr:
		if not el - 1 in p:
			if m == 0 or m == el - 1:
				m = el - 1
			else:
				ans = 'NO'
		if not el + 1 in p:
			if M == 0 or M == el + 1:
				M = el + 1
			else:
				ans = 'NO'
	print(ans)


for j in range(int(input())):
	a = int(input())
	b = 0
	n = map(int, input().split())
	n = sorted(n)
	if a == 1:
		print('YES')
	for i in range(a - 1):
		if abs(n[i] - n[i + 1]) <= 1:
			b = b + 1
			if b == a - 1:
				print('YES')
		else:
			print('NO')
			break


t = int(input())
for _ in range(t):
	n = int(input())
	s = [int(x) for x in input().split()]
	tot = 0
	c1 = 0
	c2 = 0
	for i in range(0, len(s)):
		if s[i] % 2 == 0:
			c2 += 1
		else:
			c1 += 1
		tot += s[i]
	if tot % 2 != 0:
		print('YES')
	elif c1 > 0 and c2 > 0:
		print('YES')
	else:
		print('NO')


case = int(input())
for i in range(case):
	n = int(input())
	arr = input().split()
	arr = list(map(int, arr))
	arr = set(arr)
	arr = list(arr)
	arr.sort()
	test = True
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] == 1:
			continue
		else:
			test = False
			break
	if test == True:
		print('YES')
	else:
		print('NO')


def read_array():
	x = []
	x1 = []
	x = input()
	x = x.split(' ')
	for v in x:
		x1.append(int(v))
	return x1

def compute_diferences(x):
	x = sorted(x)
	if x.count(x[0]) == len(x):
		return 'YES'
	for r in range(1, len(x)):
		if x[r] - x[r - 1] >= 2:
			return 'NO'
	return 'YES'
m = int(input())
res = []
for r in range(m):
	z = input()
	x = read_array()
	res.append(compute_diferences(x))
for z in res:
	print(z)


def check():
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	for j in range(n - 1):
		if abs(a[j] - a[j + 1]) > 1:
			return 'NO'
	return 'YES'
k = int(input())
for i in range(k):
	print(check())


t = int(input())
while t != 0:
	n = int(input())
	lst = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		lst.sort()
		count = 0
		for i in range(n - 1):
			if abs(lst[i] - lst[i + 1]) == 1 or abs(lst[i] - lst[i + 1]) == 0:
				count += 1
		if len(lst) - count == 1:
			print('YES')
		else:
			print('NO')
	t -= 1


n = int(input())
while n > 0:
	val = int(input())
	arr = list(map(int, input().split()))
	if len(set(arr)) == 1:
		print('YES')
	else:
		arr = sorted(arr)
		subfix = [arr[0]]
		for x in range(1, len(arr)):
			subfix.append(arr[x] - arr[x - 1])
		ct = 0
		for x in range(1, len(subfix)):
			if subfix[x] == 1 or subfix[x] == 0:
				ct += 1
		if ct == len(arr) - 1:
			print('YES')
		else:
			print('NO')
	n -= 1


t = int(input())
for _ in range(t):
	hash = [0] * 101
	n = int(input())
	a = list(map(lambda x: int(x), input().split()))
	a.sort()
	flag = 0
	for i in range(0, len(a) - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = list(set(a))
	if len(a) == 1:
		print('YES')
	else:
		a.sort()
		flag = 0
		while len(a) > 1:
			if a[1] - a[0] == 1:
				a.pop(0)
			else:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')


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

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))
from types import GeneratorType

def iterative(f, stack=[]):

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

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

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

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

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

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

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

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

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

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

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

def pow(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
from functools import reduce

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 gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a
from operator import add

def solve():
	n = int(inp())
	ar = lis()
	ar.sort()
	temp = []
	for i in range(1, n):
		temp.append(abs(ar[i] - ar[i - 1]))
	if not temp or max(temp) <= 1:
		print('YES')
	else:
		print('NO')
testcase(int(inp()))


t = int(input().split()[0])
for case in range(t):
	n = int(input().split()[0])
	a = list(map(int, input().split()))
	a.sort()
	ans = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


t = int(input())
while t:
	t -= 1
	n = int(input())
	ar = list(map(int, input().split()))
	s = list(set(ar))
	even = 0
	odd = 0
	for i in s:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if n % 2 == 0:
		if odd > 0 and even > 0:
			print('YES')
		elif odd > 0 and even == 0:
			print('NO')
		elif odd == 0 and even > 0:
			print('NO')
	elif odd > 0 and even > 0:
		print('YES')
	elif odd > 0 and even == 0:
		print('YES')
	elif odd == 0 and even > 0:
		print('NO')


for i in range(int(input())):
	n = int(input())
	odd = False
	even = False
	even_elements = n % 2 == 0
	data = list(map(int, input().split()))
	for x in data:
		if x % 2 == 0:
			even = True
		else:
			odd = True
		if odd and even:
			break
	if not even_elements:
		print('YES') if odd else print('NO')
	else:
		print('YES') if odd and even else print('NO')


def main(args):
	t = int(input())
	for i in range(t):
		n = int(input())
		arr = list(map(int, input().split()))
		arr.sort()
		flag = 0
		for i in range(len(arr) - 1):
			if arr[i + 1] - arr[i] >= 2:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')
import sys
sys.exit(main(sys.argv))


def solve(a):
	a.sort()
	count = 0
	for i in range(1, len(a)):
		if a[i] - a[i - 1] >= 2:
			count += 1
	if count >= 1:
		return False
	else:
		return True
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	if solve(a):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = input()
	l = list(map(int, input().split()))
	(codd, ceven) = (0, 0)
	for i in l:
		if i % 2 == 0:
			ceven += 1
		else:
			codd += 1
	if len(l) == ceven:
		print('NO')
	elif len(l) == codd and len(l) % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
r = 0
while r < t:
	p = int(input())
	a = input().split()
	i = 0
	while i < p:
		a[i] = int(a[i])
		i = i + 1
	a.sort()
	flag = 1
	i = 0
	while i < p - 1:
		if a[i + 1] - a[i] > 1:
			flag = 0
			break
		i += 1
	if flag == 1:
		print('YES')
	else:
		print('NO')
	r = r + 1


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	even = odd = 0
	for a in arr:
		if a % 2 == 0:
			even += 1
		else:
			odd += 1
	if sum(arr) % 2 == 1:
		print('Yes')
	elif even == 0 or odd == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
arr = []
for i in range(t):
	n = int(input())
	a = input().split(' ')
	a = [int(x) for x in a]
	arr.append(a)
for i in range(t):
	mas = sorted(arr[i])
	while True:
		if len(mas) == 1:
			print('YES')
			break
		if mas[1] - mas[0] > 1:
			print('NO')
			break
		del mas[0]


from math import factorial
from collections import Counter
from heapq import heapify, heappop, heappush
from sys import stdin

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

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

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

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 1000000007
N = int(input())
for _ in range(N):
	num = int(input())
	lis = list(RL())
	if sum(lis) % 2 == 1:
		print('YES')
	else:
		a = b = False
		for i in lis:
			if i % 2 == 1:
				a = True
			if i % 2 == 0:
				b = True
			if a and b:
				print('YES')
				break
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	(*arr,) = map(int, input().split())
	arr = set(arr)
	mn = min(arr)
	mx = max(arr)
	for i in range(mn, mx):
		if i not in arr:
			print('NO')
			break
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	c = 0
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) >= 2:
			c = 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')


from collections import Counter
x = int(input())
for _ in range(x):
	n = int(input())
	eles = [int(num) for num in input().split(' ')]
	map_ = Counter(eles)
	list_ = []
	for key in map_:
		list_.append(int(key))
	list_.sort()
	is_possible = True
	for i in range(len(list_) - 1):
		if abs(list_[i] - list_[i + 1]) > 1:
			is_possible = False
	if is_possible:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	i = 1
	ans = True
	while i < n:
		ans &= s[i] - s[i - 1] <= 1
		i += 1
	if ans == True:
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	(even, odd) = (0, 0)
	(first_even, last_odd) = (-1, -1)
	for (i, a_i) in enumerate(a):
		if a_i % 2 == 0:
			even += 1
			if first_even == -1:
				first_even = i
		else:
			last_odd = i
	odd = n - even
	can = False
	if odd % 2 == 1:
		can = True
	elif odd % 2 == 0:
		if even > 0 and odd > 0:
			can = True
	if can:
		print('YES')
	else:
		print('NO')

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


t = int(input())

def dfs(a):
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			return 'NO'
	return 'YES'
for k in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	a = sorted(arr)
	print(dfs(a))


t = int(input())
while t > 0:
	n = int(input())
	A = list(set(map(int, input().split())))
	A.sort()
	(m, count) = ([], 0)
	for i in range(1, len(A)):
		m.append(A[i] - A[i - 1])
	for j in range(len(m)):
		if m[j] == 1:
			count += 1
	if count == len(m):
		print('YES')
	else:
		print('NO')
	t -= 1


T = int(input())
for _ in range(T):
	n = int(input())
	lst = list(map(int, input().split()))
	if all((i % 2 == 0 for i in lst)):
		print('NO')
		continue
	elif all((i % 2 == 1 for i in lst)) and n % 2 == 0:
		print('NO')
		continue
	else:
		print('YES')


for _ in range(int(input())):
	N = int(input())
	S = list(set(map(int, input().split())))
	S.sort()
	if N == 1:
		print('YES')
	elif all([abs(S[i] - S[i + 1]) == 1 for i in range(len(S) - 1)]):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	l = int(input())
	n = list(map(int, input().split()))
	n.sort()
	n1 = 0
	if l == 1:
		print('YES')
	else:
		for i in range(l - 1, 0, -1):
			if n[i] - n[i - 1] <= 1:
				n1 += 1
			else:
				continue
		if len(n) - n1 == 1:
			print('YES')
		else:
			print('NO')


import heapq as hq
from heapq import heappop, heappush
from collections import deque, defaultdict

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

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

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

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

def subset_sum_count(arr, n, sum):
	dp = [[0 for _ in range(sum + 1)] for _ in range(n + 1)]
	for i in range(n + 1):
		for j in range(sum + 1):
			if j == 0:
				dp[i][j] = 1
			elif arr[i - 1] <= j:
				dp[i][j] = dp[i - 1][j - arr[i - 1]] + dp[i - 1][j]
			else:
				dp[i][j] = dp[i - 1][j]
	return dp[n][sum]

def prefix(a):
	pre = []
	pre.append(a[0])
	for i in range(1, len(a)):
		pre.append(pre[i - 1] + a[i])
	return pre

def binary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		mi = lo + (hi - lo) / 2
		if func(mi):
			hi = mi
		else:
			lo = mi
	return (lo + hi) / 2

def ternary_search(func, lo, hi, abs_prec=1e-07):
	while abs(hi - lo) > abs_prec:
		lo_third = lo + (hi - lo) / 3
		hi_third = hi - (hi - lo) / 3
		if func(lo_third) < func(hi_third):
			lo = lo_third
		else:
			hi = hi_third
	return (lo + hi) / 2

def discrete_binary_search(func, lo, hi):
	while lo < hi:
		mi = lo + (hi - lo) // 2
		if func(mi):
			hi = mi
		else:
			lo = mi + 1
	return lo

def discrete_ternary_search(func, lo, hi):
	while lo <= hi:
		lo_third = lo + (hi - lo) // 3
		hi_third = lo + (hi - lo) // 3 + (1 if 0 < hi - lo < 3 else (hi - lo) // 3)
		if func(lo_third) < func(hi_third):
			lo = lo_third + 1
		else:
			hi = hi_third - 1
	return lo
	return -1

def right_rotate(a, s):
	return a[s:] + a[:s]

def dec_to_bin(x):
	return int(bin(x)[2:])

def str_to_integer_list(n):
	a = []
	for i in range(len(n)):
		a.append(int(n[i]))
	return a

def list_to_str(l):
	s = ''
	for i in l:
		s += str(i)
	return s

def dijkstra(s, N, E):
	visited = set()
	dist = {}
	for i in range(1, N + 1):
		dist[i] = 1 << 29
	queue = [(dist[i], i) for i in range(1, N + 1)]
	hq.heappush(queue, (0, s))
	dist[s] = 0
	while queue:
		(d, u) = hq.heappop(queue)
		if u in visited:
			continue
		for t in E[u]:
			(v, r) = t
			if dist[v] > d + r:
				dist[v] = d + r
				hq.heappush(queue, (dist[v], v))
		visited.add(u)
	return dist

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def dijkstra(n, graph, start):
	(dist, parents) = ([float('inf')] * n, [-1] * n)
	dist[start] = 0
	queue = [(0, start)]
	while queue:
		(path_len, v) = heappop(queue)
		if path_len == dist[v]:
			for (w, edge_len) in graph[v]:
				if edge_len + path_len < dist[w]:
					(dist[w], parents[w]) = (edge_len + path_len, v)
					heappush(queue, (edge_len + path_len, w))
	return (dist, parents)

def path(start, end, parent):
	path = [end]
	while path[-1] != start:
		path.append(parent[path[-1]])
	path.reverse()
	return path

def bfs(graph, start, goal):
	if start == goal:
		return [start]
	visited = {start}
	queue = deque([(start, [])])
	while queue:
		(current, path) = queue.popleft()
		visited.add(current)
		for neighbor in graph[current]:
			if neighbor == goal:
				return path + [current, neighbor]
			if neighbor in visited:
				continue
			queue.append((neighbor, path + [current]))
			visited.add(neighbor)
	return None
import os
import sys
from io import BytesIO, IOBase

def DecimalToBinary(n):

	def helper(n):
		if n == 0:
			return ''
		else:
			if n % 2 == 1:
				binaryDigit = '1'
			else:
				binaryDigit = '0'
			return helper(n // 2) + binaryDigit
	if n == 0:
		result = '0'
	else:
		result = helper(n)
	return result

def p(board):
	for i in range(8):
		s = ''
		for j in range(8):
			s += board[i][j]
		print(s)

def binaryToDecimal(n):
	return int(n, 2)

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

def solve(a, b):
	x = DecimalToBinary(a)
	y = DecimalToBinary(b)
	z = x + y
	l = y + x
	r = binaryToDecimal(z) - binaryToDecimal(l)
	return r

def main():
	for _ in range(inp()):
		n = inp()
		a = inlt()
		a.sort()
		flag = 0
		res = []
		if n == 1:
			print('YES')
		else:
			for i in range(n - 1):
				if a[i + 1] - a[i] <= 1:
					res.append(a[i])
			if len(res) == n or len(res) == n - 1:
				print('YES')
			else:
				print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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


t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	st = []
	for i in arr:
		if not st:
			st.append(i)
		elif st[-1] == i:
			st.pop(-1)
			st.append(i)
		elif abs(st[-1] - i) == 1:
			st.pop(-1)
			st.append(i)
		else:
			st.append(i)
	if len(st) == 1:
		print('YES')
		continue
	else:
		print('NO')
		continue


for _ in range(int(input())):
	a = int(input())
	l = [int(i) for i in input().split()]
	l = sorted(l)
	k = 0
	for i in range(1, a, 1):
		if l[i] - l[i - 1] <= 1:
			k += 1
	if a - k != 1:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
for _ in range(inp()):
	n = inp()
	x = ip()
	x.sort()
	ans = 'YES'
	for i in range(1, n):
		if x[i] - x[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


def proverka():
	for i in range(len(Lit) - 1):
		if Lit[i] % 2 == 1 and Lit[i + 1] % 2 == 0 or (Lit[i] % 2 == 0 and Lit[i + 1] % 2 == 1):
			return True
	return False
color = int(input())
for _ in range(color):
	n = input()
	Lit = list(map(int, input().split()))
	if sum(Lit) % 2 == 1:
		print('YES')
	elif proverka():
		print('YES')
	else:
		print('NO')


from collections import Counter
import io, os, math
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
rr = lambda : input()
rri = lambda : int(input())
rrm = lambda : list(map(int, input().split()))
INF = float('inf')

def solve(N, A):
	s = Counter(A)
	if len(s) == 1:
		return 'YES'
	last = max(A)
	for v in sorted(list(s)):
		if v == last:
			break
		if v + 1 not in s:
			return 'NO'
	return 'YES'
t = rri()
for _ in range(t):
	N = rri()
	A = rrm()
	print(solve(N, A))


t = int(input())
for _ in range(0, t):
	n = int(input())
	alist = list(map(int, input().split()))
	alist.sort()
	error = 0
	for k in range(0, len(alist) - 1):
		if alist[k + 1] - alist[k] > 1:
			error = 1
			break
	if error == 1:
		print('NO')
	else:
		print('YES')


test = int(input())
for i in range(0, test):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = 0
	for j in range(0, len(l) - 1):
		if l[j + 1] - l[j] == 1 or l[j + 1] - l[j] == 0:
			continue
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	z = 0
	t = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if len(l) == 1:
		print('YES')
	else:
		for q in range(len(l) - 1):
			if l[q + 1] - l[q] > 1:
				z = 1
		if z == 1:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	num = int(input())
	a = list(map(int, input().split()))
	a.sort()
	count = 0
	for i in range(1, num):
		if a[i] - a[i - 1] > 1:
			count += 1
	if count:
		print('NO')
	else:
		print('YES')


import sys
import bisect
import math as mt
t = int(input())
mod = 10 ** 9 + 7
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	(ne, no) = (0, 0)
	for i in l:
		if i % 2 == 0:
			ne += 1
		else:
			no += 1
	if no % 2 == 0 and no > 0 and (ne > 0) or no % 2 != 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for a in range(n):
	flag = True
	num = int(input())
	list = sorted([int(a) for a in input().split()])
	for i in range(0, len(list) - 1):
		if abs(list[i] - list[i + 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	list1 = list(map(int, input().split()))
	list1.sort()
	flag = 0
	for i in range(1, len(list1)):
		if list1[i] - list1[i - 1] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	r = 0
	for j in b:
		if j % 2 == 1:
			r += 1
	if r % 2 == 1:
		print('yes'.upper())
	elif r == a or r == 0:
		print('no'.upper())
	else:
		print('yes'.upper())


x = int(input())
for i in range(x):
	y = 0
	j = 0
	s = int(input())
	a = list(map(int, input().split()))
	for i in range(len(a)):
		if a[i] % 2 != 0:
			y = y + 1
		else:
			j = j + 1
	if sum(a) % 2 != 0:
		print('YES')
	elif y == len(a) or j == len(a):
		print('NO')
	elif len(a) == 2:
		print('NO')
	elif y >= 1 and j >= 1:
		print('YES')
	a.clear()


for _ in range(int(input())):
	n = int(input())
	sp = list(map(int, input().split()))
	if sum(sp) % 2 == 1:
		print('YES')
		continue
	else:
		nechet = True
		chet = True
		k = 0
		while (nechet or chet) and k < n:
			if sp[k] % 2 == 0:
				chet = False
			else:
				nechet = False
			k += 1
		if nechet or chet:
			print('NO')
		else:
			print('YES')


n = int(input())
for i in range(n):
	l = int(input())
	lst = list(map(int, input().strip().split()))
	s = 'YES'
	lst.sort()
	for j in range(0, len(lst) - 1):
		if abs(lst[j] - lst[j + 1]) <= 1:
			continue
		else:
			s = 'NO'
			break
	print(s)


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n == 0:
			print('NO')
			continue
		s = list(map(int, input().split()))
		s.sort()
		p = True
		for i in range(len(s) - 1):
			if int(s[i + 1]) - int(s[i]) >= 2:
				p = False
				break
		if p == False:
			print('NO')
		else:
			print('YES')
main()


a = int(input())
for i in range(a):
	m = True
	b = int(input())
	c = [int(s) for s in input().split()]
	c.sort()
	for i in range(1, b):
		if c[i] - c[i - 1] > 1:
			m = False
			break
	if m:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	j = 0
	while j < n - 1 and abs(arr[j] - arr[j + 1]) <= 1:
		j = j + 1
	if j == n - 1:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	g = 0
	b = int(input())
	c = list(map(int, input().split()))
	for i in c:
		if i % 2 != 0:
			g += 1
	if g % 2 != 0 and g == b:
		print('yes')
	elif g < b and g != 0:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	s.sort()
	k = s[-1]
	f = 1
	for i in range(len(s) - 2, -1, -1):
		if abs(k - s[i]) <= 1:
			s.remove(k)
			k = s[i]
		else:
			print('NO')
			f = 0
			break
	if f and len(s) == 1:
		print('YES')


t = int(input())
if 1 <= t <= 10 ** 4:
	for i in range(t):
		n = int(input())
		k = input().split()
		l = list(map(int, k))
		r = len(l)
		o = -1
		q = sum(l)
		q = int(q)
		p = []
		if q % 2 != 0:
			print('YES')
		elif q % 2 == 0:
			for i in range(r):
				o += 1
				g = l[o]
				if g % 2 != 0:
					p.append(g)
			s = len(p)
			if s < r and s != 0:
				print('YES')
			elif s == r or s == 0:
				print('NO')
			elif g % 2 == 0:
				print('NO')
				break


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	if n == 2 and a[1] - a[0] > 1:
		print('NO')
		continue
	for i in range(1, n - 1):
		if abs(a[i] - a[i - 1]) > 1 or abs(a[i] - a[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	v = 0
	num.sort()
	for j in range(n - 1):
		if num[j + 1] - num[j] > 1:
			v = 1
			break
	if v == 0:
		print('YES')
	else:
		print('NO')


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

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

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

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

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

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
input = sys.stdin.readline
for _ in range(ii()):
	n = ii()
	d = li()
	odd = 0
	for x in d:
		odd += x % 2
	print('NO') if odd == n and (not n % 2) or odd == 0 else print('YES')


def func(l):
	odd = 0
	even = 0
	for i in l:
		if i % 2 != 0:
			odd += 1
		else:
			even += 1
	if odd == 0:
		return 'NO'
	elif odd % 2 != 0:
		return 'YES'
	elif even != 0:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(func(l))


from math import ceil
for t in range(int(input())):
	n = int(input())
	li = [int(x) for x in input().split()]
	li.sort()
	i = 1
	n = len(li)
	flag = 0
	while i < n:
		if li[i] - li[i - 1] <= 1:
			i += 1
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		if a[0] % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif n % 2 == 0:
		ch = False
		nch = False
		for e in a:
			if e % 2 == 0:
				ch = True
				if nch:
					break
			elif e % 2 == 1:
				nch = True
				if ch:
					break
		if ch and nch:
			print('YES')
		else:
			print('NO')
	else:
		nch = False
		for e in a:
			if e % 2 == 1:
				nch = True
				break
		if nch:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	l = []
	n = int(input())
	l += list(map(int, input().split()))
	ctr = 0
	p = sorted(l)
	for i in range(n - 1):
		if abs(p[i] - p[i + 1]) <= 1:
			ctr += 1
	if n - 1 == ctr:
		print('YES')
	else:
		print('NO')


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

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

def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		A = getlist()
		A.sort()
		jud = 'YES'
		for i in range(N - 1):
			if A[i + 1] - A[i] > 1:
				jud = 'NO'
				break
		print(jud)
main()


def solution():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) >= 2:
			print('NO')
			return
	print('YES')
T = int(input())
while T:
	solution()
	T -= 1


x = int(input())
while x:
	y = int(input())
	l = list((int(x) for x in input().split()))
	l.sort()
	t = 0
	for i in range(1, len(l)):
		if not l[i] - l[i - 1] <= 1:
			t = t + 1
	if t == 0:
		print('Yes')
	else:
		print('No')
	x = x - 1


N = int(input())
for _ in range(N):
	m = int(input())
	data = input()
	split = data.split(' ')
	sum = 0
	a = []
	for i in range(m):
		a.append(int(split[i]))
	for i in range(m):
		sum = sum + a[i]
	if sum % 2 == 1:
		print('YES')
	elif sum % 2 == 0:
		parity = a[0] % 2
		pos = False
		for j in range(m):
			if a[j] % 2 != parity:
				pos = True
		if pos:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	od = 0
	co = 0
	for i in l:
		if i % 2 != 0:
			od = 1
			co = co + 1
	if co != n and od == 1:
		print('YES')
	elif co == n:
		su = sum(l)
		if su % 2 != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	dif = []
	for i in range(1, len(a)):
		dif.append(a[i] - a[i - 1])
	f = 0
	for i in dif:
		if i != 0 and i != 1:
			f = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	(odd, even) = (0, 0)
	if sum(arr) % 2 != 0:
		print('YES')
	else:
		for num in arr:
			if num % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd >= 1 and even >= 1:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	l = [int(num) for num in input().split()]
	l.sort()
	if n == 1:
		print('YES')
	else:
		for j in range(n - 1):
			if l[j + 1] - l[j] <= 1:
				if j == n - 2:
					print('YES')
			else:
				print('NO')
				break


def f(a):
	s = 0
	j = 0
	i = [int(f) for f in input().split()]
	s = sum(i)
	if s % 2 != 0:
		return True
	else:
		t = 0
		z = 0
		for f in i:
			if f % 2 != 0:
				t += 1
			else:
				z += 1
		if t != 0 and t % 2 == 1:
			return True
		elif t % 2 == 0 and z > 0 and (t != 0):
			return True
		else:
			return False
n = int(input())
m = []
i = 0
while i < n:
	a = int(input())
	m.append(f(a))
	i += 1
for f in m:
	if f:
		print('YES')
	else:
		print('NO')


for _ in range(0, int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	t = 0
	i = 0
	while len(b) != 1:
		if b[i + 1] - b[i] <= 1:
			b.remove(b[i])
		else:
			t = 1
			break
	if t == 1:
		print('NO')
	else:
		print('YES')


import sys
import math
import bisect
import itertools
import random
import re

def main():
	for _ in range(int(input())):
		n = int(input())
		A = list(map(int, input().split()))
		odd = 0
		for a in A:
			if a % 2 == 1:
				odd += 1
		if odd == 0:
			print('NO')
		elif odd == n and n % 2 == 0:
			print('NO')
		else:
			print('YES')
main()


from sys import stdin, stdout
from collections import Counter
input = stdin.readline

def write(n, sep='\n'):
	stdout.write(str(n))
	stdout.write(sep)

def gil():
	return list(map(int, input().split()))
for _t in range(int(input())):
	n = int(input())
	a = gil()
	a = list(set(a))
	a.sort()
	i = 1
	n = len(a)
	c = n
	while len(a) > 1 and i < n:
		if a[i] - a[i - 1] == 1:
			c -= 1
		i += 1
	if c == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	odd_number = 0
	even_number = 0
	for i in range(n):
		if a[i] % 2 != 0:
			odd_number += 1
		else:
			even_number += 1
	if odd_number % 2 != 0:
		print('YES')
	elif odd_number % 2 == 0 and even_number != 0 and (odd_number != 0):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	cnt = 0
	tr = 0
	for i in range(n):
		if l[i] % 2 == 0:
			cnt = 1
		else:
			tr = 1
	sm = sum(l)
	if sm % 2 != 0 or cnt + tr > 1:
		print('YES')
	else:
		print('NO')
	t = t - 1


for i in range(int(input())):
	(n, a) = (int(input()), list(map(int, input().split())))
	s = sum(a)
	if s & 1:
		print('YES')
	else:
		c = len(list(filter(lambda x: x % 2 == 0, a)))
		if c not in [0, n]:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(0, t):
	l = []
	ct = 0
	m = int(input())
	arr = list(map(int, input().strip().split()))[:m]
	x = min(arr)
	y = max(arr)
	for j in range(0, y + 1):
		l.append(0)
	for k in arr:
		l[k] += 1
	for j in range(x, y + 1):
		if l[j] == 0:
			ct += 1
			print('NO')
			break
	if ct == 0:
		print('YES')


import sys
import math
from math import *
from collections import defaultdict
import os
from io import BytesIO, IOBase
from collections import deque

def main(d):
	n = int(input())
	arr = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		f = True
		arr.sort()
		mn = arr[0]
		for i in range(1, n):
			if abs(arr[i] - mn) > 1:
				f = False
				break
			mn = max(mn, arr[i])
		if f:
			print('YES')
		else:
			print('NO')
d = defaultdict(lambda : 0)
for i in range(int(input())):
	main(d)


def do():
	k = int(input())
	dat = list(map(int, input().split()))
	c = True
	dat.sort()
	for j in range(1, k):
		if abs(dat[j - 1] - dat[j]) > 1:
			print('NO')
			return
	print('YES')
n = int(input())
for i in range(n):
	do()


n = int(input())
for i in range(n):
	a = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		(z, x) = (0, 0)
		for i in l:
			if i % 2 == 0:
				z += 1
			else:
				x += 1
		if z >= 1 and x >= 1:
			print('YES')
		else:
			print('NO')


T = int(input())
removeSmallArr = []

def removeSmallElem(numArr):
	numArr.sort()
	idx = 0
	while idx < len(numArr) - 1:
		if abs(numArr[idx + 1] - numArr[idx]) <= 1:
			del numArr[idx]
		else:
			idx += 1
	if len(numArr) == 1:
		return 'YES'
	else:
		return 'NO'
for t in range(T):
	size = int(input())
	numArr = list(map(int, input().split()))
	removeSmallArr.append(removeSmallElem(numArr))
for result in removeSmallArr:
	print(result)


k = int(input())
for j in range(k):
	n = int(input())
	a = list(map(int, input().split()))
	f = True
	a = sorted(a)
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			f = False
			break
	if f == False:
		print('NO')
	else:
		print('YES')


n = int(input())
kk = []
for i in range(n):
	n = int(input())
	a = [int(x) for x in input().split()]
	f = True
	sort = sorted(a)
	for j in range(n - 1):
		if n == 1:
			break
		if not (sort[j] == sort[j + 1] or sort[j] + 1 == sort[j + 1]):
			f = False
	kk.append(f)
for i in kk:
	if i:
		print('YES')
	else:
		print('NO')


import sys
t = int(sys.stdin.readline().split()[0])
tests = []
k = 0
for line in sys.stdin:
	if k % 2 == 0:
		k += 1
		continue
	test = []
	for word in line.split():
		test.append(int(word))
	tests.append(test)
	k += 1
for test in tests:
	test.sort()
	i = 0
	while i < len(test) - 1:
		if abs(test[i] - test[i + 1]) <= 1:
			test.remove(min(test[i], test[i + 1]))
			continue
		i += 1
	if len(test) == 1:
		print('YES')
	else:
		print('NO')


num_cases = int(input())
for i in range(num_cases):
	num_elements = int(input())
	str = input()
	arr2 = str.split(' ')
	for a in range(num_elements):
		arr2[a] = int(arr2[a])
	arr2.sort()
	truth = True
	for j in range(num_elements - 1):
		if arr2[j + 1] - arr2[j] > 1:
			print('NO')
			truth = False
			break
	if truth:
		print('YES')


import math
t = int(input())
while t > 0:
	o = 0
	e = 0
	a = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	for i in l:
		if i % 2 == 0:
			e = 1
		else:
			o = 1
	if s % 2 == 1 or (o == 1 and e == 1):
		print('YES')
	else:
		print('NO')
	t -= 1


def RemoveSmallest():
	for i in range(int(input())):
		x = int(input())
		y = list(map(int, input().split()))
		y.sort()
		counter = 0
		for i in range(x - 1):
			if y[i + 1] - y[i] > 1:
				counter += 1
			if counter > 0:
				print('NO')
				break
		if counter < 1:
			print('YES')
RemoveSmallest()


def checkNum(arr):
	x = arr[0]
	for i in range(1, len(arr)):
		if arr[i] != x:
			return False
	return True

def checkEven(arr):
	for x in arr:
		if x % 2 != 0:
			return False
	return True
t = int(input())
while t:
	n = int(input())
	nums = [int(x) for x in input().split()]
	s = sum(nums)
	if s % 2 != 0:
		print('YES\n')
	else:
		even = False
		odd = False
		for x in nums:
			if x % 2 == 0:
				even = True
			else:
				odd = True
		if even and odd:
			print('YES\n')
		else:
			print('NO\n')
	t -= 1


import math
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	net = sum(a)
	if net % 2 != 0:
		print('YES')
	else:
		even = []
		odd = []
		for i in a:
			if i % 2 == 0:
				even.append(i)
			else:
				odd.append(i)
		if len(even) == 0 or len(odd) == 0:
			print('NO')
		else:
			odd[0] = even[0]
			b = odd + even
			net = sum(b)
			if net % 2 != 0:
				print('YES')
			else:
				print('YES')


import sys
input = sys.stdin.readline
t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a_length = len(a)
	b = []
	for i in range(a_length):
		check = False
		for j in range(i + 1, a_length):
			if abs(a[i] - a[j]) <= 1 and check == False:
				b.append(a[i])
				check = True
	for i in range(len(b)):
		if a.count(b[i]) >= 1:
			a.remove(b[i])
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


fin = list()
t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	s1 = sorted(list(map(int, s.split())))
	for j in range(n - 1):
		if s1[j + 1] - s1[j] > 1:
			fin.append(i)
			break
for i in range(t):
	if i in fin:
		print('NO')
	else:
		print('YES')


for y in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	c = 1
	for x in a:
		i += 1
		if x != a[-1] and c != 0:
			if abs(x - a[i]) <= 1 and abs(x - a[i]) >= 0:
				pass
			else:
				c = 0
	if c == 0:
		print('NO')
	else:
		print('YES')


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heapreplace, heappushpop
from bisect import bisect_right, bisect_left

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

def fi():
	return float(stdin.readline())

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

def fmi():
	return map(float, stdin.readline().split())

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

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
mod = 1000000007
res = ['NO', 'YES']
test = test_case = 0
test_case = ii()
while test < test_case:
	test += 1
	n = ii()
	a = li()
	a.sort()
	f = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			f = 0
			break
	print(res[f])


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(d, c) = ({}, 0)
	a.sort()
	for i in a:
		if i - 1 in d:
			del d[i - 1]
			d[i] = 1
		elif i + 1 in d:
			d[i + 1] = 1
		elif d.get(i) == 1:
			pass
		else:
			d[i] = 1
			c += 1
	if n == 0:
		print('NO')
	elif c == 1 or n == 1:
		print('YES')
	else:
		print('NO')


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


test_case = int(input())
for i in range(test_case):
	size = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	check = 0
	for i in range(size - 1):
		if abs(arr[i] - arr[i + 1]) >= 2:
			check += 1
			break
	if check == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	num = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	flag = False
	for i in range(len(arr) - 1):
		if not (arr[i] + 1 == arr[i + 1] or arr[i] == arr[i + 1]):
			flag = True
	if flag == False:
		print('YES')
	else:
		print('NO')


from sys import stdin
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
from collections import deque
(t,) = gil()
for _ in range(t):
	(n,) = gil()
	a = gil()
	a.sort()
	flag = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			flag = False
			break
	print('YES' if flag else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	evensum = 0
	oddsum = 0
	for q in range(n):
		if a[q] & 1 == 1:
			oddsum += 1
		else:
			evensum += 1
	if oddsum % 2 == 1:
		print('YES')
	elif evensum == n or oddsum == n:
		print('NO')
	else:
		print('YES')


in1 = int(input())
for _ in range(in1):
	in2 = int(input())
	in3 = []
	in3 = list(map(int, input().split()))
	if sum(in3) & 1 == 1:
		print('YES')
	else:
		odd = False
		even = False
		for i in range(in2):
			if in3[i] & 1 == 0:
				even = True
			else:
				odd = True
		if even == False or odd == False:
			print('NO')
		else:
			print('YES')


def is_changable(array):
	contains_even = False
	contains_odd = False
	for number in array:
		contains_even |= number % 2 == 0
		contains_odd |= number % 2 == 1
	size = len(array)
	with_even_size = size % 2 == 0 and contains_even and contains_odd
	with_odd_size = size % 2 == 1 and contains_odd
	return with_even_size or with_odd_size
number_of_tests = int(input())
for _ in range(number_of_tests):
	input()
	array = [int(x) for x in input().split()]
	result = 'YES' if is_changable(array) else 'NO'
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	diff_arr = [arr[i + 1] - arr[i] for i in range(n - 1)]
	if any((j for j in diff_arr if j > 1)):
		print('NO')
	else:
		print('YES')


for test in range(int(input())):
	n = int(input())
	l = sorted(map(int, input().split()))
	i = 0
	flag = True
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			flag = False
			break
	print('YES' if flag else 'NO')


t = int(input())
while t > 0:
	n = int(input())
	seq = list(map(int, input().split()))
	sort_seq = sorted(seq)
	count = n
	for i in range(n - 1):
		if sort_seq[i + 1] - sort_seq[i] <= 1:
			count -= 1
		else:
			break
	if count <= 1:
		print('YES')
	else:
		print('NO')
	t -= 1


for t in range(int(input())):
	n = int(input())
	s = sorted(set(map(int, input().split())))
	f = 1
	for i in range(1, len(s)):
		if abs(s[i - 1] - s[i]) > 1:
			f = 0
			break
	if f == 1:
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	n = input()
	l = sorted([int(a) for a in input().split()])
	result = 'YES'
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			result = 'NO'
	print(result)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	p = 1
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			p = 0
	if p == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(set([int(x) for x in input().split()]))
	arr.sort()
	noCalled = False
	for j in range(1, len(arr)):
		if arr[j] - arr[j - 1] != 1:
			print('NO')
			noCalled = True
			break
	if not noCalled:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	ans = 0
	for i in li:
		if i % 2 == 1:
			ans += 1
	if n % 2 == 0 and ans == n:
		print('NO')
	elif ans == 0:
		print('NO')
	else:
		print('YES')


for j in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))[:n]
	s.sort()
	c = 0
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if abs(s[i] - s[i - 1]) <= 1:
				c = 1
			else:
				c = 0
				break
		if c == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	f = 0
	if n % 2:
		k = 0
		for i in s:
			if i % 2 == 0:
				k += 1
		if k == n:
			f = 1
	else:
		k = 0
		for i in s:
			if i % 2:
				k += 1
		if k == n or k == 0:
			f = 1
	if f:
		print('NO')
	else:
		print('YES')


t = int(input())
for jk in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	num0 = 0
	num1 = 0
	for i in num:
		if i % 2 == 0:
			num0 = 1
		else:
			num1 = 1
	if num1 == 0:
		print('NO')
		continue
	elif num0 == 0 and len(num) % 2 == 0:
		print('NO')
	else:
		print('YES')


def Input():
	tem = input().split()
	ans = []
	for it in tem:
		ans.append(int(it))
	return ans
from collections import Counter
T = Input()[0]
for tt in range(T):
	n = Input()[0]
	a = Input()
	(odd, even, total) = (0, 0, 0)
	for i in range(n):
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
		total += a[i]
	if total % 2 == 1 or (even > 0 and odd > 0):
		print('YES')
	else:
		print('NO')


def solve(n: int, array: [int]) -> str:
	sorted_no_duplicates = sorted(set(array))
	length = len(sorted_no_duplicates)
	if length == 1:
		return 'YES'
	for i in range(length - 1):
		if sorted_no_duplicates[i + 1] - sorted_no_duplicates[i] > 1:
			return 'NO'
	return 'YES'
T = int(input())
for I in range(T):
	N = int(input())
	s = [int(input_value) for input_value in input().split(' ')]
	print(solve(N, s))


t = int(input())
while t > 0:
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	ans = True
	for i in range(1, n):
		if arr[i] != arr[i - 1] and arr[i] != arr[i - 1] + 1:
			ans = False
			break
	out = 'YES' if ans else 'NO'
	print(out)
	t -= 1


a = int(input())
for i in range(a):
	s = int(input())
	z = list(map(int, input().split()))
	z.sort()
	flag = 0
	for i in range(1, len(z)):
		if z[i] - z[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	lis = [int(x) for x in input().split()]
	lis.sort()
	flag = 0
	for i in range(n - 1):
		if lis[i] + 1 < lis[i + 1]:
			flag = 1
	if flag == 0:
		print('YES')
	else:
		print('NO')


t = int(input())

def r(arr):
	odd = 0
	even = 0
	for x in arr:
		if x % 2 == 0:
			even += 1
		else:
			odd += 1
		if even >= 1 and odd >= 1:
			return 'YES'
	if even == 0 and odd % 2 != 0:
		return 'YES'
	return 'NO'
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(r(arr))


t = int(input())
for x in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	c1 = False
	c2 = False
	for x in a:
		if x % 2 == 0:
			c1 = True
		else:
			c2 = True
	if c2:
		if n % 2 == 0 and (not c1):
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


t = int(input())
ans = []
for i in range(t):
	t = input()
	t = [int(i) for i in input().split()]
	t.sort()
	key = True
	for j in range(len(t) - 1):
		if abs(t[j + 1] - t[j]) > 1:
			key = False
	if key:
		ans.append('YES')
	else:
		ans.append('NO')
print('\n'.join(ans))


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	if sum(arr) % 2 != 0:
		print('YES')
	else:
		cnt = 0
		for i in range(n):
			if arr[i] % 2 != 0:
				cnt += 1
		if cnt == 0 or cnt == n:
			print('NO')
		else:
			print('YES')


t = int(input())
for T in range(t):
	n = input()
	a = set(map(int, input().split()))
	b = set(range(min(a), max(a) + 1))
	print('YES' if a == b else 'NO')


for _ in range(int(input())):
	len_a = int(input())
	a = sorted(list(map(int, input().split())))
	ok = True
	for i in range(1, len_a):
		ok &= a[i] - a[i - 1] <= 1
	print('YES') if ok else print('NO')


from sys import stdin

def input():
	return stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	s = sorted(list(map(int, input().split())))
	if len(s) == 1:
		print('YES')
	else:
		flag = True
		for i in range(n):
			if s[i] - s[i - 1] > 1:
				flag = False
		if flag:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l = sorted(l)
	flag = 1
	for i in range(n - 1):
		if l[i + 1] - l[i] >= 2:
			flag = 0
			print('NO')
			break
	if flag == 1:
		print('YES')


test = int(input())
while test:
	n = int(input())
	a = list(map(int, input().split()))
	par = 0
	nepar = 0
	for i in a:
		if i % 2 == 0:
			par += 1
		else:
			nepar += 1
	if nepar == 0:
		print('NO')
	elif par == 0:
		if nepar % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif par == nepar:
		print('YES')
	elif nepar > par or par > nepar:
		print('YES')
	a = []
	test -= 1


t = int(input())
for i in range(t):
	l = int(input())
	ara = list(map(int, input().split()))
	ara.sort()
	flag = False
	for j in range(l - 1):
		if ara[j + 1] - ara[j] > 1:
			print('NO')
			flag = True
			break
	if not flag:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	x = False
	y = False
	r = [int(i) for i in input().split()]
	for i in r:
		if i % 2 == 0:
			y = True
		else:
			x = True
	if y and x:
		print('YES')
	elif x and len(r) % 2 == 1:
		print('YES')
	else:
		print('NO')


import itertools
import math
import sys
from collections import Counter
from fractions import gcd
from functools import reduce
import sys
sys.setrecursionlimit(4100000)
INF = 1 << 60
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	cnt = 0
	for i in a:
		if i % 2 == 1:
			cnt += 1
	if n % 2 == 0:
		if 1 <= cnt < n:
			print('YES')
		else:
			print('NO')
	elif cnt >= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	l = int(input())
	a = list(map(int, input().split()))
	a = list(set(a))
	a = sorted(a)
	for i in range(len(a) - 1):
		first = a[i]
		if first + 1 != a[i + 1]:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(1, t + 1):
	tt = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('Yes')
	elif any((j % 2 == 0 for j in l)) and any((i % 2 == 1 for i in l)):
		print('Yes')
	else:
		print('No')


t = int(input())
j = 0
while j < t:
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	v = 1
	while i < len(a) - 1:
		if a[i + 1] - a[i] > 1:
			break
		v += 1
		i += 1
	if v == len(a):
		print('YES')
	else:
		print('NO')
	j += 1


t = int(input())
for case in range(t):
	n = int(input())
	List = [int(j) for j in input().split(' ')]
	List.sort()
	for i in range(n - 1):
		if abs(List[0] - List[1]) <= 1:
			del List[0]
	if len(List) == 1:
		print('YES')
	else:
		print('NO')


rty = int(input())

def f1(l):
	for i in l:
		if i % 2 == 1:
			return True
	return False

def f2(l):
	for i in l:
		if i % 2 == 0:
			return True
	return False
for gfh in range(rty):
	n = int(input())
	l = list(map(int, input().split()))
	if n == 1:
		if l[0] % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif not f1(l):
		print('NO')
	elif f2(l):
		print('YES')
	elif n % 2 == 1:
		print('YES')
	else:
		print('NO')


testcases = int(input())
output = ''
for x in range(0, testcases):
	n = int(input())
	A = [int(t) for t in input().split()]
	if A == [t for t in A if t % 2 == 0]:
		output = output + 'NO\n'
	elif A == [t for t in A if t % 2 == 1]:
		if n % 2 == 0:
			output = output + 'NO\n'
		else:
			output = output + 'YES\n'
	else:
		output = output + 'YES\n'
print(output)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if all((a[i + 1] - a[i] <= 1 for i in range(n - 1))):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))[:n]
	arr.sort()
	for k in range(n - 1, 0, -1):
		if arr[k] - arr[k - 1] <= 1:
			arr.pop(k)
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for __ in range(t):
		n = int(input())
		s = list(map(int, input().split()))
		eve = 0
		odd = 0
		for i in s:
			if i % 2 == 0:
				eve += 1
			else:
				odd += 1
		if sum(s) % 2:
			print('YES')
		elif eve >= 1 and odd >= 1:
			print('YES')
		else:
			print('NO')
main()


for _ in range(int(input())):
	n = int(input())
	c = sum((i % 2 for i in list(map(int, input().split()))))
	if c == 0 or (c == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for z in range(t):
	n = int(input())
	list = [int(i) for i in input().split()]
	if sum(list) % 2 == 1:
		print('YES')
	else:
		even = 0
		odd = 0
		for i in range(n):
			if list[i] % 2 == 1:
				odd += 1
			else:
				even += 1
		if even == n or odd == n:
			print('NO')
		else:
			print('YES')


test_cases = int(input())
for _ in range(test_cases):
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	counter = 0
	a = sorted(a)
	flag = False
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			flag = True
			break
	if not flag:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	x = int(input())
	a = 0
	for _ in map(int, input().split()):
		a += _ % 2
	print('YES' if a % 2 or (a and a < x) else 'NO')


for i in range(int(input())):
	input()
	(e, od) = (0, 0)
	lst = list(map(int, input().split()))
	if sum(lst) % 2 != 0:
		print('YES')
	else:
		for i in lst:
			if i % 2 == 0:
				e = e + 1
			else:
				od = od + 1
		if od >= 1 and e >= 1:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	if sum(b) % 2 != 0:
		print('YES')
	else:
		k = 0
		r = 0
		for j in b:
			if j % 2 == 0:
				k += 1
			else:
				r += 1
		if k == 0 or r == 0:
			print('NO')
		else:
			print('YES')


from collections import defaultdict, Counter
from math import log, ceil, floor

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


t = int(input())
for testcase in range(t):
	n = int(input())
	num = list(map(int, input().split(' ')))
	num.sort()
	if len(num) == 1:
		print('YES')
		continue
	x = 1
	while len(num) != 1:
		try:
			if num[x] - 1 == num[x - 1]:
				num.pop(x - 1)
			elif num[x] == num[x - 1]:
				num.pop(x)
			else:
				x += 1
		except IndexError:
			break
	if len(num) == 1:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	N = int(input())
	s = list(map(int, input().split()))
	s.sort()
	c = 0
	res = True
	for n in range(N - 1):
		if s[n + 1] - s[n] > 1:
			res = False
			break
	if res:
		print('YES')
	else:
		print('NO')


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

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

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

def solve():
	n = int(inputi())
	aa = [int(a) for a in inputi().split()]
	aa.sort()
	if any((a - b > 1 for (a, b) in zip(aa[1:], aa))):
		print('NO')
	else:
		print('YES')

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


t = int(input())
for j in range(t):
	n = int(input())
	l = [int(j) for j in input().split()]
	f = 0
	l.sort(reverse=True)
	for i in range(0, n - 1):
		if l[i] - l[i + 1] > 1:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


t = int(input())
k = []
for i in range(0, t, 1):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = True
	for j in range(0, n - 1, 1):
		if abs(a[j] - a[j + 1]) > 1:
			flag = False
	if flag:
		k.append(1)
	else:
		k.append(0)
for i in range(0, t, 1):
	if k[i] == 1:
		print('Yes')
	else:
		print('No')


query = int(input())
for i in range(query):
	size = int(input())
	count = 0
	arr = list(map(int, input().split()))
	arr.sort()
	count = 0
	for j in range(size - 1):
		if arr[j + 1] - arr[j] > 1:
			count += 1
	if count < 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().strip().split()))
	sum_a = sum(a)
	odd_even = [i % 2 for i in a]
	if sum_a % 2 == 1:
		print('YES')
	elif odd_even.count(0) == n or odd_even.count(1) == n:
		print('NO')
	else:
		print('Yes')
	t -= 1


for _ in range(int(input())):
	N = int(input())
	A = list(map(int, input().split()))
	A.sort()
	b = True
	if N == 1:
		print('YES')
		continue
	for x in range(N - 1):
		if A[x + 1] - A[x] > 1:
			b = False
			break
	print('YES' if b else 'NO')


t = int(input())
for i in range(0, t):
	x = int(input())
	li = list(map(int, input().split()))
	li1 = list(set(li))
	li1.sort()
	if len(li1) == 1:
		print('YES')
	else:
		count = 0
		for j in range(0, len(li1) - 1):
			if li1[j + 1] - li1[j] > 1:
				print('NO')
				count = 1
				break
			else:
				continue
		if count == 0:
			print('YES')


def program():
	n = int(input())
	l = list(map(int, input().split()))
	odd = False
	even = False
	for x in l:
		if x % 2 == 0:
			even = True
		else:
			odd = True
	if odd and even:
		print('YES')
	elif even:
		print('NO')
	elif n % 2 == 0:
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(t):
	program()


from sys import stdin

def solve(arr, n):
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			return
	print('YES')

def solution():
	input = stdin.readline
	t = int(input())
	for i in range(t):
		n = int(input())
		arr = sorted((int(x) for x in input().split()))
		solve(arr, n)
solution()


import sys

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

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

def Num():
	return int(input())

def solve():
	n = Num()
	a = List()
	s = set()
	for i in range(n):
		for j in range(i + 1, n):
			if abs(a[i] - a[j]) <= 1:
				if a[i] < a[j]:
					s.add(i)
				else:
					s.add(j)
	if n - len(s) == 1:
		print('YES')
	else:
		print('NO')
for _ in range(Num()):
	solve()


T = int(input())
for t in range(T):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	c = 0
	i = 0
	while n > 1:
		if not l[i] + 1 >= l[i + 1]:
			c += 1
		else:
			n -= 1
		i += 1
		if c == 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	d = 0
	for i in l:
		if i % 2 == 0:
			c += 1
		else:
			d += 1
	if c > 0 and d > 0:
		print('YES')
	elif c == n:
		print('NO')
	elif d == n and sum(l) % 2 == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for num in a:
		if num % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
	elif n % 2 == 0 and even == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	n = int(input())
	ar = [int(i) for i in input().strip().split()]
	(odd, even) = (0, 0)
	for i in ar:
		if i & 1:
			odd += 1
		else:
			even += 1
	if odd == 0 or (even == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


import sys

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

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

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

def getArray(intn):
	return [int(input()) for i in range(intn)]

def input():
	return sys.stdin.readline().rstrip()
for _ in range(getN()):
	n = getN()
	arr = getList()
	odd = 0
	for i in arr:
		if i & 1:
			odd += 1
	if not odd or (odd == n and (not n & 1)):
		print('NO')
	else:
		print('YES')


t = int(input())
for cnt in range(t):
	n = int(input())
	L = list(map(int, input().split()))
	e = 0
	o = 0
	for l in L:
		if l % 2 == 0:
			e += 1
		else:
			o += 1
	if o > 0 and e > 0:
		print('YES')
	elif e == 0:
		if o % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif o == 0:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = 0
	c = 0
	f = 0
	if n == 1:
		if l[0] % 2 == 0:
			pass
		else:
			f = 1
	else:
		for i in range(n):
			if l[i] % 2 == 0:
				c = c + 1
			else:
				s = s + 1
			if c >= 1 and s >= 1:
				f = 1
				break
		if c == 0 and s % 2 != 0:
			f = 1
	if f == 0:
		print('NO')
	else:
		print('YES')


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
for _ in range(inin()):
	n = inin()
	l = ain()
	l.sort()
	f = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


test = int(input())
for i in range(test):
	l = int(input())
	arr = list(map(int, input().split()))
	s = sum(arr)
	noOfOdds = 0
	for j in arr:
		if j % 2 != 0:
			noOfOdds += 1
	noOfEven = l - noOfOdds
	if noOfOdds == 0:
		print('NO')
	elif noOfEven == 0 and l % 2 == 0:
		print('NO')
	else:
		print('YES')


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

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, sys.stdin.readline().split(' ')))
	cs = sum(a)
	f = 0
	for v in a:
		if v % 2:
			f += 1
	if cs % 2:
		print('YES')
	elif f > 0 and f < n:
		print('YES')
	else:
		print('NO')
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


TestCasesCount = int(input())
PP = []
for i in range(TestCasesCount):
	ArrayLength = int(input())
	Array = input().split()
	Array = [int(x) for x in Array]
	BoolArray = [0] * 100
	for Int in Array:
		BoolArray[Int - 1] += 1
	IsFirst = True
	IsBetween = False
	Result = 'YES'
	for Int in BoolArray:
		if Int > 0 and IsFirst:
			IsFirst = False
			continue
		elif Int == 0 and (not IsFirst):
			IsBetween = True
		elif Int > 0 and IsBetween:
			Result = 'NO'
	PP.append(Result)
for x in PP:
	print(x)


def sint():
	return int(input())

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

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

def sstr():
	s = input()
	return list(s[:len(s)])

def main():
	t = sint()
	while t:
		t -= 1
		n = sint()
		ara = sara()
		(odd, ev, s) = (0, 0, 0)
		for i in ara:
			s += i
			if i % 2:
				odd += 1
			else:
				ev += 1
		if s % 2 or (odd and ev):
			print('Yes')
		else:
			print('No')
main()


tests = int(input())
for i in range(0, tests):
	longitud = int(input())
	array = list(map(int, input().split()))
	j = 0
	if longitud == 1:
		print('YES')
	array.sort()
	while j < longitud - 1:
		if abs(array[j] - array[j + 1]) <= 1:
			j += 1
		else:
			print('NO')
			break
	if j == longitud - 1 and j != 0:
		print('YES')


t = int(input())
for i in range(t):
	n = input()
	a = [int(_) for _ in input().split()]
	a.sort()
	prv = a[0]
	good = True
	for nxt in a:
		if nxt > prv + 1:
			good = False
			break
		prv = nxt
	print('YES' if good else 'NO')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ok = 'YES'
	for x in range(1, n):
		if arr[x] - arr[x - 1] > 1:
			ok = 'NO'
			break
	print(ok)


import sys
input = sys.stdin.readline

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

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

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

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	n = getInt()
	a = getList()
	a1 = 0
	a2 = 0
	for i in range(n):
		if a[i] % 2 == 0:
			a2 = 1
		else:
			a1 = 1
	if a1 == 1 and (a2 == 1 or n % 2 == 1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	maxx = 0
	for i in range(1, n):
		maxx = max(maxx, arr[i] - arr[i - 1])
	if maxx <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for j in range(t):
	n = int(input())
	l = sorted([int(k) for k in input().split()])
	l1 = l.copy()
	for i in range(n - 1):
		a = l[i]
		b = l[i + 1]
		if abs(a - b) <= 1:
			l1.remove(a)
	if len(l1) == 1:
		print('YES')
	else:
		print('NO')


t = input()
t = int(t)
while t > 0:
	n = input()
	n = int(n)
	s = input()
	s = [int(x) for x in s.split()]
	if len(s) == 1:
		print('YES')
		t -= 1
		continue
	count = 0
	s = sorted(s)
	for i in range(len(s) - 1):
		if abs(s[i] - s[i + 1]) > 1:
			count += 1
	if count == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for l in range(t):
	n = int(input())
	a = input().strip().split(' ')
	ar = []
	for i in a:
		if i:
			ar.append(int(i))
	ar.sort()
	c = 0
	for i in range(1, len(ar)):
		if ar[i] - ar[i - 1] > 1:
			c += 1
	if c > 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	is_any_odd = any([x % 2 == 1 for x in a])
	is_any_even = any([x % 2 == 0 for x in a])
	if sum(a) % 2 == 1 or (is_any_odd and is_any_even):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t = t - 1
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	f = 0
	for w in range(n - 1):
		if l[w + 1] - l[w] > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c1 = 0
	c2 = 0
	summ = 0
	for i in range(len(l)):
		summ += l[i]
		if l[i] % 2 == 0:
			c1 += 1
		else:
			c2 += 1
	if summ % 2 != 0:
		print('YES')
	elif c1 != 0 and c2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = map(int, input().split())
	has_o = False
	has_e = False
	sum = 0
	for x in a:
		sum += x
		if x % 2 == 0:
			has_e = True
		else:
			has_o = True
	if sum % 2 == 1 or (has_e and has_o):
		print('YES')
	else:
		print('NO')


n = int(input())
result = []
for i in range(n):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	count = 0
	for i in range(1, len(l)):
		if l[i] == l[i - 1] + 1 or l[i] == l[i - 1]:
			count += 1
	if count == len(l) - 1:
		result.append('YES')
	else:
		result.append('NO')
for i in result:
	print(i)


t = int(input())

def foo(x):
	flag = True
	i = 1
	while i < len(x):
		if x[i] - x[i - 1] > 1:
			flag = False
			break
		else:
			i += 1
	return flag
for i in range(t):
	n = input()
	m = sorted(map(int, input().split()))
	print('YES' if foo(m) else 'NO')


for _ in range(int(input())):
	n = int(input())
	l = [int(p) for p in input().split()]
	l.sort()
	k = 0
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			k = 1
			break
	if k:
		print('NO')
	else:
		print('YES')


import sys, bisect
from sys import stdin, stdout
from bisect import bisect_left, bisect_right, bisect, insort, insort_left, insort_right
from math import gcd, ceil, floor, sqrt
from collections import Counter, defaultdict, deque, OrderedDict
from queue import Queue, PriorityQueue
from string import ascii_lowercase
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 998244353
mod = 10 ** 9 + 7

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	for i in range(5, ceil(sqrt(n)) + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def st():
	return list(stdin.readline().strip())

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

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

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

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

def DFS(dictionary, vertex, visited):
	visited[vertex] = True
	stack = [vertex]
	print(vertex)
	while stack:
		a = stack.pop()
		for i in dictionary[a]:
			if not visited[i]:
				print(i)
				visited[i] = True
				stack.append(i)

def BFS(dictionary, vertex, visited):
	visited[vertex] = True
	q = deque()
	q.append(vertex)
	while q:
		a = q.popleft()
		for i in dictionary[a]:
			if not visited[i]:
				visited[i] = True
				q.append(i)
				print(i)

def soe(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	n = inp()
	l = li()
	(o, e) = (0, 0)
	for i in l:
		if i & 1:
			o += 1
		else:
			e += 1
	if e == 0:
		if n % 2 == 0:
			pr('NO')
		else:
			pr('YES')
	elif o:
		pr('YES')
	else:
		pr('NO')
for _ in range(inp()):
	solve()


def mult(l):
	ans = 1
	for x in l:
		ans = ans * x
	return ans
T = int(input())
for t in range(T):
	n = int(input())
	l = list(map(int, input().split()))
	fe = 0
	fo = 0
	if len(l) % 2 == 0:
		for x in l:
			if x % 2 == 0:
				fe = 1
			else:
				fo = 1
		if fe == 1 and fo == 1:
			print('YES')
		else:
			print('NO')
	else:
		for x in l:
			if x % 2 != 0:
				fo = 1
				break
		if fo == 1:
			print('YES')
		else:
			print('NO')


def fun(arr):
	a = sorted(arr)
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(fun(arr))


import math
import sys
t = int(input())
for cs in range(t):
	n = int(input())
	ar = set(map(int, input().split()))
	mn = 1000
	mx = -1
	for x in ar:
		mn = min(mn, x)
		mx = max(mx, x)
	if len(ar) == mx - mn + 1:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		l = [int(i) for i in input().split()]
		l.sort()
		f = 1
		if n == 1:
			f = 1
		else:
			for i in range(1, n):
				if abs(l[i - 1] - l[i]) > 1:
					f = 0
					break
		if f == 0:
			print('NO')
		else:
			print('YES')
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	a.sort()
	for i in range(n - 1, 0, -1):
		a[i] -= a[i - 1]
	if max(a[1:]) > 1:
		print('NO')
	else:
		print('YES')


def oneOdd(ar):
	for i in ar:
		if i % 2 == 1:
			return True
	return False

def allOdd(ar):
	for i in ar:
		if i % 2 == 0:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	if sum(ar) % 2 == 1:
		print('YES')
	elif oneOdd(ar):
		if not allOdd(ar):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


x = int(input())
for i in range(x):
	cont = 0
	n = int(input())
	k = input().split()
	k = [int(i) for i in k]
	for i in range(n):
		if k[i] % 2 != 0:
			cont += 1
	print('NO' if cont == n and n % 2 == 0 or cont == 0 else 'YES')


t = int(input())
for test in range(t):
	n = int(input())
	nums = [int(x) for x in input().split()]
	flag = 1
	nums.sort()
	for i in range(1, n):
		if nums[i] - nums[i - 1] >= 2:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


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


t = int(input())
while t:
	t -= 1
	n = int(input())
	s = 0
	L = list(map(int, input().split()))
	for i in L:
		s += i % 2
	if s % 2 == 0 and (s == n or s == 0):
		print('NO')
	else:
		print('YES')


def solve(lst):
	lst.sort()
	numOffs = 0
	for i in range(len(lst) - 1):
		if lst[i + 1] - lst[i] > 1:
			return 'NO'
	return 'YES'
test_cases = int(input())
for i in range(test_cases):
	n = input()
	lst = list(map(int, input().rstrip().split()))
	res = solve(lst)
	print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	a = {int(x) for x in input().split()}
	a = sorted(a)
	lena = len(a)
	if lena == 1:
		print('YES')
	else:
		for i in range(1, len(a)):
			if a[i] - a[i - 1] != 1:
				print('NO')
				break
		else:
			print('YES')


T = input()
for i in range(int(T)):
	a = int(input())
	l = list()
	str = input()
	l = str.strip().split()
	for i in range(len(l)):
		l[i] = int(l[i])
	sor = sorted(l)
	flag = 0
	for k in range(a - 1):
		ab = abs(sor[k] - sor[k + 1])
		if ab > 1:
			print('NO')
			flag = -1
			break
	if flag == 0:
		print('YES')


a = int(input())
count = 0
for i in range(a):
	b = int(input())
	c = input().split()
	for m in range(len(c) - 1):
		for n in range(m + 1, len(c)):
			if int(c[m]) > int(c[n]):
				(c[m], c[n]) = (c[n], c[m])
	for l in range(b - 1):
		for k in range(l + 1, b):
			if abs(int(c[l]) - int(c[k])) <= 1:
				c[l] = '0'
	for o in range(b):
		if c[o] != '0':
			count += 1
	if count == 1:
		print('YES')
		count = 0
	else:
		print('NO')
		count = 0


t = int(input())
even = []
for i in range(t):
	n = int(input())
	lst = [int(i) for i in input().split()]
	s = sum(lst)
	if s % 2 != 0:
		print('YES')
	else:
		for j in range(len(lst)):
			if lst[j] % 2 == 0:
				even.append(lst[j])
		even_len = len(even)
		odd_len = len(lst) - len(even)
		if even_len != 0 and odd_len != 0 and (odd_len % 2 == 0):
			print('YES')
		else:
			print('NO')
	even.clear()
	even_len = 0
	odd_len = 0


number_of_cases = int(input())
for i in range(number_of_cases):
	number_of_elements = int(input())
	numbers = sorted([int(i) for i in input().split()])
	if len(numbers) == 1:
		print('YES')
	else:
		for j in range(len(numbers) - 1):
			if numbers[j + 1] - numbers[j] > 1:
				print('NO')
				break
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	A = [int(x) for x in input().split()]
	t = 1
	A.sort()
	for i in range(1, n):
		if A[i] - A[i - 1] > 1:
			t = 0
			break
	if t == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t != 0:
	n = int(input())
	arrDict = dict()
	arr = list(map(int, input().split()))
	numOfOdd = 0
	for i in range(len(arr)):
		if arr[i] % 2 != 0:
			numOfOdd += 1
	result = 'NO'
	if numOfOdd % 2 != 0:
		result = 'YES'
	elif n % 2 == 0 and numOfOdd < n and (numOfOdd != 0):
		result = 'YES'
	elif n % 2 != 0 and numOfOdd < n and (numOfOdd != 0):
		result = 'YES'
	if n == 1 and numOfOdd == 0:
		result = 'NO'
	print(result)
	t -= 1


t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		flag = True
		a.sort()
		for i in range(n - 1):
			c = a[i]
			d = a[i + 1]
			if abs(c - d) > 1:
				print('NO')
				flag = False
				break
		if flag:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(int(el) % 2 == 1) for el in input().split()]
	if 1 <= sum(a) < n or (sum(a) == n and n % 2 == 1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	l = 1
	while l < n and a[l] - a[l - 1] <= 1:
		l += 1
	r = n - 2
	while r >= 0 and a[r + 1] - a[r] <= 1:
		r -= 1
	if l == n or r == -1 or l - 1 == r + 1:
		print('YES')
	else:
		print('NO')


def solution():
	T = int(input())
	answers = []
	for i in range(T):
		size = int(input())
		(odd_count, even_count) = (0, 0)
		num_list = [int(i) for i in input().split(' ')]
		for num in num_list:
			if num % 2 == 0:
				even_count += 1
			else:
				odd_count += 1
		if size % 2 == 0:
			if odd_count >= 1 and even_count >= 1:
				answers.append('YES')
			else:
				answers.append('NO')
		elif odd_count >= 1:
			answers.append('YES')
		else:
			answers.append('NO')
	for res in answers:
		print(res)
solution()


import sys
sys.setrecursionlimit(2 ** 20)
I = sys.stdin.readline
pr = sys.stdout.write

def solve():
	I()
	ar = sorted([*map(int, I().split())])
	for (x, y) in zip(ar, ar[1:]):
		if abs(x - y) > 1:
			pr('NO\n')
			return
	pr('YES\n')

def main():
	for _ in range(int(I())):
		solve()
main()


q = int(input())
while q:
	n = int(input())
	l = map(int, input().split())
	cnt1 = 0
	cnt2 = 0
	for ele in l:
		if ele % 2:
			cnt1 += 1
		else:
			cnt2 += 1
	if cnt1 % 2:
		print('YES')
	elif cnt2 != 0 and cnt1 != 0:
		print('YES')
	else:
		print('NO')
	q -= 1


from sys import stdin
T = int(stdin.readline().strip())
for caso in range(T):
	n = int(stdin.readline().strip())
	s = list(map(int, stdin.readline().strip().split()))
	impares = 0
	pares = 0
	for i in s:
		if i % 2 == 0:
			pares += 1
		else:
			impares += 1
	if impares == n and n % 2 != 0 or (pares > 0 and impares > 0):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if len(l) == 1:
		print('YES')
	else:
		count = 0
		for j in range(len(l)):
			if j == len(l) - 1:
				break
			elif abs(l[j] - l[j + 1]) > 1:
				print('NO')
				count += 1
				break
		if count == 0:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	l = list(a)
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			c = min(a[i], a[i + 1])
			l.remove(c)
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time

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

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

def S():
	return input()

def MS():
	return map(str, input().split())

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

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

def StoI():
	return [ord(i) - 97 for i in input()]

def ItoS(nn):
	return chr(nn + 97)

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

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = {False: 'No', True: 'Yes'}
MOD = 10 ** 9 + 7
inf = float('inf')
IINF = 10 ** 10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False

def solve(T):
	n = I()
	a = LI()
	odd = 0
	even = 0
	for i in range(n):
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == n:
		print('NO')
	elif odd == n:
		if n % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')

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


from sys import setrecursionlimit
setrecursionlimit(10 ** 9)
import threading
threading.stack_size(67108864)

def solution():
	n = int(input())
	a = sorted(map(int, input().split()))
	deleted = set()
	for i in range(n - 1):
		if a[i + 1] - a[i] <= 1:
			deleted.add(i)
	if len(deleted) == n - 1:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solution()


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
	else:
		maxi = 0
		for i in range(1, n):
			maxi = max(l[i] - l[i - 1], maxi)
		if maxi > 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	oddcount = 0
	evencount = 0
	for i in li:
		if i % 2 == 0:
			evencount += 1
		else:
			oddcount += 1
	if evencount == n:
		print('NO')
	elif oddcount % 2 == 1:
		print('YES')
	elif oddcount != n:
		print('YES')
	else:
		print('NO')


a = input()
for x in range(int(a)):
	b = input()
	c = input().split(' ')
	list1 = [int(i) for i in c]
	ans = 0
	list1.sort()
	for i in range(1, len(list1)):
		if list1[i] - list1[i - 1] > 1:
			ans = 1
			break
	if ans == 0:
		print('YES')
	else:
		print('NO')


for _ in range(0, int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	gap = 0
	for i in range(1, len(l)):
		gap = max(gap, l[i] - l[i - 1])
	if gap <= 1:
		print('YES')
	else:
		print('NO')


def check(a):
	if len(a) == 1:
		print('YES')
	else:
		a = list(a)
		for (i, ele) in enumerate(a):
			if i == len(a) - 1:
				break
			if a[i + 1] - a[i] != 1:
				print('NO')
				break
			else:
				continue
		if i == len(a) - 1:
			print('YES')
t = int(input())
for i in range(t):
	b = input()
	a = input().split(' ')
	a = set(map(int, a))
	check(sorted(a))


from itertools import combinations

def returnDiff(combination):
	return abs(combination[1] - combination[0])
t = int(input())
for _ in range(t):
	listofnum = list()
	n = int(input())
	rawInput = input()
	count = 0
	inp = [int(element) for element in rawInput.split(' ')]
	inp.sort()
	for index in range(n):
		if abs(inp[index] - inp[index - 1]) > 1:
			count += 1
	if count > 1:
		print('NO')
	else:
		print('YES')


import math
import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
T = inp()
for t in range(T):
	N = inp()
	A = inlt()
	A.sort()
	fl = True
	for n in range(N - 1):
		if abs(A[n] - A[n + 1]) > 1:
			fl = False
			break
	if fl:
		print('YES')
	else:
		print('NO')


def a():
	n = int(input())
	arr = [int(i) for i in input().split()]
	if n == 1:
		return True
	arr.sort()
	maxdiff = 0
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) >= 2:
			return False
	return True
t = int(input())
for i in range(t):
	g = a()
	if g:
		print('YES')
	else:
		print('NO')


import sys
import bisect
import math as mt
input = sys.stdin.readline
t = int(input())
mod = 10 ** 9 + 7
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	(o, e) = (0, 0)
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o % 2 != 0:
		print('YES')
	elif o > 0 and e > 0:
		print('YES')
	else:
		print('NO')


from functools import reduce
from math import ceil, log2
from operator import add, sub
from collections import Counter

def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	if len(arr) == 0:
		print('NO')
		return
	if len(arr) == 1:
		print('YES')
		return
	arr.sort()
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] < 2:
			continue
		else:
			print('NO')
			return
	print('YES')
	return
t = int(input())
for i in range(t):
	ans = solve()


t = int(input())
for i in range(t):
	n = int(input())
	pole = input().split()
	for j in range(n):
		pole[j] = int(pole[j])
	pole.sort()
	pravda = True
	for j in range(1, n):
		if abs(pole[j] - pole[j - 1]) > 1:
			pravda = False
	if pravda == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	mini = min(arr)
	maxa = max(arr)
	set1 = set(list(range(mini, maxa + 1)))
	for i in arr:
		if i in set1:
			set1.remove(i)
	if len(set1) == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for tests in range(t):
	n = input()
	a = [int(x) for x in input().split()]
	a_min = min(a)
	a_max = max(a)
	if a_min == a_max:
		print('YES')
		continue
	gab = False
	for element in range(a_min + 1, a_max):
		if not element in a:
			gab = True
			break
	if gab:
		print('NO')
	else:
		print('YES')


t = int(input())
for cases in range(t):
	n = int(input())
	arr = [int(num) for num in input().split(' ')]
	arr.sort()
	c = 0
	for i in range(n - 1):
		j = i + 1
		if arr[i] + 1 in arr[j:n] or arr[i] in arr[j:n]:
			continue
		else:
			c = 1
			break
	if c == 1:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	oc = 0
	ec = 0
	for j in range(n):
		if a[j] & 1 != 0:
			oc += 1
		else:
			ec += 1
	if oc == 0 or (oc % 2 == 0 and ec == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	num = int(input())
	n = input().split()
	l = []
	for x in n:
		l.append(int(x))
	l.sort()
	i = 0
	while i < len(l) - 1:
		if -1 <= l[i] - l[i + 1] <= 1:
			l.pop(i)
		else:
			i += 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


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

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		l = list(map(int, input().split()))
		s = list(set(l))
		s.sort()
		if len(s) == 1:
			print('YES')
		elif sum_n(s[-1]) - sum_n(s[0]) + s[0] == sum(s):
			print('YES')
		else:
			print('NO')
main()


def findDifferenceElements(A):
	for i in range(len(A) - 1):
		if arr[i + 1] - arr[i] <= 1:
			return [i + 1, i]
	return []
T = int(input())
for z in range(T):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	while True:
		if len(arr) > 1 and findDifferenceElements(arr) == []:
			print('NO')
			break
		elif len(arr) > 1:
			a = findDifferenceElements(arr)
			arr.remove(min(arr[a[0]], arr[a[1]]))
		else:
			print('YES')
			break


a = int(input())
for i in range(a):
	(o, e) = (0, 0)
	b = int(input())
	c = list(map(int, input().split()))
	for i in c:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if sum(c) % 2 != 0:
		print('YES')
	elif e != 0 and o != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
mass = []
for i in range(t):
	q = input()
	mass.append(list(map(int, input().split(' '))))
for st in mass:
	if sum(st) % 2 != 0:
		print('YES')
	else:
		nech = 0
		ch = 0
		find = False
		for el in st:
			if el % 2 != 0:
				nech += 1
				if ch != 0:
					print('YES')
					break
			else:
				ch += 1
			if nech != 0 and ch != 0:
				print('YES')
				break
		else:
			print('NO')


for i in range(int(input())):
	int(input())
	a = list(map(int, input().split()))
	odd = 0
	for j in a:
		if j % 2 != 0:
			odd += 1
	if odd > 0:
		if odd == len(a):
			if len(a) % 2 != 0:
				print('YES')
			else:
				print('NO')
		else:
			print('YES')
	else:
		print('NO')


n = int(input())
a_l = []
for _ in range(n):
	x = input()
	u_l = [int(i) for i in input().split()]
	if sum(u_l) % 2 == 1 or (any(map(lambda x: x % 2, u_l)) and any(map(lambda x: (x + 1) % 2, u_l))):
		a_l.append('YES')
	else:
		a_l.append('NO')
for ii in a_l:
	print(ii)


for _ in range(int(input())):
	n = int(input())
	a = input().split(' ')
	arr = [int(x) for x in a]
	o = 0
	sm = 0
	for num in arr:
		sm = sm + num
		if num % 2:
			o = o + 1
	e = n - o
	if sm % 2:
		print('YES')
	elif o % 2:
		print('YES')
	elif e > 0 and o > 0:
		print('YES')
	else:
		print('NO')


def IsPossible(a):
	a.sort()
	prev = a[0]
	for elem in a:
		if elem - prev > 1:
			return 'NO'
		prev = elem
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	print(IsPossible(a))


for i in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	c = 0
	for j in range(n - 1):
		if abs(arr[j + 1] - arr[j]) > 1:
			c = 1
			break
	if c == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	c = list(map(int, input().split()))
	in1 = 0
	in2 = 0
	for u in c:
		if u % 2 == 0:
			in2 = 1
		else:
			in1 = 1
	if in1 == 0:
		print('NO')
	elif in2 == 0 and len(c) % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	a = []
	flag = 0
	len = int(input())
	a = [int(i) for i in input().split()]
	a = sorted(a)
	l = len - 1
	for i in range(len):
		if a[l] - a[l - 1] > 1:
			flag = -1
			break
		else:
			l = l - 1
	if flag == -1:
		print('NO')
	else:
		print('YES')
	t = t - 1


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	eve = 0
	odd = 0
	for i in arr:
		if i % 2 == 0:
			eve += 1
		else:
			odd += 1
	if n % 2 == 0:
		if eve == 0 or odd == 0:
			print('NO')
		else:
			print('YES')
	elif odd == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	input()
	arr = [int(ii) & 1 for ii in input().split()]
	if sum(arr) % 2 == 1 or (sum(arr) % 2 == 0 and 1 in arr and (0 in arr)):
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(0, a):
	b = int(input())
	arr = list(map(int, input().split()))
	s = set(arr)
	brr = []
	for i in s:
		brr.append(i)
	if len(brr) - 1 == max(brr) - min(brr):
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	c = 0
	for i in range(0, n - 1, 1):
		if abs(li[i + 1] - li[i]) <= 1:
			c += 1
	if c == n - 1:
		print('YES')
	else:
		print('NO')


import sys, os
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
input = lambda : sys.stdin.readline().strip()
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
for _ in range(I()):
	n = I()
	l = li()
	l.sort()
	flag = True
	for i in range(n - 1):
		if l[i + 1] - l[i] <= 1:
			continue
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	a = list(map(int, sys.stdin.readline().split()))
	if n % 2 != 0:
		odds = 0
		for i in range(n):
			if a[i] % 2 != 0:
				odds += 1
				break
		if odds == 1:
			print('YES')
		else:
			print('NO')
	else:
		odds = 0
		for i in range(n):
			if a[i] % 2 != 0:
				odds += 1
		if odds != n and odds >= 1:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	if n == 1:
		print('YES')
	else:
		l.sort()
		maxm = 0
		for i in range(1, n):
			if l[i] - l[i - 1] > maxm:
				maxm = l[i] - l[i - 1]
		if maxm > 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	cnt_odd = sum([1 for i in arr if i % 2 == 1])
	cnt_even = sum([1 for i in arr if i % 2 == 0])
	if cnt_odd > 0 and cnt_even > 0:
		print('YES')
	elif cnt_odd == n and sum(arr) % 2 == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	cando = True
	for j in range(1, n):
		if abs(a[j] - a[j - 1]) > 1:
			cando = False
			break
	if cando:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	p = 1
	a = int(input())
	b = list((int(x) for x in input().split()))
	b.sort()
	for i in range(a - 1):
		if b[i + 1] - b[i] <= 1:
			pass
		else:
			print('NO')
			p = 0
			break
	if p != 0:
		print('YES')


t = int(input())
sol = []
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	x = set(s)
	x = list(x)
	x.sort()
	flag = 0
	for i in range(len(x)):
		if i != len(x) - 1 and x[i + 1] - x[i] != 1:
			flag = 1
			break
	if flag == 0:
		sol.append('YES')
	else:
		sol.append('NO')
for i in sol:
	print(i)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		count_odd = 0
		count_even = 0
		for j in l:
			if j % 2 != 0:
				count_odd += 1
			else:
				count_even += 1
		if count_odd == len(l) or count_even == len(l):
			print('NO')
		elif count_odd % 2 == 0:
			print('YES')
		else:
			print('NO')


def evenoddcounter(a):
	ce = 0
	co = 0
	for i in a:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	return (ce, co)
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	(counteven, countodd) = evenoddcounter(l)
	if countodd == 0:
		print('NO')
	elif counteven == 0 and len(l) % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag = True
	count_odd = 0
	for v in a:
		if v % 2 == 1:
			count_odd += 1
	count_even = n - count_odd
	if count_even == 0 and n % 2 == 0:
		flag = False
	if count_odd == 0:
		flag = False
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
res = []
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	if len(arr) == 0:
		res.append('NO')
	elif len(arr) == 1:
		res.append('YES')
	else:
		arr.sort()
		(j, check) = (0, True)
		for k in range(1, len(arr)):
			if arr[k] >= arr[j] + 2:
				res.append('NO')
				check = False
				break
			elif arr[k] == arr[j] + 1:
				j = k
		if check == True:
			res.append('YES')
for i in range(len(res)):
	print(res[i])


def main():
	numCases = int(input())
	nums = []
	for i in range(numCases):
		numElements = int(input())
		elements = input()
		elements = elements.split()
		nums = list(map(int, elements))
		length = len(nums)
		nums.sort()
		idx1 = 0
		idx2 = 1
		while True:
			if idx1 == idx2:
				idx2 += 1
			if length == 1:
				print('YES')
				break
			if idx2 >= len(nums):
				print('NO')
				break
			if abs(nums[idx1] - nums[idx2]) <= 1:
				length -= 1
				idx2 += 1
				continue
			idx1 += 1
main()


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr = sorted(arr)
	found = False
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			found = True
			break
	if found:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	test = 0
	i = 0
	while i < len(arr) - 1:
		if arr[i + 1] - arr[i] > 1:
			test = 1
			i = len(arr)
		i = i + 1
	if test == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
count = 0
final = []
while count < t:
	size = int(input())
	a = input()
	odd = [x for x in a.split() if int(x) % 2 != 0]
	even = [x for x in a.split() if int(x) % 2 == 0]
	if len(odd) % 2 == 0 and len(odd) > 0:
		if len(even) >= 1:
			final.append('YES')
		else:
			final.append('NO')
	elif len(odd) == 0:
		final.append('NO')
	else:
		final.append('YES')
	count += 1
for x in final:
	print(x)


t = int(input())
for _ in range(t):
	n = int(input())
	al = list(map(int, input().split()))
	if sum(al) % 2 == 0:
		a1 = 0
		a2 = 0
		for a in al:
			if a % 2 == 0:
				a1 = 1
			else:
				a2 = 1
		if a1 + a2 == 2:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	temp = 0
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			temp = 1
			break
	if temp == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	length = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	left = 0
	for index in range(1, length):
		if nums[index] - nums[left] > 1:
			print('NO')
			break
		left += 1
	else:
		print('YES')


q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	s = 0
	flag1 = False
	flag2 = False
	for elem in a:
		s += elem
	if s % 2 != 0:
		print('YES')
	else:
		for elem in a:
			if elem % 2 == 0:
				flag1 = True
			else:
				flag2 = True
		if flag1 and flag2:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	l = s.split()
	su = 0
	for j in l:
		su += int(j)
	if su % 2 != 0:
		print('YES')
	else:
		c = 0
		c1 = 0
		for j in l:
			if int(j) % 2 == 0:
				c += 1
			else:
				c1 += 1
		if c == 0 or c1 == 0:
			print('NO')
		else:
			print('YES')


from sys import *
t = int(stdin.readline())
while t > 0:
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	arr.sort()
	flag = 0
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if abs(arr[i] - arr[i - 1]) > 1:
				print('NO')
				flag = 1
				break
		if flag == 0:
			print('Yes')
	t -= 1


n = int(input())
for i in range(n):
	t = int(input())
	s = [int(x) for x in input().split()]
	countodd = 0
	counteven = 0
	if sum(s) % 2 == 0:
		for elem in s:
			if elem % 2 == 1:
				countodd += 1
			else:
				counteven += 1
		if countodd == 0 and counteven == len(s):
			print('NO')
		elif countodd == len(s) and counteven == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


a = int(input())
i = 0
while i < a:
	b = int(input())
	aa = list(map(int, input().strip().split()))
	aa.sort()
	if len(aa) == 1:
		print('YES')
	else:
		l = 0
		m = 1
		while l < len(aa) - 1:
			cp = 0
			if abs(aa[l] - aa[m]) < 1:
				cp = 1
			elif abs(aa[l] - aa[m]) == 1:
				cp = 1
			else:
				cp = 0
				break
			m += 1
			l += 1
		if cp == 1:
			print('YES')
		else:
			print('NO')
	i += 1


for _ in range(int(input())):
	n = int(input())
	nums = sorted(list(set(map(int, input().split()))))
	print('YES' if nums == list(range(nums[0], nums[-1] + 1)) else 'NO')


t = int(input())
answers = [True] * t
for i in range(t):
	n = int(input())
	x = input().split()
	if n == 1:
		continue
	a = [0] * n
	for j in range(n):
		a[j] = int(x[j])
	a.sort()
	for j in range(n - 1):
		if a[j + 1] - a[j] > 1:
			answers[i] = False
			continue
for i in range(t):
	if answers[i]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	ar = sorted(list(set(map(int, input().split()))))
	c = 0
	d = 0
	if len(ar) == 1:
		print('YES')
		c = 1
		continue
	else:
		for i in range(len(ar) - 1):
			if abs(ar[i] - ar[i + 1]) == 1 or abs(ar[i] - ar[i + 1] == 0):
				d += 1
			if len(ar) - d == 1:
				print('YES')
				c = 1
				break
		if c == 0:
			print('NO')


T = int(input())
for _ in range(T):
	N = int(input())
	array = [int(i) for i in input().split(' ')]
	array.sort()
	odd = 0
	even = 0
	for i in range(N):
		if array[i] % 2 == 0:
			even += 1
			continue
		elif array[i] % 2 == 1:
			odd += 1
			continue
	if odd == 0:
		print('NO')
		continue
	elif even == 0 and odd % 2 == 0:
		print('NO')
		continue
	else:
		print('Yes')
		if odd % 2 == 0:
			odd += 1
			even -= 1


n = int(input())
for i in range(n):
	m = int(input())
	s = input().split(' ')
	a = []
	for c in s:
		a.append(int(c))
	a.sort()
	f = False
	for i in range(m - 1):
		if a[i + 1] - a[i] > 1:
			f = True
	if f:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	l = sorted(I())
	an = 'YES'
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			an = 'NO'
			break
	print(an)


t = int(input())
for j in range(t):
	f = 0
	n = int(input())
	a = list(map(int, input().split()))
	evenc = 0
	oddc = 0
	if sum(a) % 2 == 1:
		f = 1
	else:
		for i in range(n):
			if a[i] % 2 == 0:
				evenc += 1
			else:
				oddc += 1
		if evenc == n or oddc == n:
			f = 0
		else:
			f = 1
	if f:
		print('YES')
	else:
		print('NO')


def Fun(a):
	for i in range(len(a) - 1):
		if a[i] != a[i + 1] and a[i] + 1 != a[i + 1]:
			return 'NO'
	return 'YES'
t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	print(Fun(a))
	t = t - 1


import sys
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	a = [int(x) for x in sys.stdin.readline().split()]
	a.sort()
	ans = 'YES'
	for w in range(n - 1):
		if a[w + 1] - a[w] >= 2:
			ans = 'NO'
			break
	print(ans)


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	s = input().split(' ')
	s = list(map(int, s))
	contp = 0
	conti = 0
	for x in s:
		if x % 2 == 0:
			contp += 1
		else:
			conti += 1
	if sum(s) % 2 != 0:
		print('YES')
	elif 1 < conti < len(s):
		print('YES')
	else:
		print('NO')


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
from itertools import accumulate
M = mod = 998244353

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

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	n = val()
	l = sorted(li())
	ans = 1
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			ans = 0
			break
	print('YES' if ans else 'NO')


try:
	import sys
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except BaseException:
	pass
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(set(map(int, input().split())))
	print('YES' if len(a) - 1 == max(a) - min(a) else 'NO')


for i in range(int(input())):
	n = int(input())
	a = [int(a) for a in input().split()]
	cnt = 0
	if n == 1:
		print('YES')
	else:
		a.sort()
		for j in range(len(a) - 1):
			if a[j + 1] - a[j] <= 1:
				cnt += 1
		print('YES' if n - cnt == 1 else 'NO')


for i in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	if sum(s) % 2 != 1:
		for j in range(n):
			s[j] %= 2
		s = str(s)
		if s.count('1') != 0 and s.count('0') != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	inp = list(map(int, input().split()))
	c = Counter(inp)
	l = list(c.keys())
	l.sort()
	flag = 0
	for i in range(1, len(l)):
		if l[i] - l[i - 1] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(0, t):
	n = int(input())
	a = input().split()
	for i in range(0, n):
		a[i] = int(a[i])
	a = sorted(a)
	flag = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for iteration in range(0, t):
	l = int(input())
	arr = list(map(int, input().rstrip().split()))
	temp = []
	arr.sort()
	for i in range(0, len(arr) - 1):
		if arr[i + 1] - arr[i] <= 1:
			temp.append(arr[i])
	for element in temp:
		if element in arr:
			arr.remove(element)
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		flag1 = True
		flag2 = True
		for i in range(n):
			if flag1:
				if l[i] % 2 == 0:
					flag1 = False
			if flag2:
				if l[i] % 2 != 0:
					flag2 = False
			if not flag1 and (not flag2):
				break
		if not flag1 and (not flag2):
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	a.sort()
	flag = True
	if len(a) > 1:
		for i in range(1, len(a)):
			if a[i] - a[i - 1] > 1:
				print('NO')
				flag = False
				break
		if flag:
			print('YES')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	ans = 'YES'
	for i in range(1, n):
		if not (a[i] == a[i - 1] or a[i] == a[i - 1] + 1):
			ans = 'NO'
			break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	A = input().split()
	a = list(map(int, A))
	b = len(a)
	if b == 1:
		print('YES')
	else:
		a.sort()
		x = []
		for i in range(n - 1):
			k = abs(a[i] - a[i + 1])
			if k == 1 or k == 0:
				x.append(1)
		if len(x) < n - 1:
			print('NO')
		else:
			print('YES')


def process():
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			return False
	return True
for i in range(int(input())):
	print('YES' if process() else 'NO')


for _ in range(int(input())):
	n = int(input())
	m = [*map(int, input().split())]
	if sum(m) % 2:
		print('YES')
	elif all((i % 2 == 0 for i in m)) or all((i % 2 == 1 for i in m)):
		print('NO')
	else:
		print('YES')


from sys import stdin

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

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

def get_ints():
	return map(int, stdin.readline().strip().split())

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

def get_array2d(row):
	return [list(map(int, stdin.readline().strip().split())) for _ in range(row)]
T = get_int()
for _ in range(T):
	N = get_int()
	A = get_array()
	A.sort()
	flag = 1
	for i in range(N - 1):
		if A[i + 1] - A[i] > 1:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
I = sys.stdin.readline

def ii():
	return int(I().strip())

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

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

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

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

def main():
	for _ in range(ii()):
		n = ii()
		arr = sorted(li())
		if n == 1:
			print('YES')
		else:
			flag = 0
			for i in range(n - 1):
				if arr[i + 1] - arr[i] > 1:
					flag = 1
					break
			if flag == 0:
				print('YES')
			else:
				print('NO')
main()


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort(reverse=True)
	f = 1
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			f = 0
			break
	if f:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	flag = True
	for j in range(n - 1):
		if arr[j + 1] - arr[j] > 1:
			flag = False
			break
	if flag == True:
		print('YES')
	else:
		print('NO')


from sys import stdin as sin
for _ in range(int(sin.readline())):
	n = int(sin.readline())
	l = list(map(int, sin.readline().split(' ')))
	l.sort()
	flag = True
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			flag = False
			break
	d = {True: 'YES', False: 'NO'}
	print(d[flag])


t = int(input())
for p in range(t):
	n = int(input())
	flag = 0
	ar = [int(i) for i in input().split()]
	ar = sorted(ar)
	for i in range(0, n - 1):
		if ar[i + 1] - ar[i] >= 2:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


for j in range(int(input())):
	n = int(input())
	a = input().split(' ')
	b = []
	for k in a:
		b.append(int(k))
	b.sort()
	if n == 1:
		print('YES')
	else:
		c = []
		for i in range(n - 1):
			c.append(b[i + 1] - b[i])
		if max(c) > 1:
			print('NO')
		else:
			print('YES')


def c(n, a):
	if n == 0:
		return 'YES'
	elif n == 1 or len(set(a)) == 1:
		return 'YES'
	else:
		r = max(a)
		w = min(a)
		f = [*range(w, r)]
		for i in f:
			if i not in a:
				return 'NO'
		return 'YES'
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(c(n, a))


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	f = 0
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			f = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


t = input()
for i in range(int(t)):
	j = int(input())
	k = input()
	arr = k.split()
	for i in range(int(j)):
		arr[i] = int(arr[i])
	if all((x % 2 == 0 for x in arr)):
		print('NO')
	elif all((x % 2 == 1 for x in arr)):
		if j % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


def OddSum():
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		print('YES')
	elif n == 1:
		print('NO')
	elif n % 2 == 0:
		hasOdd = False
		hasEven = False
		for num in a:
			if num % 2 == 0:
				hasEven = True
			else:
				hasOdd = True
			if hasOdd and hasEven:
				print('YES')
				return
		print('NO')
		return
	else:
		for num in a:
			if num % 2 == 1:
				print('YES')
				return
		print('NO')
t = int(input())
for i in range(t):
	OddSum()


def get_val(arr):
	num = len(arr)
	if num == 1:
		return 'YES'
	for j in range(num):
		for k in range(num - j - 1):
			if arr[k] > arr[k + 1]:
				temp = arr[k]
				arr[k] = arr[k + 1]
				arr[k + 1] = temp
	for j in range(num - 1):
		if arr[j + 1] - arr[j] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	strarr = get_val(a)
	print(strarr)


test = int(input())
from collections import defaultdict
for i in range(test):
	n = int(input())
	arr = [int(i) for i in input().split()]
	if n == 1:
		print('YES')
	else:
		max_ = max(arr)
		min_ = min(arr)
		cnt = defaultdict(int)
		for i in range(n):
			cnt[arr[i]] = 1
		if all((cnt[j] == 1 for j in range(min_, max_ + 1))):
			print('YES')
		else:
			print('NO')


t = int(input())
while t > 0:
	n = int(input())
	A = list(map(int, input().split()))
	f = 0
	c = 0
	for i in range(n):
		if A[i] % 2 != 0:
			f = 1
			c += 1
	if f == 1:
		if c == n and c % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')
	t -= 1


n = int(input())
blist = []
for i in range(n):
	m = int(input())
	alist = list(map(int, input().split()))
	l = len(alist)
	dlist = []
	for i in alist:
		if i % 2 == 0:
			dlist.append(1)
	if sum(dlist) == l:
		blist.append('NO')
	elif sum(dlist) == 0 and l % 2 == 0:
		blist.append('NO')
	else:
		blist.append('YES')
for i in blist:
	print(i)


for z in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ok = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = [int(i) % 2 for i in input().split()]
	if sum(l) % 2 == 1:
		print('YES')
	elif len(set(l)) == 1:
		print('NO')
	else:
		print('YES')


i = int(input())
for _ in range(i):
	_ = input()
	yes = True
	tl = list(map(int, input().split()))
	tl.sort()
	for _ in range(len(tl) - 1):
		if abs(tl[_] - tl[_ + 1]) > 1:
			yes = False
	if yes:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = int(input())
	lst = sorted(map(int, input().split()))
	j = 0
	while j <= a:
		if a == 1:
			print('YES')
			break
		elif a != 1 and lst[j] - lst[j + 1] in [-1, 0, 1]:
			a -= 1
			lst.remove(lst[j])
		else:
			print('NO')
			break


t = int(input())
answers = []
for a in range(t):
	n = int(input())
	line = [int(i) for i in input().split()]
	line.sort()
	answer = True
	for b in range(1, len(line)):
		if line[b] - line[b - 1] > 1:
			answer = False
			break
	if answer:
		answers.append('YES')
	else:
		answers.append('NO')
for b in answers:
	print(b)


t = int(input())
arrLst = []
nLst = []
for z in range(t):
	ni = int(input())
	nLst.append(ni)
	arr = []
	arr = input().split()
	for x in range(len(arr)):
		arr[x] = int(arr[x])
	arrLst.append(arr)
for i in range(len(arrLst)):
	if len(arrLst[i]) != 1:
		for j in range(len(arrLst[i])):
			j_max = max(arrLst[i])
			arrLst[i].remove(j_max)
			j_max_2 = max(arrLst[i])
			if abs(j_max - j_max_2) <= 1:
				if len(arrLst[i]) == 1:
					print('YES')
					break
			else:
				print('NO')
				break
	else:
		print('YES')


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


nn = int(input())
for k in range(nn):
	n = int(input())
	m = list(map(int, input().split()))
	m.sort()
	yes = True
	for i in range(1, n):
		if m[i] - m[i - 1] > 1:
			yes = False
			break
	if yes:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	has_odd = False
	has_even = False
	s = 0
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(n):
		if arr[i] % 2 != 0:
			has_odd = True
		else:
			has_even = True
		s += arr[i]
	if s % 2 == 0:
		if has_odd == False:
			print('NO')
		elif has_odd and has_even:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


inp = int(input())
for num in range(inp):
	counter = 0
	inp1 = int(input())
	l = sorted(list(map(int, input().split())))
	if l[0] == l[-1]:
		print('YES')
		continue
	else:
		for i in range(inp1):
			for j in range(i + 1, inp1):
				if abs(l[i] - l[j]) <= 1:
					if l[i] < l[j] or l[i] == l[j]:
						l[i] = 0
						counter += 1
						break
					else:
						print(l[i])
						print(l[j])
						l[j] = 0
						counter += 1
						break
	if counter == len(l) - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	if n == 1:
		print('YES')
		continue
	ok = 1
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			ok = 0
	if ok:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	li = sorted(li)
	for i in range(n - 1):
		if abs(li[i] - li[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


import math
import sys
input = sys.stdin.readline

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

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

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

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

def pba(n, a):
	flag = [1] * n
	a.sort()
	temp = a[0]
	index = 0
	for i in range(1, n):
		if a[i] - temp <= 1:
			flag[index] = 0
			temp = a[i]
			index = i
	return 'YES' if flag.count(1) == 1 else 'NO'
for _ in range(inp()):
	n = inp()
	a = inlst()
	print(pba(n, a))


def go(arr, n):
	count = 0
	start = arr[0]
	for i in range(1, n):
		if arr[i] - start <= 1:
			count += 1
		start = arr[i]
	if count == n - 1:
		print('Yes')
	else:
		print('No')
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	go(arr, n)


for __ in range(int(input())):
	n = int(input())
	arr = [int(s) for s in input().split()]
	cnt_2 = 0
	ncnt_2 = 0
	for i in arr:
		if i % 2 == 0:
			cnt_2 += 1
		if i % 2 != 0:
			ncnt_2 += 1
	if cnt_2 == n or (ncnt_2 == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	a = int(input())
	ans = 0
	l = list(map(int, input().split()))
	l.sort()
	if a == 1:
		print('YES')
	else:
		for i in range(0, a - 1):
			if abs(l[i] - l[i + 1]) > 1:
				ans = 0
				break
			elif abs(l[i] - l[i + 1]) <= 1:
				ans += 1
		if ans == 0:
			print('NO')
		else:
			print('YES')


N = int(input())
for i in range(N):
	length = int(input())
	current = list(map(int, input().strip().split(' ')))
	current.sort()
	t = 0
	for i in range(length - 1):
		if current[i + 1] - current[i] > 1:
			t = 1
	if t == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	k = 0
	A = sorted(list(map(int, input().split())))
	for i in range(1, n):
		if A[i] - A[i - 1] <= 1:
			continue
		else:
			k = 1
			break
	if k:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = input().split()
	x = 0
	for j in a:
		x = x + int(j) % 2
	y = n - x
	if y == n or (x == n and n % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for z in range(t):
	n = int(input())
	p = input()
	p = p.split(' ')
	p = map(int, p)
	p = sorted(p)
	if n == 1:
		print('YES')
	else:
		for _ in range(n - 1):
			if p[_ + 1] - p[_] > 1:
				print('NO')
				break
			if _ == n - 2:
				print('YES')


t = int(input())
while t > 0:
	n = int(input())
	d = {}
	l = list(map(int, input().split()))
	l.sort()
	flag = True
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')
	t -= 1


def f(li):
	s = set()
	for i in range(1, len(li)):
		s.add(li[i] - li[i - 1])
	if len(s) > 1 or (len(s) == 1 and (not 1 in s)):
		return False
	else:
		return True
for _ in range(int(input())):
	answer = 0
	n = int(input())
	listak = list(set(map(int, input().split())))
	listak.sort()
	if f(listak):
		print('YES')
	else:
		print('NO')


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


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	sum = 0
	even = 0
	odd = 0
	for i in x:
		sum += i
		if i % 2 == 0:
			even = 1
		else:
			odd = 1
	if even & odd | sum % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	one = True
	for j in range(n - 1):
		if a[j + 1] - a[j] > 1:
			one = False
	if one:
		print('YES')
	else:
		print('NO')


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	a = list(mi())
	(o, e) = (0, 0)
	for i in a:
		if i % 2:
			o += 1
		else:
			e += 1
	if o % 2 == 0 and e == 0 or o == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for y in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	o = e = 0
	for i in a:
		if i & 1:
			o += 1
		else:
			e += 1
	if o & 1:
		print('YES')
		continue
	if o > 0 and o != n:
		print('YES')
		continue
	print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	a = [int(j) for j in input().split(' ')]
	has_odd = False
	has_even = False
	for j in range(0, n):
		if a[j] % 2 > 0:
			has_odd = True
		if a[j] % 2 == 0:
			has_even = True
	print('YES' if has_odd and (n % 2 > 0 or has_even) else 'NO')


import sys
import math
from sys import stdin, stdout

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

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

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

def main():
	for t in range(int(input())):
		n = int(input())
		l = get_list()
		l.sort()
		c = 0
		for i in range(1, n):
			if l[i] - l[i - 1] <= 1:
				c += 1
		if c == n - 1:
			print('YES')
		else:
			print('NO')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

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


(A, B) = (input, int)
for _ in range(B(A())):
	(n, o) = (B(A()), sum([B(x) & 1 for x in A().split()]))
	print('YES' if o & 1 or 1 < o < n else 'NO')


times = int(input())
for i in range(times):
	nothing = input()
	need = set(map(int, input().split()))
	if max(need) - min(need) >= len(need):
		print('NO')
	else:
		print('YES')


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


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()][:n]
	if len(arr) == 1 or arr.count(arr[0]) == len(arr):
		print('YES')
	else:
		arr.sort()
		ok = 1
		for count in range(1, len(arr)):
			if abs(arr[count] - arr[count - 1]) > 1:
				ok = 0
				break
		if ok == 1:
			print('YES')
		else:
			print('NO')


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

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

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

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

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

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

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

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

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

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def isSubsetSum(arr, n, summ):
	subarr = [[False for i in range(summ + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subarr[i][0] = True
	for i in range(1, summ + 1):
		subarr[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, summ + 1):
			if j < arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j]
			if j >= arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j] or subarr[i - 1][j - arr[i - 1]]
	return subarr[n][summ]

def bfs(v, adj, onpath):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

def solution(a, n):
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'

def main():
	T = 1
	T = ri()
	for i in range(T):
		n = ri()
		a = ria()
		x = solution(a, n)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


def main():
	_ = int(input())
	s = list(map(int, input().split()))
	s = list(dict.fromkeys(s))
	s.sort()
	if len(s) == 1:
		return 'YES'
	ss = list(range(s[0], s[len(s) - 1] + 1))
	if s == ss:
		return 'YES'
	else:
		return 'NO'
for i in range(int(input())):
	print(main())


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr = list(set(arr))
	arr.sort()
	if len(arr) < 2:
		print('YES')
	else:
		flag = 0
		for index in range(0, len(arr) - 1):
			if arr[index + 1] - arr[index] > 1:
				print('NO')
				flag = 1
				break
		if flag == 0:
			print('YES')


def solve():
	n = int(input().strip())
	arr = [int(i) for i in input().rstrip().split()]
	sorted(arr)
	ans = True
	for i in range(min(arr), max(arr)):
		if i not in arr:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')

def main():
	tc = int(input().strip())
	for case in range(tc):
		solve()
main()


t = int(input())
while t:
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	flag = 0
	for x in range(n - 1):
		if abs(nums[x] - nums[x + 1]) >= 2:
			flag = 1
	if flag:
		print('NO')
	else:
		print('YES')
	t -= 1


TestCaseNo = int(input())
for x in range(TestCaseNo):
	Stringlen = int(input())
	TestCase = sorted([int(z) for z in input().split()])
	if Stringlen == 1:
		print('YES')
	else:
		for y in range(Stringlen - 1):
			if TestCase[y + 1] - TestCase[y] > 1:
				No = True
				break
			else:
				No = False
		if not No:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().strip().split()))
	li.sort()
	flag = 0
	for i in range(1, n):
		if li[i] - li[i - 1] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(['YES', 'NO'][all((not x & 1 for x in arr)) or (not n & 1 and all((x & 1 for x in arr)))])


t = int(input())
while t:
	t -= 1
	n = int(input())
	nums = sorted(map(int, input().split()))
	yes = True
	for i in range(1, n):
		if nums[i] - nums[i - 1] > 1:
			yes = False
			break
	if yes:
		print('YES')
	else:
		print('NO')


from collections import defaultdict as dd
import math
import sys
import string
input = sys.stdin.readline

def nn():
	return int(input())

def li():
	return list(input())

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

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

def solve():
	n = nn()
	nums = lm()
	nums.sort()
	for i in range(n - 1):
		if nums[i + 1] - nums[i] > 1:
			print('NO')
			return
	print('YES')
q = nn()
for _ in range(q):
	solve()


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

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

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

def instr():
	s = input()
	return list(s[:len(s)])

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

def main():
	t = inp()
	for _ in range(t):
		n = inp()
		a = inlist()
		a = sorted(a)
		f = True
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				f = False
				break
		if f:
			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))

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


t = int(input())
for i in range(t):
	m = int(input())
	l = list(map(int, input().split()))
	if m == 1 or m == 0:
		print('YES')
	else:
		z = []
		l.sort(reverse=True)
		for j in l:
			if j not in z:
				z.append(j)
		if len(z) == l[0] - l[-1] + 1:
			print('YES')
		else:
			print('NO')


import bisect
import copy
import fractions
import heapq
import math
import random
import sys
T = int(input())
for t in range(T):
	N = int(input())
	n = list(map(int, input().split()))
	n.sort()
	possible = True
	for i in range(len(n) - 1):
		if n[i + 1] - n[i] > 1:
			possible = False
	if possible:
		print('YES')
	else:
		print('NO')


(A, B) = (input, int)
for _ in range(B(A())):
	(n, e) = (B(A()), len([x for x in map(B, A().split()) if x & 1]))
	print('NO' if e == 0 or (e == n and n % 2 == 0) else 'YES')


t = int(input())
for j in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	k = sorted(lst)
	c = 0
	for i in range(n - 1):
		if abs(k[i + 1] - k[i]) <= 1:
			c += 1
	if c == n - 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	mini = False
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			mini = True
	print('YNEOS'[mini::2])


import sys
input = sys.stdin.readline

def main(n, lst):
	lst = sorted(lst)
	for i in range(1, n):
		if lst[i] != lst[i - 1] + 1 and lst[i] != lst[i - 1]:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	print(main(n, lst))


for i in range(int(input())):
	n = int(input())
	b = 0
	a = list(map(int, input().split()))
	a.sort()
	if n == 1:
		print('Yes')
	else:
		i = 0
		while len(a) > 1:
			if abs(a[i] - a[i + 1]) <= 1:
				a.remove(a[i])
			else:
				b = 1
				break
		if b == 1:
			print('No')
		else:
			print('Yes')


def rec(l):
	if len(l) == 1:
		return True
	m = min(l)
	l.remove(m)
	if abs(min(l) - m) <= 1:
		return rec(l)
	else:
		return False
t = int(input())
for j in range(t):
	l = list()
	n = int(input())
	if n != 1:
		l = list(map(int, input().split(' ')))
	else:
		l.append(int(input()))
	if rec(l):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	flag = False
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			flag = True
			break
	if flag == True:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(0, t):
	n = input()
	even = []
	odd = []
	mixarr = list(map(int, input().split(' ')))
	for i in range(0, len(mixarr)):
		if mixarr[i] % 2 == 0:
			even.append(mixarr[i])
		else:
			odd.append(mixarr[i])
	if sum(mixarr) % 2 is not 0:
		print('YES')
	elif len(odd) > 0 and len(even) > 0:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	ans = 'NO'
	odd = 0
	for v in a:
		if v & 1:
			odd += 1
	even = n - odd
	if n & 1:
		if odd:
			ans = 'YES'
	elif even and odd:
		ans = 'YES'
	print(ans)


import copy
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	c = 0
	for i in range(n - 1):
		if abs(a[i + 1] - a[i]) > 1:
			c = c + 1
			break
	if c != 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	input()
	(n, run) = (list(set(map(int, input().split(' ')))), True)
	n.sort()
	while len(n) > 1:
		if abs(n[0] - n[1]) <= 1:
			n.remove(n[0] if n[0] <= n[1] else n[1])
		else:
			print('NO')
			run = False
			break
	if run:
		print('YES')


T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	f = 1
	for i in range(n - 1):
		if arr[i + 1] - arr[i] <= 1:
			continue
		else:
			f = 0
			break
	if f:
		print('YES')
	else:
		print('NO')


_ = int(input())
for _1 in range(_):
	count = 0
	n = int(input())
	lis = list(map(int, input().split()))
	for i in lis:
		if i % 2 != 0:
			count += 1
	if count % 2 != 0:
		print('YES')
	elif count == 0 or count == n:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n % 2 == 0:
		e = False
		o = False
		flag = False
		for i in a:
			if i % 2 == 0:
				e = True
			else:
				o = True
			if e and o:
				flag = True
				print('YES')
				break
		if not flag:
			print('NO')
	else:
		flag = False
		for i in a:
			if i % 2 != 0:
				print('YES')
				flag = True
				break
		if not flag:
			print('NO')


n = int(input())
for i in range(0, n):
	k = int(input())
	a = list(map(int, input().split()))
	if k % 2 != 0:
		f = 0
		for j in range(0, k):
			if a[j] % 2 != 0:
				f = 1
				break
		if f == 1:
			print('YES')
		else:
			print('NO')
	else:
		fe = 0
		fo = 0
		f = 0
		for j in range(0, k):
			if a[j] % 2 == 0:
				fe = fe + 1
			else:
				fo = fo + 1
			if fe > 0 and fo > 0:
				f = 1
				break
		if f == 1:
			print('YES')
		else:
			print('NO')


n = int(input())
a = []
b = []
for i in range(n):
	m = int(input())
	l = list(map(int, input().split()))
	a.append(m)
	b.append(l)
c = 0
for i in range(n):
	c = b[i]
	c.sort()
	if len(c) == 1:
		print('YES')
	else:
		for j in range(a[i] - 1):
			if c[j + 1] - c[j] >= 2:
				print('NO')
				break
		else:
			print('YES')


t = int(input())
while t != 0:
	n = int(input())
	list1 = list(map(int, input().split()))
	list1.sort()
	f = 0
	for i in range(1, len(list1)):
		if list1[i] - list1[i - 1] > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


for i in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	count = 0
	for j in range(n - 1):
		if l[j] - l[j + 1] < 2 and l[j + 1] - l[j] < 2:
			count = 0
		else:
			count = 1
			break
	if count == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(i) for i in input().split(' ')]
	a = []
	k = 0
	if sum(arr) % 2 == 1:
		print('YES')
	else:
		for i in range(n):
			if arr[i] % 2 == 1:
				a.append(arr[i])
		for i in range(n):
			if arr[i] % 2 == 0:
				k = i
				break
		if len(a) != 0:
			arr[k] = a[0]
		if sum(arr) % 2 == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	evs = 0
	ods = 0
	for i in range(n):
		if ar[i] % 2 == 0:
			evs += 1
		else:
			ods += 1
	if evs == n or (n % 2 == 0 and ods == n):
		print('NO')
	else:
		print('YES')


T = int(input())
while T > 0:
	n = int(input())
	line = input().split()
	numbers = []
	for x in line:
		numbers.append(int(x))
	numbers = sorted(numbers)
	good = True
	for i in range(0, n):
		j = i + 1
		if j < n:
			if abs(numbers[i] - numbers[j]) == 1 or abs(numbers[i] - numbers[j]) == 0:
				continue
			else:
				good = False
				break
	if good:
		print('YES')
	else:
		print('NO')
	T -= 1


def one(values):
	values.sort()
	if len(values) == 1:
		return 'YES'
	else:
		for i in range(len(values) - 1):
			if abs(values[i] - values[i + 1]) > 1:
				return 'NO'
		else:
			return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	values = list(map(int, input().split()))
	print(one(values))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag_0 = 0
	flag_1 = 0
	for elem in a:
		if elem % 2 == 0:
			flag_0 = 1
		else:
			flag_1 = 1
	if flag_1 == 1 and flag_0 == 1:
		print('YES')
	elif flag_0 == 0 and n % 2 == 0:
		print('NO')
	elif flag_1 == 0:
		print('NO')
	else:
		print('YES')


import math as mt

def tran(arr):
	arr.sort()
	t = 1
	for i in range(len(arr) - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			t = 0
			break
	if t == 0:
		return 'NO'
	else:
		return 'YES'
t = int(input())
ans = []
for i in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	r = tran(arr)
	ans.append(r)
for i in ans:
	print(i)


for i in range(int(input())):
	ans = 'YES'
	n = int(input())
	l = sorted(list(map(int, input().split())))
	m = l[:-1]
	if n == 1:
		s = 'YES'
	else:
		y = 1
		for i in m:
			if l[y] - i > 1:
				ans = 'NO'
				break
			y += 1
	print(ans)


import sys
input = sys.stdin.readline

def solve(n, a):
	if n == 1:
		return True
	elif a.count(a[0]) == n:
		return True
	else:
		a.sort()
		for i in range(n - 1):
			if abs(a[i] - a[i + 1]) >= 2:
				return False
		return True
for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if solve(n, a):
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			continue
		else:
			ans = 'NO'
			break
	print(ans)


t = int(input())
for y in range(t):
	n = int(input())
	flag = 0
	flag2 = 0
	ans = 0
	flag3 = 0
	a = input().split()
	for y in range(n):
		for z in range(n):
			ans = ans + int(a[z])
			if int(a[z]) % 2 == 1:
				flag3 = 1
			if int(a[z]) % 2 != 0:
				flag += 1
			if a[z] == a[z - 1]:
				flag2 += 1
		if flag3 == 1 and flag != n:
			print('YES')
			break
		elif flag == n and n % 2 != 0:
			print('YES')
			break
		else:
			print('NO')
			break


for i in range(int(input())):
	n = int(input())
	even = False
	odd = False
	for i in [int(s) for s in input().split()]:
		if i % 2 == 0:
			even = True
		if i % 2 == 1:
			odd = True
	if odd and (not (n % 2 == 0 and (not (even and odd)))):
		print('YES')
	else:
		print('NO')


def main():
	for i in range(int(input())):
		catch = input()
		l = [int(j) for j in input().split()]
		l.sort()
		possible = True
		for j in range(0, len(l) - 1):
			if l[j] + 1 < l[j + 1]:
				possible = False
		if possible == True:
			print('YES')
		else:
			print('NO')
main()


import math
from collections import deque
from sys import stdin, stdout
from string import ascii_letters
input = stdin.readline
letters = ascii_letters[:26]
for _ in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	can = True
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			can = False
			break
	print('YES' if can else 'NO')


t = int(input())
for _ in range(t):
	c = d = 0
	k = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		print('YES')
	elif sum(arr) % 2 == 0:
		for i in range(k):
			if arr[i] % 2 == 0:
				c += 1
			else:
				d += 1
		if c > 0 and d > 0:
			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')

class union_find:

	def __init__(self, n):
		self.n = n
		self.rank = [0] * n
		self.parent = [int(j) for j in range(n)]

	def union(self, i, j):
		i = self.find(i)
		j = self.find(j)
		if self.rank[i] == self.rank[j]:
			self.parent[i] = j
			self.rank[j] += 1
		elif self.rank[i] > self.rank[j]:
			self.parent[j] = i
		else:
			self.parent[i] = j

	def find(self, i):
		temp = i
		if self.parent[temp] != temp:
			self.parent[temp] = self.find(self.parent[temp])
		return self.parent[temp]
from math import log2, ceil
from collections import deque

def main():
	for t in range(int(input())):
		n = int(input())
		l = [int(j) for j in input().split()]
		flag = True
		l.sort()
		for i in range(1, n):
			if l[i] - l[i - 1] > 1:
				flag = False
				break
		if flag:
			print('YES')
		else:
			print('NO')
main()


test = int(input())
for _ in range(test):
	n = int(input())
	array = [int(x) for x in input().split()]
	noEven = 0
	for i in array:
		if i % 2 == 0:
			noEven += 1
	if noEven >= 1 and len(array) > noEven:
		print('YES')
	elif noEven == 0 and len(array) % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	even_count = odd_count = sum = 0
	for a in A:
		if a % 2 == 0:
			even_count += 1
		else:
			odd_count += 1
		sum += a
	if sum % 2 != 0:
		print('YES')
	elif even_count >= 1 and odd_count >= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if len(l) == 1:
		print('YES')
	else:
		l.sort()
		for x in range(len(l) - 1):
			if abs(l[x] - l[x + 1]) <= 1:
				pass
			else:
				print('NO')
				break
		else:
			print('YES')


for i in range(int(input())):
	n = int(input())
	x = [int(q) for q in input().split()]
	y = sum(x)
	t = [1, 3, 5, 7, 9]
	u = [2, 4, 6, 8]
	o = 0
	e = 0
	for j in range(len(x)):
		if x[j] % 2 == 0:
			e += 1
		else:
			o += 1
	if y % 2 == 1:
		print('YES')
	elif o == 0 or e == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	input()
	a = []
	for j in input().split(' '):
		a.append(int(j))
	if sum(a) % 2 == 1:
		print('YES')
	else:
		hasOdd = False
		for j in a:
			if j % 2 == 1:
				hasOdd = True
				break
		if hasOdd:
			hasEven = False
			for j in a:
				if j % 2 == 0:
					hasEven = True
					break
			if hasEven:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	array = list(map(int, input().split()))
	array.sort()
	i = 0
	while i < n - 1:
		if array[i + 1] - array[i] > 1:
			print('NO')
			break
		i += 1
	if i == n - 1:
		print('YES')


t = int(input())
for i in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	total = 0
	c1 = 0
	c2 = 0
	for j in range(0, len(l)):
		total = total + l[j]
	if total % 2 != 0:
		print('YES')
	else:
		for j in range(0, len(l)):
			if l[j] % 2 == 0:
				c1 = c1 + c1
			else:
				c2 = c2 + 1
		if c2 > 0 and c2 != len(l):
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	summ = sum(arr)
	count = 0
	ok = True
	if summ % 2 != 0:
		print('Yes')
		ok = False
	else:
		for i in range(len(arr)):
			if arr[i] % 2 != 0:
				count += 1
	if count != len(arr) and count != 0 and ok:
		print('YES')
	elif ok:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	odd = []
	for i in range(n):
		if a[i] % 2 == 1 or a[i] == 1:
			odd.append(a[i])
	if len(odd) == 0 or (len(odd) == n and n % 2 == 0):
		print('No')
	else:
		print('Yes')


import sys, collections, math

def in_out():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for c in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	f = 0
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
n = []
arr = []
for i in range(t):
	n.append(int(input()))
	arr.append(list(map(int, input().split(' '))))
for i in range(t):
	cur = sorted(arr[i])
	nval = n[i]
	if nval == 1:
		print('YES')
		continue
	for j in range(nval - 1, 0, -1):
		if cur[j] - cur[j - 1] <= 1:
			nval -= 1
			if nval == 1:
				print('YES')
				break
	if nval != 1:
		print('NO')


for i in range(int(input())):
	x = 0
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('YES')
	else:
		for j in a:
			if j % 2 == 0:
				x = x + 1
		if x == 0 or x == len(a):
			print('NO')
		else:
			print('YES')


t = int(input())
for some_num in range(0, t):
	n = int(input())
	arr = [int(i) for i in input().split(' ')]
	arr.sort()
	flag = 0
	for i in range(0, n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			flag = 1
			break
	if flag != 1:
		print('YES')


for s in [*open(0)][2::2]:
	a = sorted(map(int, s.split()))
	print('YNEOS'[any((y - x > 1 for (x, y) in zip(a, a[1:])))::2])


for t in range(int(input())):
	(n, arr) = (int(input()), [int(x) for x in input().split()])
	if any([(x + z) % 2 != 0 for (x, z) in zip(arr, arr[1:])]) or sum(arr) % 2 != 0:
		print('YES')
	else:
		print('NO')


R = lambda : list(map(int, input().split()))
t = int(input())
for _ in [0] * t:
	n = int(input())
	arr = R()
	arr.sort()
	c = 0
	ans = 'NO'
	if n == 1:
		ans = 'YES'
	else:
		for i in range(n - 1):
			if arr[i + 1] - arr[i] <= 1:
				c += 1
			else:
				c += 0
		if c >= n - 1:
			ans = 'YES'
	print(ans)


n = int(input())

def calc(x, a):
	s = set(a)
	a = list(s)
	a.sort()
	c = 1
	for i in range(len(a) - 1):
		if a[i] + 1 not in a:
			c = c + 1
	if c != 1:
		print('NO')
	else:
		print('YES')
for i in range(n):
	x = int(input())
	a = list(map(int, input().split()))
	calc(x, a)


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


import sys
t = int(input())
while t:
	n = int(input())
	lst = sorted(list(map(int, input().split())))
	sz = len(lst)
	flag = False
	for i in range(1, sz):
		if lst[i] - lst[i - 1] > 1:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')
	t = t - 1


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	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
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	n = inin()
	a = lin()
	a = sorted(a)
	i = 0
	while len(a) > 1:
		if i + 1 < len(a):
			if math.fabs(a[i] - a[i + 1]) <= 1:
				del a[i]
				i = 0
			else:
				i += 1
		else:
			break
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


def odd(a, n):
	odd1 = a[0] % 2
	if odd1 == 1 and n % 2 == 1:
		return 'YES'
	for i in range(1, n):
		if a[i] % 2 != odd1:
			return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	n = int(input())
	al = list(map(int, input().split()))
	print(odd(al, n))


t = input()
t = int(t)
for j in range(t):
	n = input()
	n = int(n)
	r = 0
	l = list(map(int, input().split()))
	l.sort()
	if n == 1:
		print('YES')
		continue
	else:
		mi = min(l)
		ma = max(l)
		for i in range(0, len(l)):
			if l[i] - mi <= 1:
				mi = l[i]
				continue
			else:
				r = 1
				break
	if r == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	chet = 0
	nechen = 0
	input()
	array = []
	for num in input().split():
		array.append(int(num))
	for el in array:
		if el % 2 == 0:
			chet += 1
		else:
			nechen += 1
	if chet == 0:
		if nechen % 2 == 0:
			print('NO')
		else:
			print('YES')
	elif nechen == 0:
		print('NO')
	else:
		print('YES')


testcase = int(input())
while testcase > 0:
	a = int(input())
	b = list(map(int, input().split(' ')))
	s = sum(b)
	flagodd = 0
	flageven = 0
	for i in b:
		if i % 2 != 0:
			flagodd += 1
		else:
			flageven += 1
	if (flagodd == 0 or flageven == 0) and s % 2 == 0:
		print('NO')
	else:
		print('YES')
	testcase -= 1


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	N = int(input())
	K = list(map(int, input().split()))
	S = sum(K)
	x = y = 0
	for k in K:
		if k & 1:
			x += 1
		else:
			y += 1
	if S & 1:
		print('YES')
	elif x and y:
		print('YES')
	else:
		print('NO')


test_cnt = int(input())
tests = []
for _ in range(test_cnt):
	n = int(input())
	a = list(map(int, input().split()))
	tests.append((n, a))
for test in tests:
	n = test[0]
	a = test[1]
	a = sorted(set(a))
	flag = True
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


def solve():
	a = int(input())
	b = sorted(list(map(int, input().split())))
	c = []
	d = 0
	[c.append(x) for x in b if x not in c]
	while d <= len(c) - 1 and d >= 0:
		if len(c) == 1:
			print('YES')
			break
		elif abs(c[d] - c[d + 1]) <= 1:
			c.remove(c[d])
		else:
			print('NO')
			break
for _ in range(int(input())):
	solve()


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	counter = 0
	for k in b:
		if k % 2 != 0:
			counter += 1
	if a == counter and counter % 2 == 0 or counter == 0:
		print('NO')
	else:
		print('YES')
	counter = 0


def main():
	for _ in range(int(input())):
		n = int(input())
		a = sorted(list(map(int, input().split())))
		n1 = len(a)
		for i in range(1, len(a)):
			if a[i] - a[i - 1] <= 1:
				n1 -= 1
			else:
				break
		if n1 == 1:
			print('Yes')
		else:
			print('No')
main()


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


trial = int(input())
for _ in range(trial):
	num = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	poss = True
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			poss = False
	print('{}'.format('YES' if poss else 'NO'))


set_num = int(input())
for i in range(set_num):
	N = int(input())
	arr = list(map(int, input().split()))
	passed = []
	ar2 = sorted(set(arr))
	ar3 = [x - 1 for x in ar2]
	N = len(set(ar2) - set(ar3))
	print('YES' if N == 1 else 'NO')


import math
from itertools import combinations
from collections import Counter
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	f = 1
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			f = 0
			break
	if f:
		print('YES')


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

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

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

def L():
	return list(sp())

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

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

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

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

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('../output.txt', 'w')
except:
	pass
for _ in range(L()[0]):
	n = L()[0]
	A = L()
	A.sort()
	ans = True
	for i in range(n - 1):
		if A[i + 1] - A[i] >= 2:
			ans = False
		if not ans:
			break
	if ans:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))[:n]
	if sum(a) % 2 != 0:
		print('YES')
	else:
		f = 0
		for ele in a:
			if ele % 2 != 0:
				f += 1
		if f != 0 and f % 2 == 0 and (len(a) > f):
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	(ko, last) = (1, 0)
	a = list(map(int, input().split()))
	a.sort()
	last = a[0]
	for i in range(1, n):
		if abs(last - a[i]) <= 1:
			last = a[i]
		else:
			ko = 0
			break
	print('YES' if ko else 'NO')


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

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

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

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

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

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

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

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

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	n = int(data())
	arr = l()
	for i in range(n):
		arr[i] = arr[i] & 1
	(a, b) = (arr.count(1), arr.count(0))
	if a == 0 or (a == n and (not n & 1)):
		out('NO')
		continue
	out('YES')


from sys import stdin, stdout

def solve():
	n = int(input())
	A = [int(i) for i in stdin.readline().split()]
	(e, o) = (0, 0)
	for i in A:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0:
		return 'NO'
	elif o % 2 == 0 and e == 0:
		return 'NO'
	else:
		return 'YES'
t = int(input())
for i in range(t):
	print(solve())


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	hold = None
	for element in arr:
		if hold == None:
			hold = element
			continue
		if abs(element - hold) <= 1:
			n -= 1
		hold = element
	if n == 1:
		print('YES')
	else:
		print('NO')


from sys import stdin

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

def have_one_num(num_list):
	status = True
	for i in range(1, len(num_list)):
		status &= num_list[i] - num_list[i - 1] <= 1
		if not status:
			return status
	return status
t = int(input())
input_list = []
results = []
for i in range(t):
	n = int(input())
	num_list = sorted(get_user_input())
	results.append(have_one_num(num_list))
for res in results:
	if res:
		print('YES')
		continue
	print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	max_dif = 0
	length = len(l)
	for i in range(length - 1):
		max_dif = max(max_dif, abs(l[i + 1] - l[i]))
	if max_dif > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a)
	printed = False
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			printed = True
			break
	if not printed:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	possible = True
	p = list(map(int, input().split()))
	p = list(set(p))
	p.sort()
	if len(p) == 1:
		print('YES')
	else:
		for i in range(1, len(p)):
			if p[i] - p[i - 1] > 1:
				possible = False
				break
		print('YES' if possible else 'NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		count = 0
		a.sort(reverse=True)
		for i in range(n - 1):
			if a[i] - a[i + 1] > 1:
				print('NO')
				count = 1
				break
		if count == 0:
			print('Yes')


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	isOdd = 0
	hasEven = False
	hasOdd = False
	for val in a:
		if val & 1:
			hasOdd = True
			isOdd ^= 1
		else:
			hasEven = True
	if isOdd:
		print('YES')
	elif hasOdd and hasEven:
		print('YES')
	else:
		print('NO')


def solve():
	n = int(input())
	arr = [int(i) for i in input().split()]
	arr.sort()
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			print('NO')
			return
	print('YES')
	return
for _ in range(int(input())):
	solve()


import sys
import math
import heapq
import collections

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

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

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

def inputstring():
	return [x for x in input()]

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	a = inputlist()
	even = False
	odd = False
	sm = 0
	for i in range(n):
		sm += a[i]
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if sm % 2 == 1 or (even and odd):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = input()
	numbs = [int(k) for k in input().split()]
	odds = len(list(filter(lambda x: x % 2 == 0, numbs)))
	even = len(list(filter(lambda x: x % 2 != 0, numbs)))
	if odds and even or even % 2 == 1:
		print('YES')
	else:
		print('NO')


def t(b):
	if b:
		print('YES')
		return
	print('NO')
for _ in range(int(input())):
	a = int(input())
	l = sorted(list(map(int, input().split())))
	for i in range(a - 1):
		if l[i + 1] - l[i] >= 2:
			t(False)
			break
	else:
		t(True)


t = int(input())
for i in range(t):
	n = int(input())
	flag1 = 0
	flag2 = 0
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		print('Yes')
	else:
		for i in a:
			if i % 2 == 0:
				flag1 = 1
			else:
				flag2 = 1
		if flag1 == 1 and flag2 == 1:
			print('Yes')
		else:
			print('No')


n = int(input())
rs = []
for i in range(0, n):
	num = int(input())
	flag = False
	odd = 0
	arr = list(map(int, input().split()))
	for j in arr:
		if j % 2 != 0:
			odd += 1
	if odd == 0:
		print('NO')
	elif odd > 0:
		if odd == num and num % 2 == 0:
			print('NO')
		else:
			print('YES')


nt = int(input())
for qzz in range(nt):
	n = int(input())
	a = list(map(int, input().split()))
	e = 0
	o = 0
	flag = 0
	for i in a:
		if i % 2 == 1:
			o += 1
		else:
			e += 1
		if o >= 1 and e >= 1:
			print('YES')
			flag = 1
			break
	if e == 0 and n % 2 == 0:
		flag = 1
		print('NO')
	elif e == 0 and n % 2 == 1:
		flag = 1
		print('YES')
	if flag == 0:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	s = sum(a)
	if s % 2:
		print('YES')
		continue
	odd = False
	even = False
	for x in a:
		if x % 2:
			odd = True
		else:
			even = True
	if odd and even:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	d = 0
	l1 = [int(i) for i in input().split()]
	l1 = sorted(l1)
	for i in range(len(l1) - 1):
		if abs(l1[i] - l1[i + 1]) <= 1:
			continue
		else:
			d = 1
			break
	if d == 0:
		print('YES')
	else:
		print('NO')
	t -= 1


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	ans = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans = 'NO'
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	odds = 0
	evens = 0
	for x in a:
		if x % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds % 2 != 0:
		print('YES')
	elif evens >= 1 and odds > 1:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		nums = list(map(int, input().split()))
		sum_nums = sum(nums)
		if sum_nums % 2 == 1:
			print('YES')
			continue
		odd_here = 0
		even_here = 0
		for num in nums:
			if num % 2 == 1:
				odd_here = 1
			if num % 2 == 0:
				even_here = 1
		if odd_here and even_here:
			print('YES')
			continue
		else:
			print('NO')
			continue
	return 0
main()


n = int(input())
for _ in range(n):
	m = int(input())
	arr = list(map(int, input().split()))
	s = sum(arr)
	if s % 2 == 1:
		print('YES')
	elif any((n % 2 == 0 for n in arr)) and any((n % 2 == 1 for n in arr)):
		print('YES')
	else:
		print('NO')


t = input()
t = int(t)
tag = True
while tag:
	tag0 = False
	t = t - 1
	num = input()
	num = int(num)
	num1 = 0
	num2 = 0
	xz = input().split(' ')
	for x in xz:
		if int(x) % 2 == 0:
			num2 = num2 + 1
		else:
			num1 = num1 + 1
	if num % 2 == 1 and num1 > 0:
		tag0 = True
	elif num % 2 == 0 and num1 > 0 and (num2 > 0):
		tag0 = True
	if tag0:
		print('YES')
	else:
		print('NO')
	if t == 0:
		tag = False


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	c = 0
	for i in a:
		if i % 2 == 1:
			c += 1
	if c == len(a) and c % 2 == 0 or c == 0:
		print('NO')
	else:
		print('YES')


q = int(input())
for _ in range(q):
	n = int(input())
	ar = list(map(int, input().split()))
	no = int(0)
	ne = int(0)
	s = int(0)
	for i in range(n):
		s = s + ar[i]
		if ar[i] % 2 == 1:
			no = no + 1
		else:
			ne = ne + 1
	if s % 2 == 1:
		print('YES')
	elif ne == 0 or no == 0:
		print('NO')
	else:
		print('YES')


import sys

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

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

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

def solve():
	n = mint()
	a = list(mints())
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			print('NO')
			return
	print('YES')
for i in range(mint()):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	ans = []
	if n == 1:
		print('YES')
		continue
	lst = sorted(lst)
	for j in range(1, n):
		ans.append(lst[j] - lst[j - 1])
	ans = sorted(ans)
	print(['YES', 'NO'][ans[-1] > 1])


for _ in range(int(input())):
	N = int(input())
	List = [int(x) for x in input().split()]
	fl = 0
	for i in range(min(List), max(List) + 1):
		if i in List:
			continue
		else:
			fl = 1
			break
	if fl:
		print('NO')
	else:
		print('YES')


class solution:

	def __init__(self, array):
		self.array = array

	def onePossible(self):
		res = 'YES'
		arr = sorted(array)
		for i in range(len(arr) - 1):
			if arr[i + 1] - arr[i] > 1:
				res = 'NO'
		return res
t = int(input())
while t > 0:
	n = int(input())
	array = list(map(int, input().split()))
	soln = solution(array)
	print(soln.onePossible())
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(k) for k in input().split()]
	arr.sort()
	output = True
	for j in range(0, len(arr) - 1):
		if arr[j + 1] - arr[j] > 1:
			output = False
			break
	if output:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	l = int(input())
	odd = 0
	even = 0
	li = list(map(int, input().split()))
	if sum(li) % 2:
		print('YES')
		continue
	for j in li:
		if j % 2:
			odd = 1
		else:
			even = 1
		if odd + even == 2:
			print('YES')
			break
	if odd + even != 2:
		print('NO')


T = int(input())
for i in range(T):
	N = int(input())
	numbers = [int(i) for i in input().split()]
	numbers.sort()
	flag = 0
	for i in range(0, len(numbers) - 1):
		if numbers[i + 1] - numbers[i] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


for tst in range(int(input())):
	n = int(input())
	a = sorted([int(i) for i in input().split()])
	f = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	(e, o) = (0, 0)
	a = [int(x) for x in input().split()]
	for i in a:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o % 2 == 0 and e == 0:
		print('NO')
	elif o == 0:
		print('NO')
	elif o % 2 == 1 and e % 2 == 1:
		print('YES')
	elif abs(e - o) % 2 == 0 and e != 0:
		print('YES')
	else:
		print('YES')


from sys import stdin, stdout
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().strip().split()))
	arr = sorted(arr)
	flg = 0
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			flg = 1
			break
	if flg:
		print('NO')
	else:
		print('YES')


t = int(input())
arr = []
for j in range(t):
	n = int(input())
	a = []
	b = []
	a = [int(x) for x in input().split()]
	a.sort()
	for i in range(len(a) - 1):
		j = i + 1
		if abs(a[i] - a[j]) <= 1:
			if a[i] >= a[j]:
				b.append(a[j])
			else:
				b.append(a[i])
	if len(a) - len(b) == 1:
		arr.append('YES')
	else:
		arr.append('NO')
for i in arr:
	print(i)


T = int(input())
for i in range(T):
	N = int(input())
	l = list(map(int, input().split()))
	flag = False
	for i in range(N):
		if l[i] % 2 != 0:
			if N % 2 != 0:
				flag = True
				break
			if N % 2 == 0:
				for i in range(N):
					if l[i] % 2 == 0:
						flag = True
						break
	if flag == True:
		print('YES')
	else:
		print('NO')


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

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

def S_():
	return input()

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

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

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

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

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

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def RLI(n=8, a=1, b=10):
	return [random.randint(a, b) for i in range(n)]

def RI(a=1, b=10):
	return random.randint(a, b)

def Rtest(T):
	(case, err) = (0, 0)
	for i in range(T):
		inp = INP()
		(a1, ls) = naive(*inp)
		a2 = solve(*inp)
		if a1 != a2:
			print((a1, a2), inp)
			err += 1
		case += 1
	print('Tested', case, 'case with', err, 'errors')

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

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

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

class Comb:

	def __init__(self, n, mo=10 ** 9 + 7):
		self.fac = [0] * (n + 1)
		self.inv = [1] * (n + 1)
		self.fac[0] = 1
		self.fact(n)
		self.mo = mo
		for i in range(1, n + 1):
			self.fac[i] = i * self.fac[i - 1] % mo
			self.inv[n] *= i
			self.inv[n] %= mo
		self.inv[n] = pow(self.inv[n], mo - 2, mo)
		for i in range(1, n):
			self.inv[n - i] = self.inv[n - i + 1] * (n - i + 1) % mo
		return

	def fact(self, n):
		return self.fac[n]

	def invf(self, n):
		return self.inv[n]

	def comb(self, x, y):
		if y < 0 or y > x:
			return 0
		return self.fac[x] * self.inv[x - y] * self.inv[y] % self.mo
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	n = I()
	a = [i % 2 for i in LI()]
	Yn(sum(a) % 2 == 1 or (sum(a) != len(a) and sum(a) != 0))


t = int(input())
result = []
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	oddFlag = False
	evenFlag = False
	for x in a:
		if x % 2 == 0:
			evenFlag = True
		else:
			oddFlag = True
		if evenFlag and oddFlag:
			break
	if oddFlag == False or (evenFlag == False and n % 2 == 0):
		result.append('NO')
	else:
		result.append('YES')
for x in result:
	print(x)


def solve(arr, n):
	max_diff = 0
	arr.sort()
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) > 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(arr, n))


from collections import Counter
T = int(input())
for t in range(T):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	(i, j) = (0, 1)
	while j < n:
		if abs(l[i] - l[j]) <= 1:
			i += 1
			j += 1
		else:
			break
	if j == n:
		print('YES')
	else:
		print('NO')


import sys

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

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

def solve(n, l):
	l = sorted(l)
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			return False
	return True

def main():
	t = int(input())
	for i in range(t):
		n = MI()
		l = LI()
		print('YES' if solve(n, l) else 'NO')
main()


q = int(input())
for z in range(q):
	flC = False
	flL = False
	n = int(input())
	a = list(map(int, input().split(' ')))
	for i in a:
		if i % 2 != 0:
			flC = True
		else:
			flL = True
	if sum(a) % 2 != 0:
		print('YES')
	elif flC == flL == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag = False
	a.sort(reverse=True)
	if len(a) == 1:
		print('YES')
		continue
	for i in range(1, len(a)):
		if abs(a[i] - a[i - 1]) > 1:
			flag = True
	print('YES') if flag == False else print('NO')


t = int(input())
result = list()
for test_case in range(t):
	n = int(input())
	lst = input()
	lst = lst.split()
	lst = list(map(int, lst))
	even = 0
	odd = 0
	for i in lst:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0 or (even == 0 and odd % 2 == 0):
		result.append('NO')
	else:
		result.append('YES')
for i in result:
	print(i)


t = int(input())
n = []
list1 = []
for x in range(t):
	n.append(int(input()))
	list1.append(list(map(int, input().split(None, n[x])[:n[x]])))
	odd = []
	even = []
	sum = 0
	for y in range(n[x]):
		sum += list1[x][y]
		if list1[x][y] % 2 != 0:
			odd.append(y)
		else:
			even.append(y)
	if sum % 2 != 0:
		print('YES')
	elif even == [] or odd == []:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ch = False
	nch = False
	for j in a:
		if j % 2 == 0:
			ch = True
		else:
			nch = True
	if ch and nch or (nch and n % 2 == 1):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	_sum = 0
	div = 0
	n = int(input())
	for e in map(int, input().split()):
		_sum += e
		if e % 2 == 0:
			div += 1
	if _sum % 2 or (div > 1 and n - div >= 1) or (n - div > 1 and div >= 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split(' ')]
	even = [i % 2 == 0 for i in arr]
	odd = [i % 2 == 1 for i in arr]
	if n % 2 == 0:
		if all(even) or all(odd):
			print('NO')
		else:
			print('YES')
	elif all(odd):
		print('YES')
	elif all(even):
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	n = int(input())
	odd = sum(map(lambda x: int(x) % 2, input().split()))
	print('NO' if odd == 0 or (odd == n and odd % 2 == 0) else 'YES')


test = 0
t = int(input())
ls = []
for i in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	a = list(dict.fromkeys(a))
	a.sort()
	test = 1
	for j in range(0, len(a) - 1):
		if a[j + 1] - a[j] > 1:
			test = 0
			break
	if len(a) == 1:
		ls.append('YES')
	elif test == 0:
		ls.append('NO')
	else:
		ls.append('YES')
for x in ls:
	print(x)


for num in range(int(input())):
	an = int(input())
	al = list(map(int, input().split()))
	al.sort()
	state = True
	for i in range(len(al) - 1):
		if al[i + 1] - al[i] > 1:
			state = False
			break
	if state:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	o = []
	e = []
	for i in a:
		if i % 2 == 0:
			e.append(i)
		else:
			o.append(i)
	ans = False
	if n % 2 != 0 and len(e) == 0:
		ans = True
	elif len(o) != 0 and len(e) != 0:
		ans = True
	if ans:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout

def INPUT():
	return list((int(i) for i in stdin.readline().split()))

def inp():
	return stdin.readline()

def out(x):
	return stdout.write(x)
import math
for _ in range(int(input())):
	n = int(input())
	A = INPUT()
	A.sort()
	bool = True
	for i in range(1, n):
		if A[i] - A[i - 1] > 1:
			bool = False
			break
	if bool is True:
		print('YES')
	else:
		print('NO')


n = int(input())
for z in range(n):
	m = int(input())
	li = list(map(int, input().split()))
	li.sort()
	i = 0
	while i < len(li) - 1:
		if li[i + 1] - li[i] <= 1:
			li.pop(i)
			i = 0
		else:
			i = i + 1
			break
	if len(li) == 1:
		print('YES')
	else:
		print('NO')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	n = I()
	a = li()
	a.sort()
	flag = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] <= 1:
			continue
		flag = 0
		break
	if flag:
		print('YES')
	else:
		print('NO')
for _ in range(I()):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	a_in = input()
	a = a_in.split()
	a = list(map(int, a))
	a.sort()
	if n == 1:
		print('YES')
		continue
	else:
		total = sum(a)
		for i in range(1, n):
			if a[i] - a[i - 1] <= 1:
				total -= a[i - 1]
				a[i - 1] = 0
	if a[i] == total:
		print('YES')
	else:
		print('NO')


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

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

def IO():
	return stdin.readline()

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

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

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

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

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

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * (2 * 10 ** 5 + 5)
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(2 * 10 ** 5 + 5):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def solve():
	n = II()
	li = L()
	if n == 1:
		P('YES')
		return
	li.sort()
	for i in range(n - 1):
		if li[i + 1] - li[i] > 1:
			P('NO')
			return
	P('YES')
	return
t = II()
for i in range(t):
	solve()


t = int(input())
for _ in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	o = 0
	for i in l:
		if i % 2 != 0:
			o += 1
	if o == n and n % 2 == 0:
		print('NO')
	elif o == 0:
		print('NO')
	elif o == n and n % 2 != 0:
		print('YES')
	elif o % 2 == 0 and o != n:
		print('YES')
	elif o % 2 == 1:
		print('YES')


for _ in [0] * int(input()):
	(n, j) = (int(input()), 0)
	a = list(map(int, input().split()))
	for i in range(min(a), max(a)):
		if i not in a:
			j = 1
			break
	print('YNEOS'[j::2])


def calc(n, nums):
	if sum(nums) % 2 == 1:
		return 'Yes'
	if n % 2 == 1:
		for a in nums:
			if a % 2 == 1:
				return 'Yes'
		return 'No'
	(has_odd, has_even) = (False, False)
	for a in nums:
		if a % 2 == 1:
			has_odd = True
		else:
			has_even = True
		if has_odd and has_even:
			return 'Yes'
	return 'No'
N = int(input())
cases = []
for _ in range(N):
	n = int(input())
	c = list(map(int, input().split()))
	cases.append((n, c))
for (n, c) in cases:
	print(calc(n, c))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr = list(set(arr))
	ans = arr.copy()
	for i in range(len(arr)):
		for j in range(i + 1, len(arr)):
			if i != j and abs(arr[i] - arr[j]) <= 1:
				try:
					ans.remove(min(arr[i], arr[j]))
				except:
					pass
	if len(ans) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	f = 1
	nl = []
	for i in l:
		if i not in nl:
			nl.append(i)
	nl = sorted(nl)
	l = nl
	if max(nl) - min(nl) == len(nl) - 1:
		f = 1
	else:
		for i in range(len(l) - 1):
			if len(nl) != 1:
				f = 0
				break
			if abs(l[i] - l[i + 1]) <= 1:
				nl.remove(min(l[i], l[j]))
	if f == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		c = 0
		for i in l:
			if i % 2 == 0:
				c = c + 1
		if c == len(l) or c == 0:
			print('NO')
		else:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	array = list(map(int, input().split()))
	count = 0
	for i in array:
		if i % 2 == 1:
			count += 1
	if 0 < count < n or (n == count and count % 2 == 1):
		print('YES\n')
	else:
		print('NO\n')


t = int(input())
for i in range(t):
	count = 0
	n = int(input())
	b = [int(b) for b in input().split()]
	for i in range(n):
		if b[i] % 2 == 0:
			count = count + 1
	if count < n and count != 0:
		print('YES')
	if count == n:
		print('NO')
	if count == 0 and n % 2 != 0:
		print('YES')
	if count == 0 and n % 2 == 0:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	if sum(arr) % 2 != 0:
		print('YES')
		continue
	count = 0
	for x in arr:
		if x % 2 == 0:
			count += 1
	if count == 0 or count == n:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	n = int(input())
	nums = [int(x) for x in input().split()]
	nums.sort()
	for i in range(n - 1):
		if nums[0] == nums[1] or nums[1] == nums[0] + 1:
			nums.pop(0)
		else:
			print('NO')
			break
	if len(nums) == 1:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	fl = True
	for j in range(len(a)):
		if a[j] + 1 not in a and a[j] != a[-1]:
			print('NO')
			fl = False
			break
	if fl:
		print('YES')


N = int(input())
for _ in range(N):
	n = int(input())
	data = input()
	split = data.split(' ')
	numbers = []
	for x in split:
		numbers.append(int(x))
	if n == 1:
		print('YES')
	else:
		yes = True
		a = [False] * 200
		for i in range(n):
			a[numbers[i]] = True
		for j in range(200):
			if a[j]:
				zac = j
				break
		for j in range(200):
			if a[199 - j]:
				kon = 199 - j
				break
		for j in range(zac, kon):
			if not a[j]:
				yes = False
				break
		if yes:
			print('YES')
		else:
			print('NO')


def possible(arr, n):
	arr.sort()
	for i in range(1, n):
		if arr[i] - arr[i - 1] <= 1:
			arr[i - 1] = -1
	counter = 0
	for i in range(n):
		if arr[i] != -1:
			counter += 1
	return counter == 1
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	if possible(arr, n):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	oddz = evenz = 0
	for i in l:
		if i % 2 == 0:
			evenz += 1
		else:
			oddz += 1
	if n % 2 != 0 and oddz > 0 or (n % 2 == 0 and oddz > 0 and (evenz > 0)):
		print('YES')
	else:
		print('NO')


testcase = int(input())
while testcase > 0:
	n = int(input())
	array = [int(i) for i in input().split()]
	array.sort()
	smaller = [abs(array[i] - array[i + 1]) <= 1 for i in range(n - 1)]
	if all(smaller) or smaller == []:
		print('YES')
	else:
		print('NO')
	testcase -= 1


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 5)
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 != 0:
		print('YES')
		continue
	odd = 0
	even = 0
	for i in l:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even != 0 and odd != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for r in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	t = 0
	w = 'YES'
	if len(l) == 1:
		w = 'YES'
	else:
		for i in range(len(l) - 1):
			if l[i + 1] - l[i] > 1:
				w = 'NO'
				break
	print(w)


import sys
t = int(input())
while t:
	n = int(input())
	arr = list(map(int, sys.stdin.readline().split()))
	oddcount = 0
	evencount = 0
	for i in range(n):
		if arr[i] % 2 == 0:
			evencount += 1
		else:
			oddcount += 1
	if oddcount % 2 == 1:
		print('YES')
	elif oddcount % 2 == 0 and evencount >= 1 and (oddcount >= 1):
		print('YES')
	else:
		print('NO')
	t -= 1


for i in range(int(input())):
	r = 0
	o = 0
	e = 0
	input()
	for j in input().split():
		if int(j) % 2:
			o = 1
		else:
			e = 1
		r += int(j)
	if r % 2:
		print('YES')
	elif e and o:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	odd = 0
	sm = 0
	li = input().split()
	for i in range(len(li)):
		li[i] = int(li[i])
		sm += li[i]
		if li[i] % 2 != 0:
			odd += 1
	if sm % 2 != 0:
		print('YES')
	elif odd == n:
		print('NO')
	elif odd == 0:
		print('NO')
	else:
		print('YES')
	t -= 1


k = int(input())
for i in range(k):
	n = int(input())
	array = list(map(int, input().split(' ')))
	if sum(array) % 2 == 1:
		print('YES')
	else:
		odd = False
		even = False
		for ele in array:
			if ele % 2 == 1:
				odd = True
			else:
				even = True
		if even and odd:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	ni = 0
	chi = 0
	for j in range(len(a)):
		if a[j] % 2 == 0:
			chi = 1
		else:
			ni = 1
	if ni == chi:
		print('YES')
		continue
	if ni == 1 and len(a) % 2 == 1:
		print('YES')
		continue
	else:
		print('NO')


def anss(arr):
	n = len(arr)
	if n == 1:
		return True
	arr.sort()
	for i in range(n - 1):
		if arr[i + 1] - arr[i] == 0 or arr[i + 1] - arr[i] == 1:
			continue
		else:
			return False
	return True
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	k = anss(a)
	if k:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	if n == 1:
		print('YES')
	else:
		for j in range(n - 1):
			if l[j + 1] - l[j] > 1:
				print('NO')
				break
		if j == n - 2 and l[n - 1] - l[n - 2] <= 1:
			print('YES')


T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	check = 0
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			check = 1
			break
	if check == 1:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split(' ')))
	if not n:
		print('NO')
		continue
	if n == 1:
		print('YES')
		continue
	(nums, is_possible) = (sorted(nums), True)
	for i in range(n - 1):
		if abs(nums[i] - nums[i + 1]) > 1:
			is_possible = False
			break
	if is_possible:
		print('YES')
	else:
		print('NO')


t = 1
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	found = True
	for i in range(1, n):
		if a[i] > a[i - 1] + 1:
			print('NO')
			break
	else:
		print('YES')


def f():
	n = int(input())
	vs = sorted(map(int, input().split()))
	if len(vs) == 1:
		return 'YES'
	for i in range(1, n):
		if abs(vs[i - 1] - vs[i]) > 1:
			return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	print(f())


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	sum = 0
	for j in a:
		if not j % 2 == 0:
			sum += 1
	if n == sum and sum % 2 == 0 or sum == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	y = list(map(int, input().split()))
	x = list()
	x = sorted(y)
	count = 0
	i = 0
	a = len(x)
	if len(x) == 1:
		print('YES')
		t = t - 1
		continue
	else:
		while i < len(x):
			for j in range(i + 1, len(x)):
				if abs(x[i] - x[j]) <= 1:
					if x[i] <= x[j]:
						x.pop(i)
					else:
						x.pop(j)
					count = count + 1
					i = -1
					break
			i = i + 1
		if a - count == 1:
			print('YES')
		else:
			print('NO')
	t = t - 1


t = int(input())
for i in range(t):
	n = int(input())
	s = [int(j) for j in input().split()]
	if sum(s) % 2 == 1:
		print('YES')
	else:
		a = 0
		for i in range(n):
			if s[i] % 2 == 1:
				a = a + 1
		if a == n or a == 0:
			print('NO')
		else:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	s = sorted(list(map(int, input().split())))
	for x in range(n - 1):
		if s[x + 1] - s[x] >= 2:
			print('NO')
			break
	else:
		print('YES')


def func(n, arr):
	arr.sort()
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			return 'NO'
	return 'YES'
for t in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	print(func(n, arr))


t = int(input())
for i in range(t):
	n = int(input())
	arr = [eval(x) for x in input().split()]
	count = 1
	length = len(arr)
	arr.sort()
	if length == 1:
		print('YES')
	else:
		for j in range(1, length):
			if abs(arr[j] - arr[j - 1]) <= 1:
				count += 1
			else:
				print('NO')
				break
		if count == length:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	odds = sum([1 for x in nums if x % 2 != 0])
	even = n - odds
	if odds == 0 or (odds % 2 == 0 and even == 0):
		print('NO')
	elif odds % 2 == 0 and even > 0 or odds % 2 != 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = sorted((int(i) for i in input().split()))
	res = 'YES'
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			res = 'NO'
			break
	print(res)


for i in range(int(input())):
	l = int(input())
	d = [int(i) & 1 for i in input().split()]
	s = sum(d)
	if s & 1:
		print('YES')
	elif 0 < s < l:
		print('YES')
	else:
		print('NO')


for s in [*open(0)][2::2]:
	a = sorted(map(int, s.split()))
	print('NYOE S'[{x - y for (x, y) in zip(a, a[1:])} <= {-1, 0, 1}::2])


from sys import stdin, stdout
import math
from collections import Counter, deque
L = lambda : deque(list(map(int, stdin.readline().strip().split())))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
IN = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()
mod = 1000000007

def s(a):
	print(''.join(list(map(str, a))))

def solve():
	n = I()
	a = L()
	a = sorted(a)
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			return
	print('YES')
for _ in range(I()):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort(reverse=True)
	c = 0
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) <= 1:
			pass
		else:
			c = 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for tt in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	cc = 0
	flag = False
	for i in range(len(arr)):
		if arr[i] % 2 == 1:
			cc += 1
	if cc == n and n % 2 == 0 or cc == 0:
		print('NO')
	else:
		print('YES')


def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		if n == 1:
			print('YES')
		else:
			flag = True
			for i in range(n - 1):
				if abs(a[i] - a[i + 1]) <= 1:
					pass
				else:
					flag = False
			if flag:
				print('YES')
			else:
				print('NO')
main()


import sys

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

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

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

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

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

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(n, a):
	mn = min(a)
	mx = max(a)
	s = set(a)
	for x in range(mn, mx + 1):
		if x not in s:
			return False
	return True

def main():
	for _ in range(ri()):
		n = ri()
		a = ria()
		ws('YES' if solve(n, a) else 'NO')
main()


t = int(input())
for i in range(t):
	len_a = int(input())
	array = [int(i) for i in input().split()]
	num2 = 0
	num = 0
	ans = 'NO'
	for j in range(len_a):
		if array[j] % 2 == 0:
			num2 += 1
		else:
			num += 1
	if num % 2 == 1:
		ans = 'YES'
	elif num >= 1 and num2 >= 1:
		ans = 'YES'
	print(ans)


t = int(input())
while t > 0:
	n = int(input())
	lst = list(map(int, input().strip().split(' ')))
	a = 0
	b = 0
	c = 0
	if n % 2 == 0:
		for i in range(len(lst)):
			if lst[i] % 2 == 0:
				a += 1
			if lst[i] % 2 != 0:
				b += 1
		if b == 0 or a == 0:
			print('NO')
		else:
			print('YES')
	if n % 2 != 0:
		for i in range(len(lst)):
			if lst[i] % 2 != 0:
				c += 1
		if c == 0:
			print('NO')
		else:
			print('YES')
	t -= 1


t = int(input())
for t in range(t):
	n = int(input())
	cnt = 0
	list = input().split(' ')
	for x in list:
		i = int(x)
		if i % 2 != 0:
			cnt += 1
	if n == cnt and n % 2 == 0:
		print('NO')
	elif cnt == 0:
		print('NO')
	else:
		print('YES')


test = int(input())
for t in range(test):
	n = int(input())
	lst = [int(i) for i in input().split()]
	s = sum(lst)
	(even, odd) = (0, 0)
	for i in lst:
		if i % 2 == 0:
			odd = 1
		if i % 2 != 0:
			even = 1
	if s % 2 != 0 or (s % 2 == 0 and (odd == 1 and even == 1)):
		print('YES')
	else:
		print('NO')


def res(l):
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			return -1
	return 1
n = int(input())
for i in range(n):
	v = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	v = res(l)
	if v == 1:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	x = int(input())
	A = list(map(int, input().split()))
	A.sort()
	k = x
	for j in range(x - 1):
		if abs(A[j] - A[j + 1]) <= 1:
			k -= 1
	if k == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	array = list(map(int, input().split()))
	odd_is = False
	even_is = False
	for i in array:
		if i % 2 == 1:
			odd_is = True
		else:
			even_is = True
	if odd_is and even_is:
		print('YES')
	elif odd_is and n % 2 == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
ergL = []
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	p = True
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			p = False
			break
	if p:
		ergL.append('YES')
	else:
		ergL.append('NO')
for i in ergL:
	print(i)


import sys
q = int(input())
for i in range(q):
	n = int(sys.stdin.readline())
	a = [int(j) for j in sys.stdin.readline().split()]
	problem = 0
	a.sort()
	for j in range(len(a) - 1):
		if a[j] + 1 < a[j + 1]:
			print('NO')
			break
	else:
		print('YES')


testCases = int(input())
for test in range(testCases):
	n = int(input())
	array = [int(x) for x in input().split()]
	odds = 0
	evens = 0
	for num in array:
		if num % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds == 0:
		print('No')
	elif evens == 0 and odds % 2 == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	n = int(input())
	nos = sorted(set(map(int, input().split())))
	f = 1
	for i in range(len(nos) - 1):
		if nos[i + 1] - nos[i] > 1:
			f = 0
			break
	if f:
		print('yes')
	else:
		print('no')


t = int(input())
for _ in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	flag = 0
	for i in range(1, len(li)):
		if li[i] - li[i - 1] >= 2:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	list1 = [int(a) for a in input().split()]
	if n == 1:
		print('YES')
		continue
	list1.sort()
	flag = 0
	for x in range(len(list1) - 1):
		if list1[x + 1] - list1[x] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


t = int(input())
i = 0
out = str()
while i < t:
	count = 0
	n = int(input())
	a = str(input())
	a = a.split()
	j = 0
	while j < n:
		if int(a[j]) % 2 == 0:
			count += 1
		else:
			count -= 1
		j += 1
	if abs(count) == n and n % 2 == 0 and (int(a[0]) % 2 == 1):
		out = out + 'NO'
	elif abs(count) == n and int(a[0]) % 2 == 0:
		out = out + 'NO'
	else:
		out = out + 'YES'
	i += 1
	if i != t:
		out += '\n'
print(out)


import math
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	l.sort()
	flag = 0
	for j in range(1, n):
		if abs(l[j] - l[j - 1]) > 1:
			flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	arr = [int(s) for s in input().split()]
	c = 0
	for j in arr:
		if (arr[0] + j) % 2 != 0:
			c = 1
	if c or sum(arr) % 2 == 1:
		print('yes')
	else:
		print('no')


for tt in range(int(input())):
	n = int(input())
	c = 0
	a = sorted([int(f) for f in input().split()])
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			c = 1
			break
	if c == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(inp) for inp in input().split()]
	arr = sorted(arr)
	if len(arr) == 1:
		print('YES')
		continue
	r = 'YES'
	for j in range(1, len(arr)):
		if arr[j] - arr[j - 1] > 1:
			r = 'NO'
			break
	print(r)


def remove(aa):
	n = len(aa)
	l = aa[0]
	for i in range(0, n):
		if abs(aa[i] - l) > 1:
			return 'NO'
		l = aa[i]
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	aa = sorted(a)
	print(remove(aa))


from collections import Counter
tst = int(input())
t = 1
while t <= tst:
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	i = 1
	fg = True
	mx = 1
	while i < len(arr):
		if arr[i] - arr[i - 1] > 1:
			fg = False
			break
		i += 1
	if fg == False:
		print('NO')
	else:
		print('YES')
	t += 1


n = int(input())
for i in range(n):
	m = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	q = 0
	for j in range(1, len(a)):
		if a[j] - a[j - 1] < 2:
			q += 1
	if q == m - 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	a = arr[:]
	a.sort()
	for i in a:
		if i in arr:
			if i + 1 in arr:
				arr.remove(i)
			elif arr.count(i) > 1:
				arr.remove(i)
	if len(arr) == 1:
		print('Yes')
	else:
		print('No')


import math
import sys
import bisect
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ch = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			ch = 1
			break
	if ch == 1:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
Q = int(input())
Query = []
for _ in range(Q):
	N = int(input())
	A = list(map(int, input().split()))
	Query.append((N, A))
for (N, A) in Query:
	ok = False
	if sum(A) % 2 == 1:
		ok = True
	else:
		even = False
		odd = False
		for a in A:
			if a % 2 == 0:
				even = True
			else:
				odd = True
		if even and odd:
			ok = True
	print('YES' if ok else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	x = list(set(map(int, input().split())))
	if len(x) == 1:
		print('YES')
	else:
		mx = max(x)
		mn = min(x) - 1
		if sum(x) != mx * (mx + 1) / 2 - mn * (mn + 1) / 2:
			print('NO')
		else:
			print('YES')


def RemoveNumBFS(nums):
	queue = []
	queue.append(nums[0])
	while queue:
		current = queue.pop(0)
		if len(nums) == 1:
			print('YES')
			return
		sig1 = nums.index(current) + 1
		sig2 = nums.index(current) - 1
		if sig1 < len(nums):
			if nums[sig1] - current == 1 or nums[sig1] - current == 0:
				nums.remove(current)
				queue.append(nums[sig1 - 1])
			elif current - nums[sig1] == 1:
				queue.append(nums[sig1 - 1])
				nums.remove(nums[sig1])
		if sig2 >= 0:
			if nums[sig2] - current == 1:
				nums.remove(current)
				queue.append(nums[sig2 + 1])
			elif current - nums[sig2] == 1 or current - nums[sig2] == 0:
				nums.remove(nums[sig1])
				queue.append(nums[sig2 + 1])
	print('NO')
	return

def RemoveNum(nums):
	nums = sorted(nums)
	for i in range(len(nums) - 1):
		if abs(nums[i] - nums[i + 1]) > 1:
			print('NO')
			return
	print('YES')
tests = int(input())
for test in range(tests):
	size = int(input())
	arr = input().split(' ')
	for i in range(len(arr)):
		arr[i] = int(arr[i])
	RemoveNum(arr)


from collections import Counter
t = int(input().strip())
while t > 0:
	n = int(input().strip())
	a = list(map(int, input().strip().split()))
	counts = Counter(a)
	l = sorted(counts.keys())
	prev = l[0]
	res = 'YES'
	for x in l[1:]:
		if x > prev + 1:
			res = 'NO'
			break
		prev = x
	print(res)
	t -= 1


cases = int(input())
for x in range(cases):
	input()
	stringNums = input().split(' ')
	nums = list((int(x) for x in stringNums))
	numsUnique = sorted(list(set(nums)))
	if numsUnique[-1] + 1 - len(numsUnique) == numsUnique[0]:
		print('YES')
	else:
		print('NO')


t = int(input())
i = 0
while i < t:
	a = int(input())
	riga = list(map(int, input().strip().split()))
	tot = riga[0]
	i1 = 1
	while i1 < a:
		tot = tot + riga[i1]
		i1 = i1 + 1
	if tot % 2 != 0:
		print('YES')
	else:
		i1 = 1
		if riga[0] % 2 == 0:
			ris = True
		else:
			ris = False
		d = ris
		while i1 < a:
			if riga[i1] % 2 == 0:
				ris = True
			else:
				ris = False
			if ris != d:
				print('YES')
				break
			i1 = i1 + 1
		if ris == d:
			print('NO')
	i = i + 1


import math
from bisect import bisect_left, bisect_right
from sys import stdin, stdout
input = lambda : stdin.readline().strip()
print = lambda s: stdout.write(s)
t = int(input())
for i in range(t):
	n = int(input())
	ls = list(map(lambda x: int(x) % 2, input().split()))
	if 0 not in ls or 1 not in ls:
		if sum(ls) % 2:
			print('YES\n')
		else:
			print('NO\n')
	else:
		print('YES\n')


for _ in range(int(input())):
	length = int(input())
	array = list(map(int, input().split()))
	array.sort()
	pre = array[0]
	result = True
	for i in array[1:]:
		if i > pre + 1:
			result = False
		pre = i
	if result:
		print('YES')
	else:
		print('NO')


t = int(input())
d = {}
for i in range(t):
	n = int(input())
	s = str(input()).split(' ')
	d[i] = (n, s)
for key in d.keys():
	answer = 'YES'
	dd = sorted(d[key][1])
	ddd = []
	for i in range(len(dd)):
		ddd.append(int(dd[i]))
	for i in range(len(ddd) - 1):
		if int(sorted(ddd)[i + 1]) - int(sorted(ddd)[i]) > 1:
			answer = 'NO'
			break
	print(answer)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	l = len(list(filter(lambda x: x % 2, arr)))
	if l >= 1 and (l < n or n % 2):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	flag = 0
	count = 0
	if n % 2 == 0:
		for x in l:
			if x % 2 != 0:
				count += 1
		if n == count or count == 0:
			flag = 1
	else:
		for x in l:
			if x % 2 == 0:
				count += 1
		if count == n:
			flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


import math

def ans():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	lis = []
	if n == 1:
		print('YES')
		return
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			return
		else:
			continue
	print('YES')
	return
t = int(input())
while t > 0:
	ans()
	t -= 1


n = int(input())
while n:
	n -= 1
	length = int(input())
	data = list(map(int, input().split()))
	data.sort()
	flag = False
	for i in range(length - 1):
		if data[i + 1] - data[i] > 1:
			print('NO')
			flag = True
			break
	if not flag:
		print('YES')


from sys import stdin
input()
n = 0
for i in stdin:
	if not n:
		n = int(i)
		continue
	else:
		(a, b) = (0, 0)
		for x in i.split():
			if int(x) % 2:
				a += 1
			else:
				b += 1
		if a == n and (not n % 2) or b == n:
			print('NO')
		else:
			print('YES')
		n = None


for _ in range(int(input())):
	n = int(input())
	ls = sorted(set(list(map(int, input().split()))))
	flg = True
	for i in range(1, len(ls)):
		if ls[i] - ls[i - 1] > 1:
			flg = False
			break
	print('YES' if flg else 'NO')


a = int(input())
for i in range(a):
	_ = input()
	t = list(map(int, input().split()))
	even = 0
	odd = 0
	for i in t:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 0:
		if odd % 2 != 0:
			print('YES')
		else:
			print('NO')
	elif odd > 0:
		print('YES')
	else:
		print('NO')


tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		print('YES')
	else:
		(evens, odds) = (0, 0)
		for i in arr:
			if i % 2 == 0:
				evens += 1
			else:
				odds += 1
		if len(arr) % 2 == 0:
			if evens == 0 or odds == 0:
				print('NO')
			else:
				print('YES')
		elif odds >= 1:
			print('YES')
		else:
			print('NO')


t = int(input())

def checkA(arr):
	for i in range(1, len(arr)):
		if abs(arr[i] - arr[i - 1]) > 1:
			return False
	return True
for testIteration in range(t):
	n = int(input())
	arr = []
	while len(arr) < n:
		arr.extend([int(s) for s in input().split(' ')])
	arr.sort()
	if checkA(arr):
		print('YES')
	else:
		print('NO')


def solve(a):
	a.sort()
	while len(a) >= 2:
		if abs(a[0] - a[1]) <= 1:
			if a[0] > a[1]:
				a.pop(1)
			else:
				a.pop(0)
		else:
			return 'NO'
	if len(a) == 1:
		return 'YES'
for _ in range(int(input())):
	_ = input()
	a = list(map(int, input().split(' ')))
	print(solve(a))


for _ in range(int(input())):
	n = int(input())
	data = [int(x) for x in input().split()]
	data.sort()
	if len(set(data)) == 1:
		print('YES')
	else:
		flag = 0
		for q in range(1, n):
			if data[q] - data[q - 1] > 1:
				flag = 1
				break
		if flag:
			print('NO')
		else:
			print('YES')


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
for case in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = set(a)
	a = list(a)
	a.sort()
	valid = True
	for i in range(len(a) - 1):
		if a[i + 1] != a[i] + 1:
			valid = False
			break
	if valid:
		print('YES')
	else:
		print('NO')


import sys
from collections import defaultdict

def stdinWrapper():
	data = '5\n2\n2 3\n4\n2 2 8 8\n3\n3 3 3\n4\n5 5 5 5\n4\n1 1 1 1\n'
	for line in data.split('\n'):
		yield line
if '--debug' not in sys.argv:

	def stdinWrapper():
		while True:
			yield input()
inputs = stdinWrapper()

def inputWrapper():
	return next(inputs)

def getType(_type):
	return _type(inputWrapper())

def getArray(_type):
	return [_type(x) for x in inputWrapper().split()]
t = getType(int)
for _ in range(t):
	_len = getType(int)
	_numbers = getArray(int)
	_odd_numbers = [x for x in _numbers if x % 2 != 0]
	_odd_count = len(_odd_numbers)
	_count = len(_numbers)
	if _odd_count == 0:
		print('NO')
	elif _count == _odd_count:
		if _count % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


T = int(input())
for _ in range(T):
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort()
	ans = 'Yes'
	for i in range(1, n):
		if abs(ls[i] - ls[i - 1]) > 1:
			ans = 'No'
			break
	print(ans)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	mn = a[0]
	flag = 1
	for i in a:
		if i - mn <= 1:
			mn = i
		else:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')


import copy
import math
r = int(input())
for l in range(r):
	n = int(input())
	arr = [int(d) for d in input().split()]
	if n == 1:
		print('YES')
	else:
		arr.sort()
		k = 0
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				k += 1
			if k >= 1:
				print('NO')
				break
		if k == 0:
			print('YES')


def func(A):
	if len(A) == 1:
		return 'YES'
	i = 0
	A.sort()
	while i < len(A) - 1:
		if abs(A[i] - A[i + 1]) > 1:
			return 'NO'
		i += 1
	return 'YES'
testcases = int(input())
for t in range(testcases):
	_ = input()
	A = [int(i) for i in input().split()]
	print(func(A))


t = int(input())
for _ in range(t):
	n = int(input())
	l1 = [int(i) for i in input().split()]
	l1.sort()
	f = 0
	for i in range(n - 1):
		if abs(l1[i] - l1[i + 1]) <= 1:
			continue
		else:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	n = int(input())
	ar = input().split()
	ar = [int(y) for y in ar]
	odd = 0
	ev = 0
	for y in ar:
		if y & 1:
			odd += 1
		else:
			ev += 1
	if odd & 1:
		print('YES')
	elif odd & 1 == 0 and ev > 0 and (odd > 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(even, odd) = (0, 0)
	for i in a:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if sum(a) % 2 != 0:
		print('YES')
	elif odd == 0 or even == 0:
		print('NO')
	else:
		print('YES')


def ip():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		g = [0, 0]
		for i in a:
			g[i % 2] += 1
		if g[1] == 0:
			print('NO')
		elif g[0] == 0:
			if g[1] % 2 == 0:
				print('NO')
			else:
				print('YES')
		else:
			print('YES')
ip()


def suka(a):
	a = sorted(list(set(a)))
	fl = 0
	if len(a) == 1:
		return 'YES'
	else:
		for i in range(1, len(a)):
			if a[i] - a[i - 1] > 1:
				fl = 1
				break
		if fl:
			return 'NO'
		else:
			return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	a = map(float, input().split())
	if n == 1:
		print('YES')
	else:
		print(suka(a))


n = int(input())
li = []

def solve(t, s):
	s.sort()
	for j in range(1, t):
		if s[j] - s[j - 1] > 1:
			return 'NO'
	return 'YES'
for i in range(n):
	t = int(input())
	s = list(map(int, input().split()[:t]))
	li.append(solve(t, s))
for a in li:
	print(a)


t = int(input())
for i in range(t):
	l = list()
	j = int(input())
	l = sorted(map(int, input().split()))
	test = True
	i = 1
	while test == True and i < len(l):
		if l[i] - l[i - 1] > 1:
			test = False
		i += 1
	if test == True:
		print('yes')
	else:
		print('no')


t = int(input())
for _ in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	if len(num) == 1:
		print('YES')
	else:
		num.sort()
		for i in range(n - 1):
			if num[i + 1] - num[i] <= 1:
				num[i] = '*'
		while '*' in num:
			num.remove('*')
		if len(num) > 1:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	input()
	arr = list(map(int, input().split()))
	s = sum(arr)
	if s % 2 == 1:
		print('YES')
	else:
		even = sum(map(lambda x: x % 2 == 0, arr)) > 0
		odd = sum(map(lambda x: x % 2 == 1, arr)) > 0
		if even & odd:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	(odd, even) = (-1, -1)
	summa = 0
	for (ind, i) in enumerate(arr):
		if i % 2 == 0 and even == -1:
			even = ind
		elif i % 2 == 1 and odd == -1:
			odd = ind
		summa += i
	if summa % 2 == 1 or (even != -1 and odd != -1):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n,) = I()
	l = I()
	l.sort()
	fl = 1
	for i in range(n - 1):
		if l[i] == l[i + 1] or l[i] == l[i + 1] - 1:
			continue
		fl = 0
	print('YES' if fl else 'NO')


def fcnt():
	result = ''
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		for i in range(n - 1):
			if abs(a[i] - a[i + 1]) > 1:
				result += 'NO\n'
				break
		else:
			result += 'YES\n'
	print(result)
fcnt()


for i in range(int(input())):
	n = int(input())
	a = []
	a = list(map(int, input().strip().split()))[:n]
	a.sort()
	flag = 0
	for j in range(n - 1):
		if a[j + 1] - a[j] > 1:
			flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	k = list(map(int, input().split()))
	k = sorted(k)
	p = 1
	for j in range(len(k) - 1):
		if abs(k[j] - k[j + 1]) > 1:
			p = 0
	if p == 0:
		print('NO')
	else:
		print('YES')


import math

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

def btd(n):
	return int(n, 2)
t = int(input())
for k in range(t):
	n = int(input())
	a = list(map(int, input().split()))[:n]
	a.sort()
	count = 0
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			count += 1
	if count == n - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	(o, e) = (0, 0)
	for i in a:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if o == 0 or (e == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')


sets = int(input())
for _ in range(sets):
	count_numbers = input()
	numbers = set(map(int, input().split()))
	sorted_numbers = sorted(numbers)
	if len(sorted_numbers) == 1:
		print('YES')
	for index in range(len(sorted_numbers) - 1):
		if abs(sorted_numbers[index] - sorted_numbers[index + 1]) > 1:
			print('NO')
			break
		if index == len(sorted_numbers) - 1 - 1:
			print('YES')


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

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

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

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		n = I()
		arr = L()
		arr.sort()
		if n == 1:
			print('YES')
		else:
			flag = 1
			for i in range(1, n):
				if arr[i] - arr[i - 1] > 1:
					flag = 0
					break
			if flag:
				print('YES')
			else:
				print('NO')
main()


from collections import defaultdict, deque
from bisect import bisect_left as lower
import sys

def put():
	return map(int, input().split())
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(put())
	l.sort()
	prev = l[0]
	flag = 'YES'
	for i in l:
		if i - prev > 1:
			flag = 'NO'
			break
		prev = i
	print(flag)


T = int(input())
for i in range(T):
	N = int(input())
	A = [int(i) for i in input().split(' ')]
	if sum(A) % 2 != 0:
		print('YES')
	else:
		counter = 0
		for u in A:
			if u % 2 != 0:
				counter += 1
		if counter > 0 and counter < N:
			print('YES')
		else:
			print('NO')


t = int(input())

def func(mat, i, j, n):
	if i == n - 1 and j == n - 1:
		return mat[i][j]
	elif i > n - 1 or i < 0 or j > n - 1 or (j < 0):
		return 100000
	elif mat[i][j] == -1:
		return 100000
	else:
		k = mat[i][j]
		mat[i][j] = -1
		ans = k + min(func(mat, i + 1, j, n), func(mat, i - 1, j, n), func(mat, i, j + 1, n), func(mat, i, j - 1, n))
		print(i, j, ans)
		return ans
		mat[i][j] = k
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			f = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


import sys, collections, math

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

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

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	n = int(input())
	arr = get_array()
	arr.sort()
	s = len(arr)
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) <= 1:
			s -= 1
	if s == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	nums = list(map(int, input().split(' ')))
	countOdds = 0
	for i in nums:
		if i % 2 == 1:
			countOdds += 1
	if countOdds == 0:
		print('NO')
	elif countOdds == len(nums) and len(nums) % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
result = []
for _ in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	odd = 0
	for (i, num) in enumerate(nums):
		if num % 2 == 1:
			odd += 1
	if odd % 2 == 1:
		result.append('YES')
	elif n - odd > 0 and odd != 0:
		result.append('YES')
	else:
		result.append('NO')
for i in result:
	print(i)


for t in range(int(input())):
	(n, a) = (int(input()), list(map(int, input().split())))
	print('YES' if sum(a) % 2 or (any((ai % 2 for ai in a)) and any((1 - ai % 2 for ai in a))) else 'NO')


c = int(input())
for i in range(c):
	n = int(input())
	a = input().split(' ')
	arr = []
	for ele in a:
		arr.append(int(ele))
	odd = 0
	for ele1 in arr:
		if ele1 % 2 != 0:
			odd += 1
	even = len(arr) - odd
	if odd == 0:
		print('NO')
	elif even == 0:
		if len(arr) % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	a = [int(x) for x in inp().split()]
	a.sort()
	flag = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			print('No')
			flag = False
			break
	if flag == True:
		print('yes')


n = int(input())
for _ in range(n):
	k = int(input())
	t = list(map(int, input().split()))
	r = []
	t.sort()
	x = 0
	while x + 1 < len(t):
		p = t[x]
		if abs(t[x] - t[x + 1]) <= 1:
			t = t[x + 1:]
			x -= 1
		else:
			r.append(t[x])
		x += 1
	if len(t + r) == 1:
		print('YES')
	else:
		print('NO')


def call():
	n = int(input())
	l = [int(x) for x in input().split()]
	k = sum(l)
	oddCoN = 0
	evenCoN = 0
	if k % 2 != 0:
		print('YES')
		return
	else:
		for c in l:
			if c % 2 != 0:
				oddCoN += 1
			else:
				evenCoN += 1
			if oddCoN > 0 and evenCoN > 0:
				print('YES')
				return
	print('NO')
t = int(input())
for i in range(t):
	call()


t = int(input())
for i in range(0, t):
	flag = 0
	n = int(input())
	array = list(map(int, input().rsplit()))
	array.sort(reverse=False)
	for j in range(1, n):
		if array[j] - array[j - 1] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


s = int(input())
rs = []
for i in range(s):
	a = int(input())
	b = list(map(int, input().split()))
	(count, sm) = (0, 0)
	for val in b:
		if val % 2 != 0:
			count += 1
		sm += val
	if sm % 2 != 0:
		rs.append('YES')
	elif count > 0 and count < a:
		rs.append('YES')
	else:
		rs.append('NO')
for i in rs:
	print(i)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = list(map(int, input().split()))
		s1 = sum(arr)
		if s1 % 2 != 0:
			print('YES')
		else:
			odd = 0
			for i in arr:
				if i % 2 != 0:
					odd += 1
			if odd > 0 and odd != len(arr):
				print('YES')
			else:
				print('NO')
main()


t = int(input())
while t > 0:
	n = int(input())
	li = list(map(int, input().split(' ')))
	li = sorted(list(set(li)))
	if len(li) == 1:
		print('YES')
	else:
		current = li[0]
		ans = True
		for i in li[1:]:
			if i - current != 1:
				ans = False
				break
			current = i
		if ans:
			print('YES')
		else:
			print('NO')
	t -= 1


t = int(input())
for i in range(t):
	a = int(input())
	watch = input()
	isEven = False
	isOdd = False
	watch.split(' ')
	lists = []
	for val in watch.split(' '):
		lists.append(int(val))
	for i in lists:
		if i % 2 == 0:
			isEven = True
		else:
			isOdd = True
	if sum(lists) % 2 == 0:
		if isEven and isOdd:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
	lists.clear()


import math
t = int(input())
for i in range(t):
	n = int(input())
	li = []
	li[:n] = map(int, input().split())
	oddcount = 0
	evecount = 0
	flag = 0
	if len(li) == 1:
		if li[0] % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		for j in li:
			if j % 2 == 0:
				if oddcount != 0:
					print('YES')
					flag = 1
					break
				evecount += 1
			else:
				if evecount != 0:
					print('YES')
					flag = 1
					break
				oddcount += 1
		if flag == 0:
			if oddcount % 2 == 1:
				print('YES')
			else:
				print('NO')


n = int(input())
for i in range(0, n):
	l = int(input())
	l1 = list(map(int, input().split()))
	f = 0
	m = sorted(l1)
	for k in range(1, l):
		if m[k] - m[k - 1] > 1:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')


tc = int(input())
for _ in range(0, tc):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	flag = False
	for index in range(1, n):
		if a[index] - a[index - 1] > 1:
			flag = True
			break
	if flag:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = list(set(l))
	s.sort()
	for i in range(len(s)):
		if i == len(s) - 1:
			print('YES')
			break
		if abs(s[i] - s[i + 1]) > 1:
			print('NO')
			break


for i in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))[:n]
	li.sort()
	count = 0
	if n == 1:
		print('YES')
	else:
		for j in range(1, n):
			if li[j] - li[j - 1] <= 1:
				count = 0
			else:
				count = 1
				break
		if count == 0:
			print('YES')
		elif count == 1:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	if s % 2 == 1:
		print('YES')
	else:
		f = -1
		for i in range(n):
			for j in range(i + 1, n):
				if abs(a[i] - a[j]) % 2 == 1:
					print('YES')
					f = 0
					break
			if f == 0:
				break
		if f == -1:
			print('NO')


output = []
for i in range(int(input())):
	n = int(input())
	a_list = list(map(int, input().split()))
	a_list.sort()
	for j in range(n - 1):
		j = 0
		if a_list[j + 1] - a_list[j] == 1 or a_list[j + 1] - a_list[j] == 0:
			a_list.pop(j)
	if len(a_list) == 1:
		output.append('YES')
	else:
		output.append('NO')
print(*output, sep='\n')


t = int(input())
for i in range(t):
	n = int(input())
	inp = list(map(int, input().split()))
	inp = sorted(inp)
	fl = True
	for j in range(n - 1):
		if inp[j + 1] - inp[j] > 1:
			fl = False
			print('NO')
			break
	if fl:
		print('YES')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	for i in range(n - 1):
		x = a.pop()
		y = a.pop()
		if y - x < 2:
			a.append(y)
		else:
			print('NO')
			return
	print('YES')
for i in range(int(input())):
	solve()


def solution(main_array, num):
	lis_of_odd = []
	lis_of_even = []
	for i in main_array:
		if i % 2 == 1 or i == 1:
			lis_of_odd.append(i)
		else:
			lis_of_even.append(i)
	if num == 1:
		if len(lis_of_even) == 1:
			return 'NO'
		else:
			return 'YES'
	elif num % 2 == 0 and len(lis_of_odd) >= 1 and (len(lis_of_even) >= 1) or (num % 2 == 1 and len(lis_of_odd) >= 1):
		return 'YES'
	else:
		return 'NO'
t = int(input())
while t > 0:
	t -= 1
	num = int(input())
	string_of_numbers = input().split()
	main_array = [int(i) for i in string_of_numbers]
	print(solution(main_array, num))


t = int(input())
while t > 0:
	n = int(input())
	ar = list(map(int, input().split()))
	ec = oc = 0
	for i in ar:
		if i % 2 == 0:
			ec += 1
		else:
			oc += 1
	if oc < n and oc > 0:
		print('YES')
	elif oc == n and n % 2 != 0:
		print('YES')
	elif oc == 0:
		print('NO')
	else:
		print('NO')
	t = t - 1


T = int(input())
r = []
for k in range(T):
	s = int(input())
	l = list(map(int, input().split()))
	m = sorted(l)
	fl = 0
	for i in range(len(l)):
		if i != len(l) - 1:
			if m[i + 1] - m[i] > 1:
				fl = 1
				r.append('NO')
				break
	if fl == 0:
		r.append('YES')
for y in range(T):
	print(r[y])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(input().split())
	a = [int(i) for i in a]
	s = sum(a)
	if s % 2 == 1:
		print('YES')
	else:
		odd_count = 0
		even_count = 0
		for i in a:
			if i % 2 == 1:
				odd_count += 1
			if i % 2 == 0:
				even_count += 1
		if odd_count > 0:
			if even_count > 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		a.sort()
		s = 0
		for j in range(n - 1):
			if a[j + 1] - a[j] <= 1:
				s += 1
		if s > n - 2:
			print('YES')
		else:
			print('NO')


from collections import defaultdict as dd
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	d = dd(int)
	for i in a:
		d[i] = d.get(i, 0) + 1
	fg = 0
	a.sort()
	for i in a:
		if i - 1 in d and d[i - 1] > 0:
			d[i - 1] -= 1
		elif d[i] >= 2:
			d[i] -= 1
		elif i + 1 in d and d[i + 1] > 0:
			d[i] -= 1
		else:
			fg = 1
			break
	ct = 0
	for i in d.keys():
		ct += d[i]
	if ct > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	ans = 'YES'
	s = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	for i in range(s - 1):
		if abs(arr[i] - arr[i + 1]) > 1:
			ans = 'NO'
			break
	print(ans)


from collections import Counter
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	f = True
	l.sort()
	c = n
	for i in range(1, n):
		if l[i] - l[i - 1] <= 1:
			c -= 1
	if c == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	lis = list(map(int, input().split()))
	oddFlag = False
	evenFlag = False
	sum = 0
	n -= 1
	while n >= 0:
		if lis[n] % 2 == 0:
			evenFlag = True
		else:
			oddFlag = True
		sum += lis[n]
		n -= 1
	if sum % 2 != 0 or (evenFlag and oddFlag):
		print('Yes')
	else:
		print('No')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	A = sorted(map(int, input().split()))
	flag = True
	for i in range(1, n):
		if A[i] - A[i - 1] > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


import sys

def solve(a):
	a.sort()
	n = len(a)
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return False
	return True
t = int(input())
for _ in range(t):
	ln1 = next(sys.stdin)
	ln2 = next(sys.stdin)
	a = list(map(int, ln2.split()))
	print('YES' if solve(a) else 'NO')


def test(numbers):
	numbers = set(numbers)
	numbers = sorted(numbers)
	length = len(numbers)
	if numbers[-1] == numbers[0] + length - 1:
		return 'YES'
	return 'NO'
for i in range(int(input())):
	input()
	numbers = list(map(int, input().split(' ')))
	print(test(numbers))


t = int(input())
for s in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = 0
	for i in range(n - 1):
		if a[i] - a[i + 1] >= -1 and a[i] - a[i + 1] <= 1:
			flag = 0
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
tests = [(input(), list(map(int, input().split()))) for _ in range(n)]
ans = []
for _ in tests:
	i = 0
	test = _[1]
	test.sort()
	length = len(test) - 1
	while i < length:
		if test[i + 1] == test[i] + 1 or test[i + 1] == test[i]:
			test.remove(test[i])
			length -= 1
		else:
			i += 1
	if len(test) == 1:
		ans.append('YES')
	else:
		ans.append('NO')
[print(_) for _ in ans]


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ok = True
	for i in range(1, n):
		prev = a[i - 1]
		if a[i] == prev or a[i] == prev + 1:
			pass
		else:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	ch = input()
	L = [int(i) for i in ch.split()]
	L.sort()
	test = True
	for i in range(n - 1):
		if abs(L[i] - L[i + 1]) > 1:
			test = False
	if test:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('YES')
	elif len(set((x % 2 for x in arr))) == 2:
		print('YES')
	else:
		print('NO')


lst = []
t = int(input())
for j in range(0, t):
	n = int(input())
	input_string = input('')
	lst = input_string.split()
	for i in range(len(lst)):
		lst[i] = int(lst[i])
	lst.sort()
	flag = True
	for i in range(1, n):
		if lst[i] - lst[i - 1] > 1:
			flag = False
			print('NO')
			break
	if flag == True:
		print('YES')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
from collections import deque as que, defaultdict as vector
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
INF = float('inf')
testcase = inin()
for Case in range(testcase):
	n = inin()
	a = inar()
	a.sort()
	ans = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			ans = 'NO'
	print(ans)


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	lst = list(map(int, input().split()))
	s = sum(lst)
	if s % 2 != 0:
		print('YES')
	else:
		f = 0
		for i in range(len(lst)):
			if lst[i] % 2 == 0:
				f = 1
				break
		f2 = 0
		for i in range(len(lst)):
			if lst[i] % 2 != 0:
				f2 = 1
				break
		if f == 0 or f2 == 0:
			print('NO')
		else:
			print('YES')


from math import *
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	f = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			f = 1
			break
	if not f:
		print('YES')


import math
from collections import *
import sys
from functools import reduce

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

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0)
for _testcases_ in range(int(input())):
	n = int(input())
	li = get_list()
	sumOfList = sum(li)
	odd = even = False
	for i in li:
		if i & 1:
			odd = True
		else:
			even = True
	if sumOfList & 1:
		print('YES')
	elif odd and even:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	b = int(input())
	m = []
	r = input().split()
	for j in range(len(r)):
		m.append(int(r[j]))
	m.sort()
	k = 0
	for j in range(len(m) - 1):
		if abs(m[j] - m[j + 1]) > 1:
			k = 1
	if k == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	arr = [0] * 101
	for i in a:
		arr[i] = 1
	c = 0
	prev = 0
	for i in range(1, 101):
		if arr[i] == 1 and prev == 0:
			c += 1
			prev = 1
		if arr[i] == 0:
			prev = 0
	if c == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	s = sum(a)
	if s % 2 == 1:
		print('YES')
		continue
	s = False
	u = False
	for k in a:
		if k % 2 == 1:
			s = True
		else:
			u = True
	print('YES' if s and u else 'NO')


t = int(input())
for tt in range(t):
	n = int(input())
	l = [*map(int, input().split())]
	l.sort()
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


def solv():
	n = int(input())
	d = list(map(int, input().split()))
	if sum(d) % 2 == 1:
		print('YES')
		return
	s = list(set(d))
	cnt = [0, 0]
	for e in s:
		if e % 2 == 0:
			cnt[0] += 1
		else:
			cnt[1] += 1
	if cnt[0] > 0 and cnt[1] > 0:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solv()


for _ in range(int(input())):
	n = int(input())
	ls = [int(i) for i in input().split()]
	ls.sort()
	br = 0
	for i in range(n - 1):
		if ls[i + 1] - ls[i] > 1:
			br = 1
			print('NO')
			break
	if br == 0:
		print('YES')


import sys, math, heapq, copy
from collections import defaultdict, deque
from bisect import bisect_left, bisect_right
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = 0
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


import sys

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

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

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	arr = get_array()
	arr.sort()
	f = 0
	if n == 1:
		print('YES')
	else:
		for i in range(0, n - 1):
			if abs(arr[i] - arr[i + 1]) > 1:
				f = 1
				break
		if f == 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for t1 in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	num.sort()
	poss = 0
	if len(num) == 1:
		print('YES')
	else:
		for i in range(len(num)):
			if num[i] - num[i - 1] > 1:
				poss = 1
				break
		if poss == 1:
			print('NO')
		else:
			print('YES')


def check(a):
	count_n = 0
	count_c = 0
	if sum(a) % 2 == 1:
		return True
	for i in range(len(a)):
		if a[i] % 2 == 0:
			count_c += 1
		else:
			count_n += 1
	if count_n == 0:
		return False
	if count_n % 2 == 0:
		if count_c != 0:
			return True
		else:
			return False
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if check(a):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	pr = 0
	pr2 = 0
	n = int(input())
	a = [int(i) for i in input().split()]
	for i in a:
		if i % 2 == 1:
			pr = 1
			break
	for i in a:
		if i % 2 == 0:
			pr2 = 1
			break
	if n % 2 == 1 and pr == 1:
		print('YES')
	elif n % 2 == 1 and pr == 0:
		print('NO')
	elif n % 2 == 0 and pr2 == 0:
		print('NO')
	elif n % 2 == 0 and pr2 == 1 and (pr == 0):
		print('NO')
	elif n % 2 == 0 and pr2 == 1 and (pr == 1):
		print('YES')


def small(y, z):
	k = len(y)
	s = y[0]
	for j in range(0, z):
		if abs(y[j] - s) > 1:
			return 'NO'
		s = y[j]
	return 'YES'
for j in range(int(input())):
	z = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	print(small(ar, z))


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	flag = 1
	for i in range(1, n):
		if abs(l[i] - l[i - 1]) > 1:
			print('NO')
			flag = 0
			break
	if flag == 1 or n == 1:
		print('YES')


def check(arr, n):
	for j in range(n - 1):
		if arr[j] != arr[j + 1] - 1 and arr[j] != arr[j + 1]:
			return False
	return True
for i in range(int(input())):
	n = int(input())
	arr = sorted([int(elem) for elem in input().split()])
	if not check(arr, n):
		print('NO')
	else:
		print('YES')


t = int(input())
for tests in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = sorted(arr)
	flag = 0
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


def solve(aas):
	aas = sorted(aas)
	for (a, b) in zip(aas, aas[1:]):
		if b > a + 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	aas = [int(x) for x in input().split()]
	print(solve(aas))


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

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

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

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

def S():
	return input()

def main():
	n = I()
	ans = []
	for _ in range(n):
		k = I()
		l = LI()
		f = False
		hugo = l[0] % 2
		sm = 0
		for x in l:
			if hugo != x % 2:
				f = True
			sm += x
		if sm % 2 == 1:
			ans.append('YES')
		elif f:
			ans.append('YES')
		else:
			ans.append('NO')
	for x in ans:
		print(x)
main()


for i in range(int(input())):
	input()
	a = (*map(int, input().split()),)
	print(('NO', 'YES')[any(((i + j) % 2 for (i, j) in zip(a, a[1:]))) or sum(a) % 2])


t = int(input())
while t:
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	k = l[0]
	for i in range(n):
		if l[i] != k and l[i] != k + 1:
			print('NO')
			break
		if l[i] == k + 1:
			k += 1
	else:
		print('YES')
	t -= 1


t = int(input())
for T in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	if any([a[i + 1] - a[i] > 1 for i in range(n - 1)]):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = sorted(list(map(int, input().split())))
	flag = True
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			print('NO')
			flag = False
			break
	if flag:
		print('YES')


def merge(sorted_1, sorted_2):
	ans = []
	count = len(sorted_1) + len(sorted_2)
	while len(ans) < count:
		if len(sorted_2) == 0:
			for x in sorted_1:
				ans.append(x)
		elif len(sorted_1) == 0:
			for x in sorted_2:
				ans.append(x)
		elif sorted_1[0] <= sorted_2[0]:
			ans.append(sorted_1[0])
			sorted_1.pop(0)
		else:
			ans.append(sorted_2[0])
			sorted_2.pop(0)
	return ans

def merge_sort(array):
	ans = []
	for x in array:
		ans.append([x])
	while len(ans) > 1:
		for i in range(len(ans) // 2):
			ans[i] = merge(ans[i], ans[i + 1])
			ans.pop(i + 1)
	return ans[0]
for _ in range(int(input())):
	k = int(input())
	array = [int(x) for x in input().split(' ')]
	a = merge_sort(array)
	for _ in range(len(a) - 1):
		if k > 0:
			if a[1] - a[0] > 1:
				break
			else:
				a.pop(0)
				k -= 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ans = True
	for x in range(1, n):
		if arr[x] - arr[x - 1] > 1:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


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

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

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

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

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

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	n = II()
	aa = LI()
	aa.sort()
	for i in range(n - 1):
		if aa[i + 1] - aa[i] > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	fodd = False
	feven = False
	for i in A:
		if i % 2 == 0:
			feven = True
		else:
			fodd = True
		if fodd & feven:
			print('YES')
			break
	else:
		if fodd == True:
			if n % 2 != 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


tests = int(input())
for i in range(tests):
	n = int(input())
	a = [int(x) for x in input().split()]
	if len(a) == 1:
		print('YES')
		continue
	a.sort()
	s = sum(a)
	for i in range(1, len(a)):
		if a[i] - a[i - 1] <= 1:
			s -= a[i - 1]
			a[i - 1] = 0
	if a[i] == s:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	it = list(map(int, input().split()))
	s = [i for i in it if i % 2 == 1]
	if len(s) >= 1 and (len(s) < n or n % 2 == 1):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(n, arr) = (int(input()), list(map(int, input().split(' '))))
	if sum(arr) % 2:
		print('YES')
	else:
		cur = 0
		count = 0
		while cur < n:
			if arr[cur] % 2:
				count += 1
			cur += 1
		if count != 0 and count != n:
			print('YES')
		else:
			print('NO')


q = int(input())
for d in range(q):
	ast = int(input())
	lt = list(map(int, input().split(' ')))
	lt.sort()
	ans = 0
	for i in range(len(lt) - 1):
		a = lt[i]
		b = lt[i + 1]
		temp = abs(a - b)
		if temp > 1:
			ans = 1
			break
	if ans == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	input()
	l = list(map(int, input().split()))
	l.sort()
	t = False
	for (index, item) in enumerate(l):
		try:
			if l[index + 1] - item > 1:
				print('NO')
				t = True
				break
		except:
			pass
	if not t:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	a = [int(ele) for ele in input().split()]
	even = 0
	odd = 0
	for ele in a:
		if ele % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 0 and odd % 2 == 0:
		print('NO')
	elif odd == 0:
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	N = int(input())
	X = sorted(list(map(int, input().split())))
	print('NO' if any([i > 1 for i in [X[i] - X[i - 1] for i in range(1, N)]]) else 'YES')


for t in range(int(input())):
	n = int(input())
	F = [int(i) for i in input().split()]
	F.sort()
	c = 0
	d = 0
	for i in range(len(F) - 1):
		d = F[i + 1] - F[i]
		if d > c:
			c = d
	if c <= 1:
		print('YES')
	else:
		print('NO')


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

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

def si():
	return input()

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

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

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

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

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

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

def ntl(n):
	return [int(i) for i in str(n)]

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

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

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

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

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

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

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		x = 'YES'
		for i in range(1, len(a)):
			if a[i] - a[i - 1] > 1:
				x = 'NO'
		print(x)
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()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	rough = []
	p = 0
	a.sort()
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			k = abs(a[i] - a[i - 1])
			rough.append(k)
		for i in rough:
			if i > 1 or i < -1:
				p = 1
		if p == 0:
			print('YES')
		else:
			print('NO')


def solve(testcase):
	for (a, b) in zip(testcase, testcase[1:]):
		if b - a > 1:
			return False
	return True
t = int(input())
for _ in range(t):
	n = int(input())
	if solve(sorted(list(map(int, input().split())))):
		print('YES')
	else:
		print('NO')


testcases = int(input())
for k in range(testcases):
	numelements = int(input())
	listofnums = list(map(int, input().split()))
	odds = 0
	evens = 0
	for j in listofnums:
		if j % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds % 2 == 1:
		print('YES')
	elif odds % 2 == 0 and evens >= 1 and (odds != 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = input()
	nums = [int(x) for x in input().split()]
	nums.sort()
	i = 0
	j = 1
	while i + 1 < len(nums):
		if nums[j] > nums[i] + 1:
			break
		else:
			del nums[i]
	if len(nums) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	(i, j) = (0, 1)
	while len(arr) > 1:
		if abs(arr[i] - arr[j]) > 1:
			break
		elif abs(arr[i] - arr[j]) <= 1:
			del arr[i]
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	b = []
	i = 0
	ok = True
	while len(a) > 1:
		if abs(a[i] - a[i + 1]) <= 1:
			ind = a.index(min(a[i], a[i + 1]))
			a.pop(ind)
		else:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	c = sorted(a)
	x = 0
	for i in range(len(a) - 1):
		if abs(c[i + 1] - c[i]) <= 1:
			x += 1
	if n - x == 1:
		print('YES')
	else:
		print('NO')


k = int(input())
for i in range(k):
	n = int(input())
	a = [int(x) % 2 for x in input().split()]
	if n % 2 == 0 and all(a) or sum(a) == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	input()
	n = set(map(int, input().split()))
	print('YNEOS'[max(n) - min(n) >= len(n)::2])


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	if s % 2 != 0:
		print('YES')
	else:
		codd = 0
		ceven = 0
		for i in a:
			if i % 2 == 0:
				ceven += 1
			else:
				codd += 1
		if codd > 0 and ceven > 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	if sum(nums) % 2 == 1:
		print('YES')
		continue
	c = 0
	for i in nums:
		if i % 2 == 1:
			c += 1
	if c % 2 == 1 or (c != 0 and c % 2 == 0 and (c < len(nums))):
		print('YES')
	else:
		print('NO')


from collections import deque
from math import ceil, floor, sqrt, gcd

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

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

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

def si():
	return input()
t = 1
t = ii()
while t:
	t -= 1
	n = ii()
	a1 = li()
	c1 = 0
	c2 = 0
	f = 0
	for i in a1:
		if i % 2:
			c1 += 1
		else:
			c2 += 1
	if c1 == 0:
		f = 0
	elif c2 == 0:
		if c1 % 2:
			f = 1
	else:
		f = 1
	if f:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	x = int(input())
	y = list(map(int, input().split()))
	if sum(y) % 2 != 0:
		print('YES')
	else:
		even = False
		odd = False
		for i in y:
			if even and odd:
				break
			if i % 2 == 0:
				even = True
			else:
				odd = True
		if even and odd:
			print('YES')
		else:
			print('NO')


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n % 2 == 0:
		flag = 0
		for i in a:
			if i % 2 != 0:
				flag += 1
		if flag == 0:
			print('NO')
		elif flag == n:
			print('NO')
		else:
			print('YES')
	else:
		flag = 0
		for i in a:
			if i % 2 != 0:
				flag += 1
		if flag == 0:
			print('NO')
		else:
			print('YES')


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


n = int(input())
for i1 in range(0, n, 1):
	temp = int(input())
	oddNumber = 0
	evenNumber = 0
	inp = list(map(int, input().split()))
	for i2 in range(0, temp, 1):
		if inp[i2] % 2 == 0:
			evenNumber = 1
		else:
			oddNumber = 1
	if temp % 2 == 0 and evenNumber == 1 and (oddNumber == 1):
		print('YES')
	elif temp % 2 == 1 and oddNumber == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	p = len(a)
	(odd, even) = (0, 0)
	for i in range(p):
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == p:
		print('NO')
	elif p % 2 == 0 and odd == p:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = input()
	l = list(map(int, input().split()))
	l = sorted(l)
	c = 0
	for i in range(len(l) - 1):
		if l[i] - l[i + 1] == -1 or l[i] - l[i + 1] == 0:
			pass
		else:
			c = 1
			break
	if c == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = n
	if n == 1:
		print('YES')
		continue
	else:
		l.sort()
		for i in range(n - 1):
			if l[i + 1] - l[i] <= 1:
				m = m - 1
	if m == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	count1 = 0
	count2 = 0
	a = list(map(int, input().split()))
	for j in range(0, n):
		if a[j] % 2 == 0:
			count1 = count1 + 1
		else:
			count2 = count2 + 1
	if n % 2 != 0:
		if count2 > 0:
			print('YES')
		else:
			print('NO')
	elif count2 == n or count1 == n:
		print('NO')
	else:
		print('YES')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	l = list(map(int, sys.stdin.readline().split()))
	l.sort()
	count = 0
	for i in range(n - 1):
		if abs(-l[i] + l[i + 1]) > 1:
			count += 1
	if count < 1:
		print('YES')
	else:
		print('NO')


x = int(input())
for i in range(x):
	n = int(input())
	y = list(map(int, input().split()))
	s = sum(y)
	if s % 2 == 0:
		for k in range(n - 1):
			if y[k] % 2 == 0 and y[k + 1] % 2 == 1:
				y[k] = y[k + 1]
				break
			if y[k + 1] % 2 == 0 and y[k] % 2 == 1:
				y[k + 1] = y[k]
				break
		s = sum(y)
		if s % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


a = int(input())
while a != 0:
	l = int(input())
	arr = list(map(int, input().strip().split()))
	arr = sorted(arr)
	check = 'YES'
	for i in range(0, l - 1):
		if arr[i + 1] - arr[i] <= 1:
			continue
		else:
			check = 'NO'
			break
	print(check)
	a = a - 1


t = int(input())
while t:
	n = int(input())
	arr = [int(x) for x in input().split()]
	oddF = False
	evenF = False
	for i in arr:
		oddF += i % 2 == 1
		evenF += i % 2 == 0
		if evenF and oddF:
			break
	if n % 2 and oddF or (n % 2 == 0 and oddF and evenF):
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	audi = list(map(int, input().split()))
	odd_count = 0
	even_count = 0
	sum1 = 0
	for i in range(0, n):
		if audi[i] % 2 == 1:
			odd_count += 1
		if audi[i] % 2 == 0:
			even_count += 1
		sum1 += audi[i]
	if sum1 % 2 == 1 or (odd_count >= 1 and even_count >= 1):
		print('YES')
	else:
		print('NO')


def solve(n, a):
	deleted = [0] * n
	a.sort()
	for i in range(n):
		for j in range(n):
			if i != j:
				if abs(a[i] - a[j]) <= 1 and deleted[i] != 1 and (deleted[j] != 1):
					if a[i] < a[j]:
						deleted[i] = 1
					else:
						deleted[j] = 1
	count = 0
	for i in deleted:
		if i == 0:
			count += 1
	if count > 1:
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	solve(n, a)


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	odd = 0
	even = 0
	sumi = 0
	for x in a:
		sumi += x
		if x % 2 == 0:
			even += 1
		else:
			odd += 1
	if sumi % 2 == 1:
		print('YES')
	elif odd and even:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	even = [i for i in li if i % 2 == 0]
	odd = [i for i in li if i % 2 != 0]
	if len(even) == n:
		print('NO')
	elif len(odd) == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

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

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

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
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		n = iin()
		a = ain()
		a.sort()
		flag = 0
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				flag = 1
				break
		if flag == 1:
			print('NO')
		else:
			print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def re(j):
	if len(j) == 1:
		return 'YES'
	else:
		j.sort()
		for i in range(0, len(j) - 1):
			if abs(j[i] - j[i + 1]) <= 1:
				continue
			else:
				return 'NO'
		if i == len(j) - 2:
			return 'YES'
t = int(input())
l = []
for i in range(t):
	n = int(input())
	s = list(map(int, input().split()))
	l.append(s)
for j in l:
	print(re(j))


def Input(Str):
	List = Str.split(' ')
	for i in range(len(List)):
		List[i] = int(List[i])
	return List

def Possible(Str):
	List = Input(Str)
	Ordered = []
	Value = True
	Len = len(List)
	for i in range(Len):
		Ordered.append(min(List))
		List.remove(min(List))
	for i in range(1, len(Ordered)):
		if Ordered[i] - Ordered[i - 1] > 1:
			Value = False
	if Value == False:
		return 'NO'
	else:
		return 'YES'
Loops = int(input(''))
for i in range(Loops):
	input('')
	print(Possible(input('')))


sleep = int(input())
for i in range(sleep):
	biehterami = int(input())
	biarzeshshodan = list(map(int, input().split()))
	(dard, namardi) = (0, 0)
	for j in biarzeshshodan:
		if j % 2:
			namardi += 1
	if namardi % 2 == 0 and namardi == biehterami or namardi == 0:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
import bisect
import math
from collections import deque
mod = 10 ** 9 + 7

def st():
	return list(stdin.readline().strip())

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

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

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

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

def DFS(dictionary, vertex, visited):
	visited[vertex] = True
	stack = [vertex]
	print(vertex)
	while stack:
		a = stack.pop()
		for i in dictionary[a]:
			if not visited[i]:
				print(i)
				visited[i] = True
				stack.append(i)

def BFS(dictionary, vertex, visited):
	visited[vertex] = True
	q = deque()
	q.append(vertex)
	while q:
		a = q.popleft()
		for i in dictionary[a]:
			if not visited[i]:
				visited[i] = True
				q.append(i)
				print(i)

def soe(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	n = inp()
	l = li()
	c = 0
	l.sort()
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) > 1:
			c = 1
			break
	if c:
		print('NO')
	else:
		print('YES')
for _ in range(inp()):
	solve()


n = int(input())
for i in range(n):
	x = 0
	y = 0
	a = int(input())
	c = 0
	p = list(map(int, input().split()))
	for i in p:
		c += i
		if i % 2 == 0:
			x += 1
		else:
			y += 1
	if x > 0 and y > 0:
		print('YES')
	elif c % 2 == 0:
		print('NO')
	else:
		print('YES')


def oddcount(arr):
	c = 0
	for i in arr:
		if i % 2 != 0:
			c += 1
	return c

def evencount(arr):
	return len(arr) - oddcount(arr)

def check(arr):
	if sum(arr) % 2 != 0:
		return True
	if len(arr) % 2 != 0:
		if oddcount(arr) != 0:
			return True
	if len(arr) % 2 == 0:
		if oddcount(arr) > 0 and evencount(arr) > 0:
			return True
	return False
t = int(input())
while t:
	t = t - 1
	flag = 0
	n = int(input())
	arr = list(map(int, input().split()))
	if check(arr):
		print('Yes')
	else:
		print('No')


z = int(input())
for i in range(z):
	n = int(input())
	l = [int(i) for i in input().split()]
	l.sort()
	c = 0
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) > 1:
			c = c + 1
			break
	if c == 0:
		print('YES')
	else:
		print('NO')


for z in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	i = 0
	while len(a) > 1:
		if i + 1 == len(a):
			break
		if a[i + 1] - a[i] <= 1:
			a.remove(a[i])
		else:
			i = i + 1
	if len(a) <= 1:
		print('YES')
	else:
		print('NO')


def solve():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		i = 0
		end = 0
		while i < len(a) - 1:
			if a[i + 1] - a[i] <= 1:
				i += 1
			else:
				end = 1
				break
		if end:
			print('NO')
		else:
			print('YES')
solve()


from collections import Counter

def main():
	t = int(input())
	for i in range(t):
		a = int(input())
		arr = set(map(int, input().split()))
		arr = sorted(list(arr))
		v = [arr[i + 1] - arr[i] for i in range(len(arr) - 1)]
		res = set(v)
		if len(res) == 0 or (len(res) == 1 and 1 in res):
			print('YES')
		else:
			print('NO')
main()


n = int(input())
A = [[0] * 2 for i in range(n)]
for i in range(n):
	A[i][0] = int(input())
	A[i][1] = list(map(int, input().split()))

def check(A):
	for x in A:
		a = x[1]
		a.sort()
		lens = [a[i + 1] - a[i] for i in range(x[0] - 1) if a[i + 1] - a[i] > 1]
		if lens == []:
			print('YES')
		else:
			print('NO')
check(A)


n = int(input())
for i in range(n):
	d2 = False
	d1 = False
	c = int(input())
	a = list(map(int, input().split()))
	for i in range(c):
		if a[i] % 2 == 0:
			d2 = True
		elif a[i] % 2 != 0:
			d1 = True
		if d1 and d2:
			break
	if d1 and d2:
		print('YES')
	elif d1 and d2 != True:
		if c % 2 != 0:
			print('YES')
		else:
			print('NO')
	elif d2 and d1 != True:
		print('NO')


def ip():
	return int(input())

def sip():
	return input()

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

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

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst
t = ip()
while t:
	t -= 1
	n = ip()
	arr = lip()
	arr.sort()
	flag = 0
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
r = []
for i in range(n):
	c = 0
	ln = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for j in range(ln - 1):
		if l[j + 1] - l[j] > 1:
			r.append('NO')
			c = c + 1
			break
	if c == 0:
		r.append('YES')
for i in r:
	print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	(*a,) = map(int, input().split())
	for i in range(n):
		a[i] %= 2
	if sum(a) % 2:
		print('YES')
		continue
	if len(set(a)) == 1:
		print('NO')
		continue
	print('YES')


def number(x, N1):
	ok = True
	for i in range(N1 - 1):
		ok &= abs(x[i] - x[i + 1]) <= 1
	return 'Yes' if ok else 'NO'
N = int(input())
for i in range(N):
	N1 = int(input())
	x = list(map(int, input().split()))
	x.sort()
	print(number(x, N1))


t = int(input())
a = []
for i in range(t):
	qq = 0
	n = int(input())
	z = list(map(int, input().split()))
	for j in z:
		if j % 2 == 0:
			qq += 1
	cs = sum(z)
	if cs % 2:
		print('YES')
	elif qq > 0 and qq < n:
		print('YES')
	else:
		print('NO')


t = int(input())

def checkio(n, arr):
	if sum(arr) % 2 != 0:
		return 'YES'
	(flag1, flag2) = (False, False)
	for i in range(len(arr)):
		if flag1 == True and flag2 == True:
			break
		if arr[i] % 2 != 0 and flag1 == False:
			flag1 = True
		if arr[i] % 2 == 0 and flag2 == False:
			flag2 = True
	if flag1 == True and flag2 == True:
		return 'YES'
	return 'NO'
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	print(checkio(n, arr))


ans = []
for _ in range(int(input())):
	n = int(input())
	u = list(map(int, input().split()))
	u.sort()
	for i in range(1, n):
		if u[i] - u[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	s = sum(l)
	cnt = 0
	if s % 2 == 1:
		print('YES')
		continue
	for x in l:
		cnt += x % 2
	if cnt == 0 or cnt == n:
		print('NO')
	else:
		print('YES')


t = int(input(''))
sol = []
for i in range(t):
	n = int(input(''))
	a = input('').split(' ')
	odd = 0
	even = 0
	for a_l in a:
		if int(a_l) % 2 == 0:
			even += 1
		else:
			odd += 1
	if n % 2 != 0 and odd > 0:
		sol.append('YES')
	elif even > 0 and odd > 0:
		sol.append('YES')
	else:
		sol.append('NO')
for s in sol:
	print(s)


def fun(b, z):
	if len(b) == 1 or z == len(b):
		return b
	a = len(b)
	z = 1
	for i in range(a - 1):
		if b[i + 1] - b[i] == 1 or b[i + 1] - b[i] == 0:
			b.pop(i)
			return fun(b, z)
		else:
			z = z + 1
	return fun(b, z)
for _ in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	x = fun(b, 1)
	if len(x) == 1:
		print('YES')
	else:
		print('NO')


from collections import Counter
t = int(input())
count = 0
for _ in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	i = 1
	while i < len(a):
		if abs(a[i - 1] - a[i]) <= 1:
			a.remove(a[i - 1])
		else:
			i += 1
	if len(a) <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	list1 = list(map(int, input().split()))
	a = set(list1)
	print('YES' if max(a) - min(a) < len(a) else 'NO')


def main():
	tc = int(input())
	while tc > 0:
		tc = tc - 1
		n = int(input())
		l = map(int, input().split())
		l = sorted(l)
		max_dist = 0
		for i in range(1, n):
			max_dist = max(l[i] - l[i - 1], max_dist)
		if max_dist > 1:
			print('NO')
		else:
			print('YES')
main()


from __future__ import division, print_function
import os, sys
import math
import collections
from itertools import permutations
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

class my_dictionary(dict):

	def __init__(self):
		self = dict()

	def add(self, key, value):
		self[key] = value

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

def si():
	return input()

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

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

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

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

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

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

def ntl(n):
	return [int(i) for i in str(n)]

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

def binary_search(arr, low, high, x):
	if high >= low:
		mid = (high + low) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binary_search(arr, low, mid - 1, x)
		else:
			return binary_search(arr, mid + 1, high, x)
	else:
		return -1

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

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

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

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

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

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 16 - abs(x))[2:].zfill(16)
	else:
		return bin(x)[2:].zfill(16)

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	print(decimal)

def CountFrequency(my_list):
	freq = {}
	for item in my_list:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	return freq

def pos(a):
	b = [0] * len(a)
	c = sorted(a)
	for i in range(len(a)):
		for j in range(len(a)):
			if c[j] == a[i]:
				b[i] = j
				break
	return b

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n

def commonn(a, b, n):
	c = []
	for i in range(n):
		if a[i] == b[i]:
			c.append('-1')
		else:
			c.append(b[i])
	return c

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

def sumdigit(n):
	n = str(n)
	k = 0
	for i in range(len(n)):
		k += int(n[i])
	return k

def question(a, n):
	j = a
	for i in range(n):
		if a[i] == '1':
			j[i] = '0'
		else:
			j[i] = '1'
	j[0, n - 1].reverse()
	return j

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

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

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


test_case = int(input())
for i in range(test_case):
	len = int(input())
	flag = 0
	values = list(map(int, input().split(' ')))
	values.sort()
	for i in range(len - 1):
		if values[i + 1] - values[i] <= 1:
			flag = 0
		else:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	a = list(dict.fromkeys(a))
	if len(a) == 1:
		print('YES')
	elif a[len(a) - 1] - a[0] == len(a) - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for c in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	ne = 0
	no = 0
	for num in a:
		if num % 2:
			no += 1
		else:
			ne += 1
	yes = ne and no or s % 2
	if yes:
		print('YES')
	else:
		print('NO')


def solve(d, l):
	l.sort()
	if d == 1:
		print('YES')
	else:
		flag = 0
		for i in range(d - 1):
			diff = l[i + 1] - l[i]
			if diff > 1:
				flag = 1
				break
		if flag == 0:
			print('YES')
		else:
			print('NO')
n = int(input())
for i in range(n):
	d = int(input())
	l = list(map(int, input().split()))
	solve(d, l)


for _ in range(int(input())):
	(n, o, e) = (int(input()), 0, 0)
	for el in input().split():
		if int(el) % 2:
			o += 1
		else:
			e += 1
	if o == 0:
		print('NO')
	elif e == 0 and o % 2 == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
a = []

def f():
	for y in x:
		if y % 2:
			return False
	return True
for i in range(t):
	input()
	a.append(list(map(int, input().split())))
for x in a:
	p = True
	if f():
		print('NO')
		continue
	for y in x:
		if y % 2 == 0:
			print('YES')
			p = False
			break
	if p:
		print('YES' if len(x) % 2 else 'NO')


t = int(input())
while t > 0:
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	ok = True
	for i in range(len(arr)):
		ok = ok and arr[i] - arr[i - 1] <= 1
	if ok:
		print('YES')
	else:
		print('NO')
	t -= 1


testcase = int(input())
for _ in range(testcase):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
		continue
	a.sort()
	c = 0
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			print('NO')
			c = 1
			break
	if c == 0:
		print('YES')


import math
m = int(input())
for l in range(m):
	n = int(input())
	arr = list(map(int, input().split()))
	count = 0
	arr.sort()
	for i in range(n):
		for j in range(n):
			if arr[i] == 0:
				break
			if i != j and arr[j] != 0 and (abs(arr[i] - arr[j]) <= 1):
				if arr[i] < arr[j]:
					arr[i] = 0
				else:
					arr[j] = 0
	for i in range(n):
		if arr[i] == 0:
			count += 1
	if count >= n - 1:
		print('YES')
	else:
		print('NO')


for test in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	ans = 'YES'
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) > 1:
			ans = 'NO'
			break
	print(ans)


def solve(lst):
	for i in range(0, len(lst) - 1):
		if abs(lst[i] - lst[i + 1]) <= 1:
			lst[i] = ''
	temp = []
	for i in lst:
		if i != '':
			temp.append(i)
	temp.sort()
	return temp
for i in range(int(input())):
	n = int(input())
	lst = [int(i) for i in input().split()]
	l = len(lst)
	if l == 1:
		print('yes')
	else:
		lst.sort()
		ans = solve(lst)
		while l != len(ans):
			if len(ans) == 1:
				print('yes')
				break
			else:
				l = len(ans)
				ans = solve(ans)
		else:
			print('NO')
			continue


t = int(input())
while t != 0:
	n = int(input())
	l = []
	l = [int(i) for i in input().split()]
	l.sort()
	count = 1
	for _ in range(1, n):
		if l[_ - 1] == l[_] or l[_] - l[_ - 1] == 1:
			count += 1
	if count == n:
		print('YES')
	else:
		print('NO')
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	mod = False
	not_mod = False
	for el in a:
		if el % 2 == 0:
			mod = True
		else:
			not_mod = True
		if mod and not_mod:
			break
	if mod and not_mod or (n % 2 != 0 and not_mod):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	q = int(input())
	w = list(map(int, input().split()))
	l = 0
	for i in w:
		if i % 2 != 0:
			l += 1
	if l == 0:
		print('NO')
	elif q % 2 == 0 and l == q:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = sorted([int(j) for j in input().split()])
	ans = True
	for j in range(1, n):
		if a[j] - a[j - 1] > 1:
			ans = False
			break
	print('YES' if ans else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	m = []
	for k in range(0, len(arr)):
		m.append(arr[k])
	c = 0
	for j in range(0, len(arr) - 1):
		if arr[j + 1] - arr[j] <= 1:
			m.remove(arr[j])
			c += 1
	if len(m) == 1:
		print('YES')
	else:
		print('NO')


from sys import *
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	d = [0] * 101
	for i in a:
		d[i] = 1
	ch = 0
	flag = 1
	for i in range(1, 101):
		if d[i] == 1 and ch == 0:
			ch = 1
		elif d[i] == 1 and ch == 2:
			flag = 0
		elif d[i] == 0 and ch == 1:
			ch = 2
	if flag == 1:
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


for _ in range(int(input())):
	k = input()
	l = list(map(int, input().split(' ')))
	l.sort()
	if len(l) == 1:
		print('YES')
	else:
		flag = 0
		p = l[0]
		for i in range(1, len(l)):
			if l[i] - p != 1 and l[i] - p != 0:
				flag = 1
				break
			p = l[i]
		if flag == 1:
			print('NO')
		else:
			print('YES')


from sys import stdin

def solve(a: list) -> bool:
	(ans, _sum, odd, even) = (True, sum(a), 0, 0)
	if _sum % 2 == 0:
		for i in range(len(a)):
			odd = odd + 1 if a[i] % 2 != 0 else odd
			even = even + 1 if a[i] % 2 == 0 else even
		if odd == 0 or (odd % 2 == 0 and even == 0):
			ans = False
	return ans

def main() -> None:
	t = int(stdin.readline().strip())
	for _ in range(t):
		stdin.readline()
		a = [int(x) for x in stdin.readline().strip().split()]
		print('YES' if solve(a) else 'NO')
main()


a = int(input())
for i in range(a):
	even = 0
	odd = 0
	b = int(input())
	c = list(map(int, input().split()))
	for i in range(len(c)):
		if c[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd > 0 and even > 0:
		print('YES')
		continue
	if odd == 0:
		print('NO')
		continue
	if odd % 2 == 0:
		print('NO')
		continue
	if odd % 2 != 0:
		print('YES')
		continue


n = int(input())
for i in range(n):
	k = int(input())
	t = [int(x) for x in input().split()]
	answer = 0
	t.sort()
	if len(t) == 1:
		print('YES')
	else:
		for a in range(k - 1):
			if abs(t[a] - t[a + 1]) <= 1:
				answer += 1
		if answer == k - 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	ar = input().split(' ')
	norepes = 0
	for j in range(n):
		ar[j] = int(ar[j])
	for j in range(n):
		if not ar[j] in ar[0:j]:
			norepes += 1
	if max(ar) - min(ar) == norepes - 1:
		print('YES')
	else:
		print('NO')


t = input()
t = int(t)

def solve():
	n = input()
	n = int(n)
	lst = []
	a = input()
	a = a.split()
	for i in range(0, len(a)):
		lst.append(int(a[i]))
	lst.sort(reverse=True)
	ans = 'YES'
	for i in range(0, n - 1):
		if lst[i] - lst[i + 1] > 1:
			ans = 'NO'
			break
	print(ans)
while t > 0:
	solve()
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = 0
	c = 0
	for i in range(n):
		s += a[i]
		if a[i] & 1:
			c += 1
	if s % 2 != 0:
		print('YES')
	elif c == 0 or c == n:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	n1 = 0
	n2 = 0
	for j in range(n):
		if a[j] % 2 == 0:
			n2 += 1
		else:
			n1 += 1
	if n1 > 0 < n2:
		print('YES')
	elif n1 % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	lst = list(map(int, sys.stdin.readline().split()))
	lst.sort()
	ans = True
	for i in range(1, n):
		if lst[i - 1] != lst[i] and lst[i - 1] + 1 != lst[i]:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	count_even = 0
	count_odd = 0
	flag = False
	if n % 2 == 0:
		for a in arr:
			if a % 2 == 0:
				count_even += 1
			if a % 2 > 0:
				count_odd += 1
			if count_odd != 0 and count_even != 0:
				flag = True
				break
	else:
		for a in arr:
			if a % 2 > 0:
				count_odd += 1
				break
		if count_odd != 0:
			flag = True
	if flag is True:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	L = list(map(int, input().split()))
	L.sort()
	(i, f) = (0, 1)
	while i < len(L) - 1:
		if L[i] + 1 == L[i + 1] or L[i] == L[i + 1]:
			L.remove(L[i])
		else:
			f = 0
			break
	if f == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	length = int(input())
	numbers = list(map(int, input().split()))
	numbers.sort()
	for i in range(length - 1):
		if abs(numbers[i] - numbers[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


p = int(input())
while p:
	n = int(input())
	a = list(map(int, input().split()))
	s = set(a)
	s = sorted(s)
	s = list(s)
	m = max(a)
	x = 0
	for i in range(len(s) - 1):
		if s[i + 1] - s[i] != 1:
			x = 1
			break
	if x == 0:
		print('YES')
	else:
		print('NO')
	p -= 1


from collections import defaultdict, deque

def main():
	t = int(input())
	for c in range(t):
		n = int(input())
		ar = list(set(sorted(map(int, input().split(' ')))))
		ans = 'YES'
		for i in range(len(ar)):
			if i + 1 < len(ar):
				if ar[i + 1] - ar[i] > 1:
					ans = 'NO'
		print(ans)
main()


t = int(input())
for i in range(t):
	a = int(input())
	l = [int(i) for i in input().split()]
	i = 1
	ct = 0
	l = sorted(l)
	flag = 0
	for i in range(1, len(l)):
		if abs(l[i] - l[i - 1]) > 1:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	if sum(a) % 2 != 0:
		print('YES')
	else:
		res = 0
		for i in range(n):
			if a[i] % 2 == 0:
				for i in range(n):
					if a[i] % 2 == 1:
						res = 2
				break
			else:
				for i in range(n):
					if a[i] % 2 == 0:
						res = 2
				break
		if res == 2:
			print('YES')
		else:
			print('NO')


n = int(input())
answer = [0] * n
for i in range(n):
	k = int(input())
	a = sorted([int(j) for j in input().split()])
	s = 0
	if k == 1:
		answer[i] = 'YES'
	else:
		for j in range(k - 1):
			s = max(s, a[j + 1] - a[j])
		if s <= 1:
			answer[i] = 'YES'
		else:
			answer[i] = 'NO'
for i in range(n):
	print(answer[i])


t = int(input())
for i in range(t):
	arraylen = int(input())
	array = list(map(int, input().split()))
	array = sorted(array)
	if arraylen == 1:
		print('YES')
	else:
		prev = array[0]
		flag = 1
		for j in range(1, arraylen):
			if array[j] - prev > 1:
				flag = 0
				break
			prev = array[j]
		if flag:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().strip().split()))
	odd = 0
	even = 0
	for x in l:
		if x % 2:
			odd += 1
		else:
			even += 1
		if odd > 0 and even > 0:
			break
	if odd > 0 and even > 0:
		print('YES')
	elif odd == 0:
		print('NO')
	elif n % 2:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	x = [int(n) for n in input().split()]
	od = 0
	for i in x:
		if i & 1:
			od += 1
	ev = n - od
	if (od & 1 or (od % 2 == 0 and ev > 0)) and od != 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	b = int(input())
	a = list(map(int, input().split()))
	f = 0
	for j in range(b):
		if a[j] % 2 != 0:
			f += 1
	if f == 0:
		print('NO')
	elif f == b and f % 2 == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().strip().split()))[:a]
	count1 = 0
	count2 = 0
	for k in b:
		if k % 2 == 0:
			count2 += 1
		else:
			count1 += 1
	if count2 == a:
		print('NO')
	elif count1 == a and a % 2 == 0:
		print('NO')
	else:
		print('YES')


q = int(input())
for rwwe in range(q):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('YES')
	else:
		p = 0
		ni = 0
		for i in range(n):
			if l[i] % 2 == 0:
				p += 1
			else:
				ni += 1
		if p > 0 and ni > 0:
			print('YES')
		else:
			print('NO')


u = int(input())
li = []
for i in range(u):
	b = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(b - 1):
		if a[i + 1] - a[i] == 0 or a[i + 1] - a[i] == 1:
			continue
		else:
			li.append('NO')
			break
	else:
		li.append('YES')
for i in li:
	print(i)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
for _ in range(get_int()):
	n = get_int()
	lst = get_list()
	even = odd = 0
	for i in lst:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
	elif even == 0 and odd % 2 == 0:
		print('NO')
	else:
		print('YES')


import sys, os, io

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

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

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

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

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

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		n = ri()
		a = ria()
		a = deque(sorted(a))
		for i in range(n - 1):
			if a[1] - a[0] >= 0 and a[1] - a[0] <= 1:
				a.popleft()
		if len(a) == 1:
			print('YES')
		else:
			print('NO')
			i
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

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

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

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

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

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


from sys import stdin
n = int(stdin.readline().rstrip())
for _ in range(n):
	stdin.readline()
	nums = list(map(int, stdin.readline().rstrip().split(' ')))
	even = sum((1 for num in nums if num % 2 == 0))
	odd = len(nums) - even
	if sum(nums) % 2 == 1:
		print('YES')
	elif even > 0 and odd > 1:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	k = int(input())
	num = input()
	list = [int(x) for x in num.split()]
	l = []
	a = 0
	for i in list:
		if i not in l:
			l.append(i)
	if len(l) == 1:
		print('YES')
	else:
		for u in l:
			if u + 1 not in l or u - 1 not in l:
				a += 1
		if a > 2:
			print('NO')
		elif a == 2 and len(l) == 2 and (abs(l[0] - l[1]) != 1):
			print('NO')
		else:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(j) for j in input().split()]
	s = sum(arr)
	count = 0
	for x in arr:
		if x % 2 == 0:
			count += 1
	eve = count
	odd = n - count
	if s % 2 == 0 and odd == n:
		print('NO')
	elif s % 2 == 0 and eve == n:
		print('NO')
	else:
		print('YES')


def bubble_sort(a):
	i = len(a) - 1
	while i > 0:
		j = 0
		while j < i:
			if a[j] > a[j + 1]:
				(a[j + 1], a[j]) = (a[j], a[j + 1])
			j += 1
		i -= 1
	return a
t = int(input())
out = []
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	bubble_sort(arr)
	for j in range(len(arr) - 1):
		if arr[j + 1] - arr[j] <= 1:
			arr[j] = -1
	c = 0
	for k in arr:
		if k != -1:
			c += 1
	if c == 1:
		out.append('YES')
	else:
		out.append('NO')
for p in out:
	print(p)


def odd_sum(arr):
	if sum(arr) % 2 == 1:
		return 'YES'
	val = arr[0] % 2
	for i in arr[1:]:
		if i % 2 != val:
			return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	x = list(map(int, input().rstrip().split()))
	print(odd_sum(x))


t = int(input())

def f(a):
	a = sorted(a)
	otvet = 'YES'
	for i in range(len(a) - 1):
		if abs(a[i] - a[i + 1]) > 1:
			otvet = 'NO'
	return otvet
for i in range(1, t + 1):
	n = int(input())
	a = [int(x) for x in input().split()]
	print(f(a))


t = int(input())
ansLst = []
for tt in range(t):
	n = int(input())
	arr = input().split()
	for x in range(n):
		arr[x] = int(arr[x])
	if sum(arr) % 2 == 1:
		ansLst.append('YES')
		continue
	else:
		(even, odd) = (0, 0)
		for i in arr:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd == 0:
			ansLst.append('NO')
			continue
		elif even == 0 and n % 2 == 0:
			ansLst.append('NO')
			continue
		else:
			ansLst.append('YES')
for i in ansLst:
	print(i)


n = int(input())
for i in range(n):
	s = int(input())
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	flg = 0
	for j in a:
		if j % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd >= 1 and even >= 1:
		print('YES')
		continue
	if odd == 0:
		print('NO')
		continue
	if even == 0:
		if odd % 2 == 0:
			print('NO')
		else:
			print('YES')


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


import sys
t = int(input())
while t:
	n = int(input())
	arr = list(map(int, sys.stdin.readline().strip().split()))
	arr.sort()
	stack = []
	for i in range(n):
		if not stack:
			stack.append(arr[i])
		else:
			if arr[i] - stack[-1] <= 1:
				stack.pop()
			stack.append(arr[i])
	if len(stack) == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	arrList = list(map(int, input().split()))
	arrList.sort()
	flag = 1
	for i in range(1, len(arrList)):
		if arrList[i] - arrList[i - 1] <= 1:
			pass
		else:
			flag = 0
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	_ = int(input())
	a = [int(i) for i in input().split()]
	if sum(a) % 2 == 1:
		print('YES')
	else:
		x = list(filter(lambda x: x % 2 == 0, a))
		y = list(filter(lambda x: x % 2 == 1, a))
		if x and y:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	(os, es, s) = (set(), set(), 0)
	for i in l:
		if i % 2 == 0:
			es.add(i)
		else:
			os.add(i)
		s += i
	if s % 2 != 0:
		print('YES')
	else:
		o = len(os)
		e = len(es)
		if e == 0 or o == 0:
			print('NO')
		else:
			print('YES')


def small(ar, n):
	for i in range(1, n):
		if ar[i] - ar[i - 1] > 1:
			return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	print(small(ar, n))


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	uniques = set()
	maxi = mini = arr[0]
	for i in arr:
		uniques.add(i)
		if i < mini:
			mini = i
		elif i > maxi:
			maxi = i
	if len(uniques) == maxi - mini + 1:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import math
from collections import defaultdict

def arrinp():
	return [*map(int, stdin.readline().split(' '))]

def mulinp():
	return map(int, stdin.readline().split(' '))

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

def inp():
	return stdin.readline()

def solution():
	n = intinp()
	a = arrinp()
	a.sort()
	i = 0
	while i < n - 1:
		if a[i + 1] - a[i] < 2:
			i += 1
		else:
			break
	if i == n - 1:
		return 'YES'
	else:
		return 'NO'
testcases = 1
testcases = intinp()
for _ in range(testcases):
	print(solution())


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		chk = 0
		for x in range(n):
			if l[x] % 2 == 0:
				for y in range(n):
					if x != y:
						if l[y] % 2 != 0:
							chk = 1
				if chk == 1:
					break
		if chk == 1:
			print('YES')
		else:
			print('NO')


import sys
readline = lambda : sys.stdin.readline().strip('\n')
readgen = lambda : map(int, readline().split())
for _ in range(int(input())):
	n = int(input())
	a = sorted(readgen())
	flag = any([a[i + 1] - a[i] > 1 for i in range(len(a) - 1)])
	print('YNEOS'[flag::2])


a = int(input())
count_c = 0
array = []
for b in range(a):
	modulo = []
	count = input()
	c = input()
	d = c.split(' ')
	numbers = [int(x) for x in d]
	for a in numbers:
		mod = a % 2
		modulo.append(mod)
		total = sum(modulo)
	if total % 2 == 0:
		if total == len(modulo):
			array.append('NO')
		elif total == 0:
			array.append('NO')
		elif total != len(modulo) and total != 0:
			array.append('YES')
	elif total % 2 != 0:
		array.append('YES')
for a in array:
	print(a)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	one_odd_chk = False
	one_even_chk = False
	for i in a:
		if i % 2 != 0:
			one_odd_chk = True
		else:
			one_even_chk = True
	if n % 2 != 0:
		if one_odd_chk:
			print('YES')
		else:
			print('NO')
	elif one_odd_chk and one_even_chk:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	a = sorted(arr)
	k = True
	for i in range(1, n):
		k &= a[i] - a[i - 1] <= 1
	if k:
		print('YES')
	else:
		print('NO')


import sys

def sol():
	N = int(sys.stdin.readline())
	A = list(map(int, sys.stdin.readline().split()))
	odd_num = count_odd(A)
	even_num = N - odd_num
	if odd_num % 2 == 1 or (odd_num >= 1 and even_num >= 1):
		return 'YES'
	else:
		return 'NO'

def count_odd(A):
	cnt = 0
	for a in A:
		if a % 2 == 1:
			cnt += 1
	return cnt
for _ in range(int(sys.stdin.readline())):
	print(sol())


t = int(input())
for i in range(t):
	input()
	a = list(map(int, input().split()))
	a.sort()
	r = a[0]
	flag = True
	for c in a:
		if abs(c - r) <= 1:
			r = c
		else:
			flag = False
			print('No')
			break
	if flag:
		print('Yes')


for i in range(int(input())):
	_ = input()
	s = set(map(int, input().split()))
	if s == set(range(min(s), max(s) + 1, 1)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	x = int(input())
	a = [int(t) for t in input().split()]
	a.sort()
	ok = True
	for i in range(x - 1):
		if not abs(a[i] - a[i + 1]) <= 1:
			ok = False
	print('YES' if ok else 'NO')


def fun(l):
	if len(l) == 1:
		return 'YES'
	l.sort()
	count = 0
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) <= 1:
			count += 1
	if count == len(l) - 1:
		return 'YES'
	return 'NO'
n1 = int(input())
for _ in range(n1):
	n2 = int(input())
	l = []
	n3 = input()
	for j in range(n2):
		l.append(int(n3.split()[j]))
	print(fun(l))


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	even = 0
	ods = 0
	for j in range(n):
		if l[j] % 2 == 1:
			ods += 1
		else:
			even += 1
	if ods % 2 == 1 or (even != 0 and ods != 0):
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	v = [int(x) for x in input().split()]
	v.sort()
	chained = True
	prev = v[0]
	for elem in v[1:]:
		if abs(elem - prev) > 1:
			chained = False
			break
		else:
			prev = elem
	print(chained and 'YES' or 'NO')


t = int(input())
for j in range(t):
	s = []
	q = True
	a = int(input())
	if a > 1:
		b = input().split(' ')
		b = [int(x) for x in b]
		b.sort()
		for i in range(a - 1):
			if b[i + 1] - b[i] > 1:
				print('NO')
				q = False
				break
	else:
		b = int(input())
	if q:
		print('YES')


import sys
import os
from io import IOBase, BytesIO
import math
mod = 10 ** 9 + 7
pie = 3.1415926536

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def ain():
	return list(map(int, sin().split()))

def sin():
	return input().strip()

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

def read2DIntArray(row, col):
	arr = []
	for i in range(0, row):
		temp = list(map(int, sin().split()))
		arr.append(temp)
	return arr

def read2DCharArray(row, col):
	arr = []
	for i in range(0, row):
		temp = str(sin())
		arr.append(temp)
	return arr

def smallestNumber(n):
	lst = list(str(n))
	lst.sort()
	tmp = ''
	for (i, n) in enumerate(lst):
		if n != '0':
			tmp = lst.pop(i)
			break
	return str(tmp) + ''.join(lst)

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

def nCr(n, r):
	a = 1
	b = 1
	c = 1
	for i in range(1, n + 1):
		c *= i
	for i in range(1, r + 1):
		b *= i
	for i in range(1, n - r + 1):
		a *= i
	return c // (a * b)

def sieveOfEratosthenes1(N, s):
	prime = [False] * (N + 1)
	for i in range(2, N + 1, 2):
		s[i] = 2
	for i in range(3, N + 1, 2):
		if prime[i] == False:
			s[i] = i
			for j in range(i, int(N / i) + 1, 2):
				if prime[i * j] == False:
					prime[i * j] = True
					s[i * j] = i

def generatePrimeFactors(N):
	s = [0] * (N + 1)
	sieveOfEratosthenes1(N, s)
	curr = s[N]
	cnt = 1
	factors = []
	power = []
	while N > 1:
		N //= s[N]
		if curr == s[N]:
			cnt += 1
			continue
		factors.append(curr)
		power.append(cnt)
		curr = s[N]
		cnt = 1
	return (factors, power)

def main():
	for _ in range(int(sin())):
		n = int(sin())
		arr = ain()
		e = 0
		o = 0
		for num in arr:
			if num % 2 == 0:
				e += 1
			else:
				o += 1
		if n == 1:
			if arr[0] % 2 == 0:
				print('NO')
			else:
				print('YES')
		elif n % 2 != 0:
			if o > 0:
				print('YES')
			else:
				print('NO')
		elif e > 0 and o > 0:
			print('YES')
		else:
			print('NO')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
main()


t = int(input())
for _ in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	lst.sort()
	ans = 1
	for i in range(len(lst) - 1):
		if abs(lst[i] - lst[i + 1]) <= 1:
			continue
		else:
			ans = 0
			break
	if ans == 1:
		print('YES')
	else:
		print('NO')


for trt in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	even = 0
	odd = 0
	for t in l:
		if t % 2 == 0 and t != 0:
			even += 1
		elif t % 2 == 1:
			odd += 1
	if n % 2 == 0:
		if even >= 1 and odd >= 1:
			print('Yes')
		else:
			print('No')
	elif odd >= 1:
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	x = int(input())
	c = 0
	ar = list(map(int, input().split()))
	ar.sort()
	y = True
	for i in range(1, x):
		y &= ar[i] - ar[i - 1] <= 1
	if y:
		print('YES')
	else:
		print('NO')


t = int(input())
l1 = []
for i in range(t):
	n = int(input())
	l2 = [int(a) for a in input().split()]
	c = 0
	for j in range(len(l2)):
		if l2[j] % 2 != 0:
			c += 1
	if c % 2 == 0:
		if n != c and c != 0:
			l1.append('YES')
		else:
			l1.append('NO')
	else:
		l1.append('YES')
for i in range(t):
	print(l1[i])


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

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

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

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

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

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

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

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

def S():
	return input()

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

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

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

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

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		a = sorted(LI())
		c = 0
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				c += 1
		if c > 0:
			rr.append('NO')
		else:
			rr.append('YES')
	return JA(rr, '\n')
print(main())


t = int(input())
for __ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	pares = 0
	impares = 0
	for num in a:
		if num % 2 == 0:
			pares += 1
		else:
			impares += 1
	if impares % 2 != 0:
		print('YES')
	elif pares != 0 and (not impares == 0):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	cnte = 0
	cnto = 0
	for i in range(n):
		if a[i] % 2:
			cnto += 1
		else:
			cnte += 1
	if cnte >= 1 and cnto >= 1:
		print('YES')
	elif cnte == 0:
		if n % 2:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for ti in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	even = 0
	odd = 0
	for el in arr:
		if el % 2 is 0:
			even = even + 1
		else:
			odd = odd + 1
	if odd is 0 or (even is 0 and odd % 2 is 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for j in range(t):
	n = int(input())
	a = input().split()
	nb_pair = 0
	nb_impair = 0
	s = 0
	for element in a:
		if int(element) % 2 == 1:
			nb_impair += 1
		else:
			nb_pair += 1
		s += int(element)
	print()
	if s % 2 == 1:
		print('YES')
	elif nb_pair == 0 or nb_impair == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	found = False
	lst = sorted(lst)
	for j in range(n - 1):
		if abs(lst[j] - lst[j + 1]) > 1:
			found = True
			break
	print('NO') if found else print('YES')


t = int(input())
for you in range(t):
	n = int(input())
	l = input().split()
	li = [int(i) for i in l]
	li.sort()
	poss = 1
	for i in range(1, n):
		if li[i] - li[i - 1] > 1:
			poss = 0
			break
	if poss:
		print('YES')
	else:
		print('NO')


test = int(input())
for _ in range(test):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	p1 = 0
	p2 = 1
	while p2 < len(l) and p1 < len(l) and (len(l) > 1):
		if l[p2] - l[p1] <= 1:
			l.pop(p1)
			p1 -= 1
			p2 -= 1
			if p1 < 0:
				p1 = 0
				p2 = p1 + 1
		else:
			p2 += 1
			p1 += 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


import sys

def main():
	test_cases = int(sys.stdin.readline())
	for _ in range(test_cases):
		array_length = int(sys.stdin.readline())
		arr = [int(i) for i in sys.stdin.readline().split()]
		arr.sort()
		if any((abs(a - b) > 1 for (a, b) in zip(arr[:-1], arr[1:]))):
			print('NO')
		else:
			print('YES')
main()


test_cases = int(input())
for test_case in range(test_cases):
	array_len = int(input())
	array = list(map(int, input().split()))
	odd_elements = list()
	even_elements = list()
	for index in range(array_len):
		if array[index] % 2 != 0:
			odd_elements.append(index)
		else:
			even_elements.append(index)
	if len(odd_elements) % 2 != 0:
		print('YES')
		continue
	sum_can_be_odd = False
	for odd_element in odd_elements:
		for even_element in even_elements:
			if even_element > odd_element:
				sum_can_be_odd = True
				break
	if sum_can_be_odd:
		print('YES')
		continue
	sum_can_be_odd = False
	for even_element in even_elements:
		for odd_element in odd_elements:
			if odd_element > even_element:
				sum_can_be_odd = True
				break
	if sum_can_be_odd:
		print('YES')
	else:
		print('NO')


q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, input().split(' ')))
	ce = 0
	co = 0
	for i in a:
		if i % 2 == 0:
			ce = ce + 1
		else:
			co = co + 1
	if co == 0:
		print('NO')
	elif co % 2 != 0:
		print('YES')
	elif co == n:
		print('NO')
	else:
		print('YES')


import math

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 != 0:
		return 'YES'
	even = False
	odd = False
	k = 0
	for i in range(n):
		if a[i] % 2 == 0:
			even = True
		elif a[i] % 2 != 0:
			odd = True
			k += 1
	if even and odd:
		return 'YES'
	elif k == n and n % 2 != 0:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	print(solve())


n = int(input())
for _ in range(n):
	__ = int(input())
	ls = sorted(list(map(int, input().split())))
	while True:
		if len(ls) > 1:
			if ls[1] - ls[0] <= 1:
				del ls[0]
			else:
				break
		else:
			break
	if len(set(ls)) <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	d = [0] * 101
	for i in range(n):
		d[a[i]] += 1
	flag = 0
	for i in range(len(d)):
		if d[i] != 0:
			if flag == 2:
				print('NO')
				break
			else:
				flag = 1
		elif d[i] == 0:
			if flag == 1:
				flag = 2
	else:
		print('YES')


def solution(A, n):
	A = sorted(A)
	for (a, b) in zip(A, A[1:]):
		if abs(a - b) > 1:
			return False
	return True
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split(' ')))
	if solution(A, n):
		print('YES')
	else:
		print('NO')


n = int(input())

def arr(x1):
	x1 = sorted(x1)
	if len(x1) > 1:
		for j in range(0, len(x1) - 1):
			if abs(x1[j] - x1[j + 1]) <= 1:
				return arr(x1[1:])
			else:
				print('NO')
				break
	if len(x1) == 1:
		print('YES')
while n:
	m = int(input())
	l1 = []
	l1 = input().split(' ')
	l1 = [int(i) for i in l1]
	arr(l1)
	n = n - 1


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	sm = sum(a)
	flg = False
	if sm % 2:
		print('YES')
	elif a[0] % 2:
		for i in range(n):
			if not a[i] % 2:
				print('YES')
				flg = True
				break
		if not flg:
			print('NO')
	else:
		for i in range(n):
			if a[i] % 2:
				print('YES')
				flg = True
				break
		if not flg:
			print('NO')


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		evenCount = 0
		oddCount = 0
		for j in range(n):
			if a[j] % 2 == 0:
				evenCount += 1
			else:
				oddCount += 1
		ans = 'NO'
		if oddCount != 0:
			if oddCount % 2 != 0:
				ans = 'YES'
			elif evenCount != 0:
				ans = 'YES'
		print(ans)
main()


tests = int(input())
for _ in range(tests):
	n = int(input())
	num = list(map(int, input().split()))
	num.sort()
	for i in range(1, n):
		if num[i] - num[i - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


for t in range(int(input())):
	n = int(input())
	a = [int(j) for j in input().split()]
	z = 0
	a.sort()
	for i in range(1, len(a)):
		if abs(a[i] - a[i - 1]) > 1:
			z = 1
			break
	if z == 0:
		print('YES')
		continue
	print('NO')


n = int(input())
for i in range(n):
	num = int(input())
	l = input().split()
	s = set(l)
	l2 = list(s)
	l2 = [int(x) for x in l2]
	l2.sort()
	if l2[-1] - l2[0] >= len(l2):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = list(set(arr))
	arr = sorted(arr)
	for i in range(1, len(arr)):
		if abs(arr[i] - arr[i - 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


for case in range(int(input())):
	n = int(input())
	a = sorted(map(int, input().split()))
	pre = -1
	ans = 'YES'
	for x in a:
		if pre != -1 and x - pre > 1:
			ans = 'NO'
		pre = x
	print(ans)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('YES')
	elif all((ele % 2 == 0 for ele in arr)):
		print('NO')
	elif all((ele % 2 == 1 for ele in arr)) and len(arr) % 2 == 0:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	n1 = int(input())
	arr = [int(n) for n in input().split()]
	if n1 == 1:
		print('YES')
		continue
	notone = True
	arr.sort()
	for i in range(1, n1):
		if arr[i] - arr[i - 1] > 1:
			print('NO')
			notone = False
			break
	if notone:
		print('YES')


import random
from bisect import bisect_left, bisect_right
from typing import List
import collections
import bisect
import itertools
import functools
from fractions import gcd
import heapq
from math import ceil, sqrt, floor
import sys
sys.setrecursionlimit(50000)
import collections
from collections import defaultdict, deque
import collections
import bisect
from collections import defaultdict, deque
import collections
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	odds = sum((1 for v in A if v % 2 == 1))
	evens = sum((1 for v in A if v % 2 == 0))
	if odds % 2 == 1 or (odds > 0 and evens > 0):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	cnt = 0
	for i in range(a - 1):
		if b[i + 1] - b[i] <= 1:
			cnt += 1
		else:
			print('NO')
			b.clear()
			break
	if cnt == a - 1:
		print('YES')
		b.clear()


arr = []
test_cases = int(input(''))
for x in range(test_cases):
	input('')
	a = []
	a = list(map(int, input().split()))
	arr.append(a)
for i in range(test_cases):
	leng = len(arr[i])
	summ = 0
	even_count = 0
	odd_count = 0
	for j in range(leng):
		if arr[i][j] % 2 == 0:
			even_count += 1
		else:
			odd_count += 1
	if odd_count == 0:
		print('No')
	elif leng % 2 == 0 and even_count == 0:
		print('NO')
	else:
		print('YES')


import sys

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

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

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

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

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

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

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

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

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	A = LIST()
	A.sort()
	for i in range(N - 1):
		if A[i + 1] - A[i] > 1:
			NO()
			break
	else:
		YES()


n = int(input())
for i in range(n):
	k = int(input())
	stack = list(map(int, input().split()))
	stack.sort()
	for i in range(k - 1):
		if k == 1:
			break
		if abs(stack[i + 1] - stack[i]) > 1:
			print('NO')
			break
	else:
		print('YES')


n = int(input())
for i in range(1, n + 1):
	k = int(input())
	arr = list(map(int, input().split()))
	if k == 1:
		print('Yes')
		continue
	arr = sorted(arr)
	flag = 0
	for j in range(1, k):
		if arr[j] - arr[j - 1] > 1:
			print('No')
			flag = 1
			break
	if flag == 0:
		print('Yes')


n_test = int(input())
for _ in range(n_test):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = 'YES'
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			ans = 'NO'
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	par = 0
	impar = 0
	if len(a) % 2 == 0:
		for i in a:
			if i % 2 == 1:
				impar = 1
			if i % 2 == 0:
				par = 1
		if par + impar == 2:
			print('YES')
		else:
			print('NO')
	else:
		for i in a:
			if i % 2 == 1:
				impar = 1
		if impar == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
res = [1 for i in range(t)]
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	if len(a) == 1:
		res[i] = 1
	else:
		for j in range(1, n):
			if abs(a[j] - a[j - 1]) > 1:
				res[i] = res[i] * 0
			else:
				res[i] = res[i] * 1
for i in range(t):
	if res[i] == 1:
		print('YES')
	else:
		print('NO')


t = eval(input())
while t > 0:
	t = t - 1
	n = eval(input())
	x = input()
	x.strip()
	a = x.split(' ')
	le = 0
	chan = 0
	sum = 0
	for x in a:
		if eval(x) % 2:
			le = 1
		else:
			chan = 1
		sum = sum + eval(x)
	if sum % 2:
		print('YES')
	elif sum % 2 == 0 and le and chan:
		print('YES')
	else:
		print('NO')


T = int(input())
while T != 0:
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	a.sort()
	possible = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			possible = False
			break
	if possible:
		print('YES')
	else:
		print('NO')
	T -= 1


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	a = int(sys.stdin.readline())
	b = list(map(int, sys.stdin.readline().split()))
	(odd, even) = (False, False)
	for i in b:
		if i % 2 == 0:
			even = True
		else:
			odd = True
	if odd == True and even == True or sum(b) % 2 == 1:
		print('YES')
	else:
		print('NO')


def sol(nums):
	for i in range(len(nums) - 1):
		if 1 < nums[i + 1] - nums[i]:
			return 'NO'
	return 'YES'
cases = input()
for i in range(int(cases)):
	input()
	nums = [int(x) for x in input().split()]
	print(sol(sorted(nums)))


z = int(input())
for y in range(z):
	x = int(input())
	ans = 'YES'
	arr = list(map(int, input().split()))
	arr.sort()
	while len(arr) > 1:
		if arr[1] - arr[0] <= 1:
			arr.remove(arr[0])
		else:
			ans = 'NO'
			break
	print(ans)


for p in range(int(input())):
	k = int(input())
	l = list(map(int, input().split()))
	l.sort()
	j = 0
	while j < k and len(l) != 1:
		for i in range(k - 1):
			if abs(l[i:i + 2][0] - l[i:i + 2][1]) <= 1:
				l.remove(min(l[i:i + 2]))
				j = 0
				k -= 1
				break
			else:
				j += 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


for t in range(int(int(input()))):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	da = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1 and da:
			da = False
			break
	if da:
		print('YES')
	else:
		print('NO')


t = int(input())
res = []
for i in range(t):
	n = int(input())
	sonlar = []
	s = input().split()
	for j in s:
		sonlar.append(int(j))
	sonlar.sort()
	shart = True
	for j in range(n - 1):
		if sonlar[j + 1] - sonlar[j] > 1:
			res.append('NO')
			shart = False
			break
	if shart:
		res.append('YES')
for i in res:
	print(i)


a = []
suma = 0
cnt1 = 0
cnt2 = 0
n = int(input())
for i in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	for j in range(m):
		if a[j] % 2 == 0:
			cnt1 += 1
		else:
			cnt2 += 1
		suma += a[j]
	if suma % 2 == 1:
		print('YES')
	elif cnt1 != 0 and cnt2 != 0:
		print('YES')
	elif cnt2 == 0:
		print('NO')
	else:
		print('NO')
	suma = 0
	cnt1 = 0
	cnt2 = 0
	a.clear()


def can_form(n, a):
	if n == 1:
		return 'YES'
	l = sorted(a)
	d = []
	for i in range(n - 1):
		d.append(l[i + 1] - l[i])
	m = max(d)
	if m <= 1:
		return 'YES'
	else:
		return 'NO'
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(can_form(n, a))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if len(a) == 1:
		print('YES')
	else:
		i = 0
		j = 1
		c = True
		while len(a) > 1:
			if a[j] - a[i] <= 1:
				a.remove(a[i])
			else:
				c = False
				break
		if c is False:
			print('NO')
		else:
			print('YES')


test = int(input())
for t in range(test):
	arrLength = int(input())
	arr = input().split(' ')
	for i in range(0, len(arr)):
		arr[i] = int(arr[i])
	arr.sort()
	i = 0
	while i < len(arr) - 1:
		arrLength = len(arr)
		for j in range(i + 1, len(arr)):
			if abs(arr[i] - arr[j]) <= 1:
				arr.pop(i)
				break
		if arrLength == len(arr):
			i += 1
	if len(arr) == 1:
		print('YES')
	else:
		print('NO')


test_case_number = int(input())
for _ in range(test_case_number):
	liste_length = int(input())
	liste = sorted([int(number) for number in input().split()])
	diff = [a - b for (a, b) in zip(liste[1:], liste[:-1])]
	if liste_length == 1 or max(diff) < 2:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	rL = int(input())
	List = list(map(int, input().split()))
	List.sort()
	a = 'YES'
	for j in range(rL - 1):
		if List[j + 1] - List[j] > 1:
			a = 'NO'
			break
	print(a)


n = int(input())
for x in range(n):
	m = int(input())
	odd = False
	even = False
	l = list(map(int, input().split()))
	s = sum(l)
	if s % 2 == 1:
		print('YES')
		continue
	else:
		for y in l:
			if y % 2 == 0:
				even = True
			else:
				odd = True
	if even == True and odd == False or (odd == True and even == False):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	p = 0
	if n == 1:
		print('YES')
	else:
		for i in range(len(li) - 1):
			if li[i + 1] - li[i] == 1 or li[i + 1] - li[i] == 0:
				c = 1
			else:
				p = 1
				break
		if p == 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().strip().split()[:n]))
	c = 0
	l.sort()
	while c != n - 1:
		for i in range(1, len(l)):
			if abs(l[i - 1] - l[i]) <= 1:
				a = min(l[i - 1], l[i])
				l.remove(a)
				break
		c = c + 1
	if len(l) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(i) for i in input().split()]
	n0 = 0
	n1 = 0
	for i in arr:
		if i % 2 == 0:
			n0 += 1
		else:
			n1 += 1
	if n1 % 2 != 0:
		print('YES')
	elif n1 != n and n1 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	numOdds = 0
	for num in nums:
		if num % 2 == 1:
			numOdds += 1
	if numOdds % 2 == 1:
		print('YES')
	elif numOdds == 0:
		print('NO')
	elif numOdds == n:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	array = list(map(int, input().split()))
	if sum(array) % 2:
		print('YES')
	else:
		eve = odd = 0
		for num in array:
			if num % 2:
				odd += 1
			else:
				eve += 1
		print('NO' if eve == n or odd == n else 'YES')


def find(l, li):
	li.sort()
	if l == 1:
		return 1
	stack = []
	for i in li:
		if len(stack) == 0:
			stack.append(i)
		elif stack[-1] == i:
			stack.pop()
			stack.append(i)
		elif abs(stack[-1] - i) == 1:
			stack.pop()
			stack.append(i)
		else:
			stack.append(i)
	if len(stack) == 1:
		return 1
	else:
		return 0
n = int(input())
for i in range(0, n):
	l = int(input())
	li = list(map(int, input().split()))
	if find(l, li):
		print('YES')
	else:
		print('NO')


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

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

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

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
t = inn()
while t:
	t -= 1
	n = inn()
	a = arr()
	a.sort()
	flag = 0
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


for _a in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	lis = sorted(lis)
	res = True
	while len(lis) > 1:
		if abs(lis[1] - lis[0]) > 1:
			res = False
			break
		else:
			if lis[1] >= lis[0]:
				lis = lis[1:]
			else:
				lis = lis[:1] + lis[2:]
			lis = sorted(lis)
	if res == True:
		print('YES')
	else:
		print('NO')


def test(a, n):
	flag = False
	for i in a:
		if i % 2 == 1:
			flag = True
	if flag == False:
		return flag
	if n % 2 == 1:
		return True
	else:
		for i in a:
			if i % 2 == 0:
				return True
	return False
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	if test(a, n):
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for case in range(t):
		n = int(input())
		a = [int(x) for x in input().split()]
		a = sorted(a)
		flag = True
		while len(a) > 1:
			if a[1] - a[0] > 1:
				print('NO')
				flag = False
				break
			else:
				a.pop(0)
		if flag:
			print('YES')
main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flag = 0
	i = 0
	while i != len(a) - 1 and flag < 1:
		if abs(a[i] - a[i + 1]) <= 1:
			a.pop(0)
		else:
			i += 1
			flag += 1
	if flag >= 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		arr = sorted(arr)
		(i, f) = (0, True)
		while i < n - 1:
			if arr[i + 1] - arr[i] > 1:
				f = False
				break
			i += 1
		print('YES' if f == True else 'NO')


def solve(N, len_even, len_odd):
	if len_even > 0 and len_odd > 0:
		return True
	if len_even == 0 and len_odd % 2 == 1:
		return True
	return False
T = int(input())
for t in range(0, T, 1):
	N = int(input())
	evens = []
	odds = []
	A = input().split(' ')
	A = [int(A[i]) for i in range(N)]
	for i in range(0, N, 1):
		if A[i] % 2 == 0:
			evens.append(A[i])
		else:
			odds.append(A[i])
	print('YES' if solve(N, len(evens), len(odds)) else 'NO')


for w in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	c = 0
	for i in x:
		if i % 2:
			c += 1
	if c % 2:
		print('YES')
	elif n > c and c > 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	odd_cnt = 0
	evn_cnt = 0
	for sx in arr:
		if sx % 2 != 0:
			odd_cnt += 1
			continue
		if sx % 2 == 0:
			evn_cnt += 1
			continue
		if evn_cnt > 0 and odd_cnt > 0:
			break
	if evn_cnt > 0 and odd_cnt > 0:
		print('YES')
	elif evn_cnt == 0 and n % 2 == 0:
		print('NO')
	elif evn_cnt == 0 and n % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	N = list(map(int, input().split()))
	N = sorted(N)
	K = N.copy()
	for k in range(n):
		if len(K) != 1:
			if abs(N[k] - N[k + 1]) <= 1:
				K.remove(N[k])
			elif abs(N[k] - N[k + 1]) > 1:
				print('No')
				break
		else:
			print('YES')


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations

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

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

def Lstr():
	return list(sys.stdin.readline().strip())

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

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

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

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.add(i)
	if n > 1:
		factors.add(n)
	print(factors)
	if len(factors) == 2:
		return True
	else:
		return False

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

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

def minimum_integer_not_in_list(a):
	b = max(a)
	if b < 1:
		return 1
	A = set(a)
	B = set(range(1, b + 1))
	D = B - A
	if len(D) == 0:
		return b + 1
	else:
		return min(D)

def solution():
	for i in range(Int()):
		n = Int()
		a = List()
		(od, ev) = (0, 0)
		for i in range(n):
			if a[i] % 2 == 1:
				od += 1
			else:
				ev += 1
		if od == 0 or (ev == 0 and n % 2 == 0):
			print('NO')
		else:
			print('YES')
solution()


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	i = 0
	while i < n - 1:
		if abs(arr[i] - arr[i + 1]) in (0, 1):
			arr.remove(min(arr[i], arr[i + 1]))
			n -= 1
		else:
			i += 1
	if n == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = input()
	a = list(map(int, a.split()))
	sum_a = sum(a)
	if sum_a % 2 != 0:
		print('YES')
	else:
		b = set(a)
		non_repeat = len(b)
		if non_repeat == 1:
			print('NO')
		else:
			oddCount = 0
			evenCount = 0
			for j in range(n):
				if a[j] % 2 == 0:
					evenCount += 1
				else:
					oddCount += 1
			if evenCount == n or oddCount == n:
				print('NO')
			else:
				print('YES')


tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = 1
	arr.sort()
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) > 1:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	nech = 0
	ch = 0
	sp = list(map(int, input().split()))
	for j in sp:
		if j % 2 == 1:
			nech = 1
			if ch == 1:
				break
		else:
			ch = 1
			if nech == 1:
				break
	if ch == 1 == nech:
		print('YES')
	elif nech == 0:
		print('NO')
	elif nech == 1 and ch == 0 and (n % 2 == 0):
		print('NO')
	else:
		print('YES')


def solve():
	N = int(input())
	A = sorted(list(map(int, input().split())))
	for i in range(N):
		if A[i] - A[i - 1] > 1:
			print('NO')
			return
	print('YES')
	return
Testcase = 1
Testcase = int(input())
for _ in range(Testcase):
	solve()


import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase

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

def main():
	for _ in range(int(input())):
		n = int(input())
		ar = inpt()
		ar = list(set(ar))
		ar.sort()
		ok = True
		for i in range(len(ar) - 1):
			if ar[i + 1] - ar[i] > 1:
				ok = False
				break
		if ok:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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


for _ in range(int(input())):
	N = int(input())
	C = sum(list(map(lambda x: int(x) % 2 != 0, input().split())))
	print('YES' if 0 < C < N and N % 2 == 0 or (0 < C <= N and N % 2 != 0) else 'NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr = sorted(arr, reverse=True)
	if n == 1:
		print('YES')
	else:
		f = all((arr[i] - arr[i + 1] <= 1 for i in range(n - 1)))
		if f:
			print('YES')
		else:
			print('NO')


def can(A, n):
	inf = 9999999999999999999999999
	for i in range(n):
		for j in range(n):
			if A[i] < inf and A[j] < inf:
				if i != j and (A[i] - A[j] == 1 or A[i] == A[j]):
					A[j] += inf
				elif i != j and (A[j] - A[i] == 1 or A[j] == A[i]):
					A[i] += inf
	A.sort()
	if len(A) != 1 and A[1] < inf:
		x = 'NO'
	else:
		x = 'YES'
	return x
t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	print(can(A, n))


n = int(input())
for _ in range(n):
	m = int(input())
	a = list(map(int, input().split()))
	a1 = sum(a)
	k = 0
	x = 1
	if a1 % 2 != 0:
		print('YES')
		x = 0
	for i in range(0, len(a) - 1):
		for j in range(i + 1, len(a)):
			if (a[i] + a[j]) % 2 != 0:
				k += 1
		for j in range(i - 1, -1, -1):
			if (a[i] + a[j]) % 2 != 0:
				k += 1
	if k != 0 and x == 1:
		print('YES')
	elif k == 0 and x == 1:
		print('NO')


testcases = int(input())
for i in range(testcases):
	n = int(input())
	l = list(map(int, input().split()))
	if len(l) == 1:
		print('YES')
		continue
	l.sort()
	for i in range(len(l) - 1):
		if abs(l[i] - l[i + 1]) == 1 or abs(l[i] - l[i + 1]) == 0:
			continue
		else:
			print('NO')
			break
	else:
		print('YES')


n = int(input())
for i in range(n):
	x = int(input())
	l = list(map(int, input().split()))
	if x == 1:
		print('Yes')
	else:
		l.sort()
		for j in range(x - 1):
			if abs(l[j] - l[j + 1]) > 1:
				print('No')
				break
		else:
			print('Yes')


for _ in range(int(input())):
	input()
	l = list(map(int, input().split()))
	l.sort()
	b = True
	for i in range(1, len(l)):
		if abs(l[i] - l[i - 1]) > 1:
			b = False
			break
	print('YES') if b else print('NO')


from sys import stdin
r = stdin.readline

def solve(arr):
	s = sum(arr)
	n = len(arr)
	if s % 2 == 1:
		return 'YES'
	else:
		all_odd = True
		for i in range(n):
			if arr[i] % 2 == 0:
				all_odd = False
				break
		if all_odd:
			return 'NO'
		all_even = True
		for i in range(n):
			if arr[i] % 2 == 1:
				all_even = False
				break
		if all_even:
			return 'NO'
		else:
			return 'YES'

def main():
	cases = int(r())
	for case in range(cases):
		n = int(r())
		arr = list(map(int, r().strip().split()))
		print(solve(arr))
main()


import sys, heapq

def get_ints():
	return map(int, I().split())

def get_list():
	return list(map(int, I().split()))

def I():
	return sys.stdin.readline().strip()
for t in range(int(I())):
	n = int(I())
	L = sorted(get_list())
	flag = True
	for i in range(n - 1):
		if abs(L[i] - L[i + 1]) <= 1:
			continue
		else:
			flag = False
			break
	print('YES' if flag else 'NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	x = 0
	y = 0
	s = 0
	for j in range(n):
		s = s + a[j]
		if a[j] % 2 == 0:
			x = x + 1
		else:
			y = y + 1
	if s % 2 == 1:
		print('YES')
		continue
	elif x >= 1 and y >= 1:
		print('YES')
		continue
	else:
		print('NO')


t = input()
t = int(t)
l = [input() for i in range(2 * t)]
for i in range(0, 2 * t, 2):
	l[i] = int(l[i])
	l[i + 1] = l[i + 1].split()
	for j in range(l[i]):
		l[i + 1][j] = int(l[i + 1][j])
	l[i + 1].sort()
for i in range(0, 2 * t, 2):
	x = 0
	while x < l[i] - 1 and l[i] != 1:
		if l[i + 1][x] == l[i + 1][x + 1] or l[i + 1][x] == l[i + 1][x + 1] - 1:
			l[i + 1].pop(x)
			l[i] -= 1
		else:
			x = l[i]
	if l[i] == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t = t - 1
	sum = 0
	odd = 0
	even = 0
	n = int(input())
	lis = input().strip().split()
	for i in range(n):
		sum = sum + int(lis[i])
	if sum % 2 != 0:
		print('YES')
		continue
	else:
		for i in range(n):
			if int(lis[i]) % 2 != 0:
				odd = 1
			elif int(lis[i]) % 2 == 0:
				even = 1
	if even == 1 and odd == 1:
		print('YES')
		continue
	else:
		print('NO')


def remove_smallest(n, array):
	if n == 1:
		return 'YES'
	else:
		array.sort()
		for i in range(n - 1):
			if array[i + 1] - array[i] > 1:
				return 'NO'
		return 'YES'
t = int(input())
array = []
for i in range(t):
	a = int(input())
	b = list(map(int, input().split(' ')))
	array.append([a, b])
for x in array:
	print(remove_smallest(*x))


def solve(a):
	a.sort()
	k = 0
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] <= 1:
			k += 1
		else:
			break
	return 'YES' if len(a) - k == 1 else 'NO'
n = int(input())
arrays = []
for _ in range(n):
	input()
	arrays.append(list(map(int, input().split())))
for i in range(n):
	print(solve(arrays[i]))


def solve():
	t = int(input())
	for i in range(t):
		n = int(input())
		m = sorted([int(s) for s in input().split()])
		usl = True
		for j in range(1, n):
			if m[j] - m[j - 1] > 1:
				usl = False
		if usl:
			print('YES')
		else:
			print('NO')
solve()


t = int(input())
g = True
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	if len(a) > 1:
		while len(a) > 1 and g:
			if abs(a[1] - a[0]) <= 1:
				a.pop(0)
				g = True
			else:
				print('NO')
				g = False
		if g:
			print('YES')
		g = True
	else:
		print('YES')


def main():
	t = int(input())
	for _ in range(t):
		c = 0
		n = int(input())
		a = [int(i) for i in input().split()]
		a.sort()
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				c = 1
				print('NO')
				break
		if c == 0:
			print('YES')
main()


T = int(input())
res = list()
for _ in range(T):
	n = int(input())
	x = list(map(int, input().split()))
	if len(x) == 1:
		res.append('YES')
		continue
	x.sort()
	i = 0
	while i < len(x) - 1:
		j = i + 1
		while j < len(x):
			if abs(x[i] - x[j]) <= 1:
				x.pop(x.index(min(x[i], x[j])))
				j -= 1
			j += 1
		i += 1
	if len(x) == 1:
		res.append('YES')
	else:
		res.append('NO')
for i in range(len(res)):
	print(res[i])


from sys import stdin, stdout

class Solve:

	def __init__(self):
		R = stdin.readline
		W = stdout.write
		ans = []
		for _ in range(int(input())):
			n = int(input())
			a = [int(x) for x in R().split()]
			(odd, even) = (0, 0)
			for i in range(n):
				if a[i] % 2:
					odd += 1
				else:
					even += 1
			if odd == 0 or (odd % 2 == 0 and even == 0):
				ans.append('NO\n')
			else:
				ans.append('YES\n')
		W(''.join(ans))

def main():
	s = Solve()
main()


t = int(input(''))
arr = []
for i in range(t):
	input('')
	arr.append(list(map(int, input().split())))
for i in arr:
	i.sort()
	flag = 0
	for j in range(len(i) - 1):
		if abs(i[j + 1] - i[j]) > 1:
			flag = 1
			break
	if flag:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	lens = int(input())
	odds = sum([1 for x in input().split() if int(x) % 2 == 1])
	evens = lens - odds
	ans = 'YES'
	if odds > 0:
		if odds == lens:
			if odds % 2 == 1:
				ans = 'YES'
			else:
				ans = 'NO'
		else:
			ans = 'YES'
	else:
		ans = 'NO'
	print(ans)


for _ in [0] * int(input()):
	k = False
	kk = False
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		print('YES')
		continue
	for i in a:
		if i % 2 == 1:
			k = True
		else:
			kk = True
	if k and kk:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	arr = list(map(int, input().strip().split()))
	items = set()
	for item in arr:
		items.add(item)
	items = list(items)
	items.sort()
	answer = True
	for pair in zip(items, items[1:]):
		if abs(pair[0] - pair[1]) > 1:
			answer = False
			break
	if answer:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	even = list(filter(lambda x: x % 2 == 0, l))
	odd = n - len(even)
	if odd == 0 or (len(even) == 0 and odd % 2 == 0):
		print('NO')
	else:
		print('YES')
	t -= 1


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

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

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

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

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = inar()
		lis = []
		counter = 0
		for i in range(n):
			if arr[i] not in lis:
				lis.append(arr[i])
		lis.sort()
		if len(lis) == 1:
			print('YES')
			continue
		for i in range(1, len(lis)):
			if lis[i] - lis[i - 1] > 1:
				counter = 1
				break
		if counter:
			print('NO')
		else:
			print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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


import math
t = int(input())
for j in range(t):
	n = int(input())
	arr = [int(i) for i in input().strip().split()]
	arr.sort()
	for i in range(len(arr) - 1):
		if abs(arr[i + 1] - arr[i]) <= 1:
			continue
		else:
			print('NO')
			break
	else:
		print('YES')


def func(a, arr):
	arr.sort()
	for i in range(1, a):
		if abs(arr[i] - arr[i - 1]) > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for _ in range(t):
	a = int(input())
	arr = list(map(int, input().split()))
	func(a, arr)


iteration = int(input())
for i in range(iteration):
	size = int(input())
	elements = input()
	array = list(map(int, elements.split()))
	count = 0
	for i in array:
		if i % 2 == 0:
			count += 1
	if count == size:
		print('NO')
	elif count == 0:
		if size % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
while t:
	n = int(input())
	nl = list(map(int, input().split()))
	nl.sort()
	flag = True
	for i in range(n - 1):
		if abs(nl[i] - nl[i + 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')
	t -= 1


T = int(input())
for z in range(T):
	N = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	l = len(a)
	control = 1
	for i in range(l - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			control = 0
			break
	if control == 1:
		print('YES')


tests = int(input())
for _ in range(tests):
	size = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	found = False
	for i in range(1, size):
		if nums[i] - nums[i - 1] > 1:
			found = True
			break
	if found:
		print('NO')
	else:
		print('YES')


t = int(input().strip())
for _ in range(t):
	n = int(input().strip())
	nums = [int(i) for i in input().strip().split()]
	s = sum(nums)
	if s % 2 != 0:
		print('YES')
	else:
		has = False
		odd_index = -1
		for i in range(n):
			if nums[i] % 2 != 0:
				odd_index = i
				break
		if odd_index != -1:
			for i in range(n):
				if nums[i] % 2 == 0:
					has = True
					break
		if not has:
			even_index = -1
			for i in range(n):
				if nums[i] % 2 == 0:
					even_index = i
					break
			if even_index != -1:
				for i in range(n):
					if nums[i] % 2 != 0:
						has = True
						break
		if has:
			print('YES')
		else:
			print('NO')


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

def solve():
	(n,) = read_nums()
	nums = sorted(read_nums())
	for i in range(n - 1):
		if abs(nums[i + 1] - nums[i]) > 1:
			print('NO')
			return
	print('YES')

def main():
	(t,) = read_nums()
	for _ in range(t):
		solve()
main()


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	A = sorted(map(int, input().split()))
	for i in range(1, n):
		if A[i] > A[i - 1] + 1:
			print('NO')
			break
	else:
		print('YES')


o = int(input())
m = 0
for i in range(o):
	a = int(input())
	b = list(map(int, input().split()))
	b.sort()
	while len(b) != 1:
		if b[0] - b[1] == 1 or b[1] - b[0] == 1 or b[0] - b[1] == 0 or (b[1] - b[0] == 0):
			b.remove(b[0])
		else:
			print('NO')
			m = 1
			break
	if m != 1:
		print('YES')
	m = 0


from math import *
t = int(input())
words = lambda bool_val: ('NO', 'YES')[bool_val]

def main():
	n = int(input())
	arr = sorted(list(map(int, input().split(' '))))
	arr2 = []
	for i in range(len(arr) - 1):
		arr2.append(abs(arr[i] - arr[i + 1]))
	return words(sum(arr) % 2 == 1 or 1 in [x % 2 for x in arr2])
for _ in range(t):
	print(main())


t = int(input())
while t > 0:
	n = int(input())
	ar = list(map(int, input().split(' ')))
	ar.sort()
	r = 'YES'
	for i in range(n - 1):
		if abs(ar[i + 1] - ar[i]) > 1:
			r = 'NO'
	print(r)
	t -= 1


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


import math
import re
import itertools
import copy

def input_linear(lamb=lambda x: int(x), seperator=' '):
	return map(lamb, input().split(seperator))

def input_array(lamb=lambda x: int(x), seperator=' '):
	return list(map(lamb, input().split(seperator)))

def input_matrix(rows, lamb=lambda x: int(x), seperator=' '):
	tmp_matrix = []
	for i in range(rows):
		tmp_matrix.append(input_array(lamb, seperator))
	return tmp_matrix

def input_graph_al_pair(vertices, lines, lamb=lambda x: int(x), seperator=' ', directional=False, remove_dup=False):
	temp_matrix = [x[:] for x in [[]] * vertices]
	if not directional:
		if not remove_dup:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				temp_matrix[ina].append(inb)
				temp_matrix[inb].append(ina)
		else:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				if inb not in temp_matrix[ina]:
					temp_matrix[ina].append(inb)
				if ina not in temp_matrix[inb]:
					temp_matrix[inb].append(ina)
		return temp_matrix
	else:
		if not remove_dup:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				temp_matrix[ina].append(inb)
		else:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				if inb not in temp_matrix[ina]:
					temp_matrix[ina].append(inb)
		return temp_matrix
t = int(input())
for _ in range(t):
	n = int(input())
	a = input_array()
	oe = [0, 0]
	for i in range(n):
		if a[i] % 2:
			oe[1] += 1
		else:
			oe[0] += 1
	if oe[1] % 2 == 1:
		print('Yes')
	elif oe[0] > 0 and oe[1] > 0:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = map(int, input().split())
	odd = False
	even = False
	for i in a:
		if i & 1:
			odd = True
		else:
			even = True
	if odd and even:
		print('YES')
	elif odd and n & 1:
		print('YES')
	else:
		print('NO')


from array import array

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

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

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

def invr():
	return map(int, input().split())
from random import randint

def qsort(array, n):
	for i in range(1, n):
		key_item = array[i]
		j = i - 1
		while j >= 0 and array[j] > key_item:
			array[j + 1] = array[j]
			j -= 1
		array[j + 1] = key_item
	return array

def sorted(a, n):
	x = 1
	while x < n:
		if a[i - 1] > a[i]:
			return qsort(a, n)
	return a
while True:
	try:
		n = inp()
		i = 0
		while i < n:
			m = inp()
			a = inlt()
			b = qsort(a, m)
			y = 1
			flag = 0
			while y < m:
				if b[y] - b[y - 1] > 1:
					print('NO')
					flag = 1
					break
				y = y + 1
			if flag == 0:
				print('YES')
			i = i + 1
	except EOFError:
		break


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

	def is_odd(x):
		return x & 1 == 1
	if n & 1:
		if any(map(is_odd, arr)):
			print('YES')
		else:
			print('NO')
	elif any(map(is_odd, arr)) and (not all(map(is_odd, arr))):
		print('YES')
	else:
		print('NO')


n = int(input())
a = []
f = 0
g = []
for i in range(n):
	k = int(input())
	a = input().split(maxsplit=k)
	a = [int(item) for item in a]
	a.sort()
	if len(a) > 1:
		for x in range(1, k):
			if a[x] - a[x - 1] == 1 or a[x] - a[x - 1] == 0:
				f = f + 1
		if k - f == 1:
			g.append('YES')
		else:
			g.append('NO')
	else:
		g.append('YES')
	f = 0
print(*g, sep='\n')


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	l = set(l)
	ans = 0
	l = sorted(l)
	for i in range(1, len(l)):
		if l[i] - l[i - 1] != 1:
			ans = 1
	if ans == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


T = int(input())
for i in range(T):
	n = int(input())
	l = list(map(int, input().split(' ')))
	l.sort()
	a = 1
	p = l[-1]
	for i in range(len(l) - 2, -1, -1):
		if abs(p - l[i]) <= 1:
			l.remove(p)
			p = l[i]
		else:
			print('NO')
			a = 0
			break
	if a and len(l) == 1:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	m = min(a)
	M = max(a)
	s = set(a)
	flag = True
	for i in range(m, M + 1):
		if i in s:
			continue
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	y = list(map(int, input().split()))
	flag = 0
	even = 0
	odd = 0
	for i in y:
		if i % 2 != 0:
			odd += 1
		else:
			even += 1
	if odd == 0:
		print('NO')
	elif even == 0:
		if odd % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


test_case = int(input())
for i in range(test_case):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	while arr:
		c = arr.count(arr[0])
		if c == len(arr):
			print('YES')
			break
		elif len(arr) == 1:
			print('YES')
			break
		elif abs(arr[0] - arr[1]) < 2:
			x = min(arr[0], arr[1])
			arr.pop(0)
		else:
			print('NO')
			break


t = int(input())
n = 0
inp = list()
data = list()
for i in range(t):
	n = int(input())
	inp = sorted(list(map(int, input().split())), reverse=True)
	if len(inp) > 1:
		while len(inp) > 1:
			if inp[0] - inp[1] <= 1:
				inp.pop(0)
				if len(inp) == 1:
					print('YES')
					break
			else:
				print('NO')
				break
	else:
		print('YES')
	inp.clear()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	j = 0
	p = 0
	for j in range(n - 1):
		if abs(l[j + 1] - l[j]) <= 1:
			continue
		else:
			p = 1
			break
	if p == 1:
		print('NO')
	else:
		print('YES')


for q in range(int(input())):
	n = int(input())
	d = [int(i) & 1 for i in input().split()]
	if sum(d) & 1 == 1:
		print('YES')
	elif 0 in d and 1 in d:
		print('YES')
	else:
		print('NO')


t = int(input())
for q in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	se = set()
	so = set()
	for i in range(n):
		if a[i] % 2 == 0:
			se.add(a[i])
		else:
			so.add(a[i])
	if len(so) == 0:
		print('NO')
	elif len(se) == 0:
		if n % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


from collections import Counter
t = int(input())
for _ in range(t):
	x = int(input())
	a = list(map(int, input().split()))
	if all((n % 2 == 0 for n in a)):
		print('NO')
	elif all((n % 2 == 1 for n in a)):
		if x % 2:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	A = sorted([int(_) for _ in input().split()])
	for _ in range(1, n):
		if A[_] - A[_ - 1] > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	mini = min(l)
	maxi = max(l)
	lc = set(list(range(mini, maxi + 1)))
	for i in l:
		if i in lc:
			lc.remove(i)
	if len(lc) == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	t = int(input())
	s = input().split()
	odd = 0
	for j in range(t):
		s[j] = int(s[j])
		if s[j] % 2 == 1:
			odd += 1
	if sum(s) % 2 == 1:
		print('YES')
	elif odd > 0 and odd < t:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	l = []
	o = 0
	e = 0
	sum1 = 0
	a = int(input())
	l = list(map(int, input().split()))
	for j in range(len(l)):
		sum1 += l[j]
		if l[j] % 2 == 1:
			o = 1
		else:
			e = 1
	if sum1 % 2 != 0 or (o and e):
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
from sys import maxsize
input = stdin.readline

def solve():
	pass
test = 1
test = int(input().strip())
for t in range(0, test):
	n = int(input().strip())
	a = [int(x) for x in input().strip().split()]
	d = {}
	for el in a:
		d[el] = d.get(el, 0) + 1
	d = list(d)
	d.sort()
	flag = True
	for i in range(1, len(d)):
		if d[i] - d[i - 1] != 1:
			flag = False
	if flag:
		print('YES')
	else:
		print('NO')
	ans = solve()


import sys
import math
import heapq
import bisect
import re
from collections import deque
from decimal import *
from fractions import gcd

def YES_NO(flag):
	if flag:
		print('YES')
	else:
		print('NO')

def main():
	n = int(input())
	t = list(map(int, input().split()))
	(q, w) = (0, 0)
	for i in t:
		q = q | i % 2
		w = w | (i % 2 == 0)
	YES_NO(q and w or (q and n % 2))
for i in range(int(input())):
	main()


for _ in range(int(input())):
	a = int(input())
	z = 0
	f = 0
	p = list(map(int, input().split()))
	for i in p:
		if i % 2 == 1:
			f += 1
		if i % 2 == 0:
			z += 1
		if f != 0 and z != 0:
			break
	if f != 0:
		if a % 2 == 1:
			print('YES')
		elif a % 2 == 0 and z != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


x = int(input())
for z in range(x):
	n = int(input())
	l = list(map(int, input().split()))
	f = 0
	c = min(l)
	for i in range(n):
		if l[i] - 1 not in l and l[i] != c:
			print('NO')
			f = 1
			break
	if f == 0:
		print('YES')


t = int(input())
while t:
	t -= 1
	n = int(input())
	oneEvenFound = False
	oneOddFound = False
	a = []
	for k in input().split():
		numK = int(k)
		if numK % 2 == 0:
			oneEvenFound = True
		else:
			oneOddFound = True
		a.append(numK)
	if n % 2 == 0:
		print('YES' if oneEvenFound and oneOddFound else 'NO')
	else:
		print('YES' if oneOddFound else 'NO')


def sm(ar):
	ar.sort()
	for i in range(1, n):
		if ar[i] - ar[i - 1] > 1:
			return 'No'
	return 'Yes'
for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	print(sm(ar))


n = int(input())

def solve(arr):
	s = sorted(set(arr))
	count = 0
	for (i, v) in enumerate(s[:-1]):
		if v + 1 == s[i + 1]:
			count = count + 1
	if len(s) - count > 1:
		print('NO')
	else:
		print('YES')
while n:
	t = int(input())
	arr = map(int, input().split())
	solve(arr)
	n = n - 1


t = int(input())
for _ in range(t):
	a = int(input())
	A = sorted(list(map(int, input().split())))
	cnt = 0
	for (x, y) in zip(A, A[1:]):
		if abs(x - y) > 1:
			cnt += 1
	if cnt > 0:
		print('NO')
	else:
		print('YES')


for q in range(int(input())):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	res = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			res = 'NO'
	print(res)


t = int(input())
while t:
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	found = True
	for i in range(0, len(arr) - 1):
		if arr[i + 1] - arr[i] <= 1:
			continue
		else:
			found = False
	if found:
		print('YES')
	else:
		print('NO')
	t -= 1


t = input()
t = int(t)
while t > 0:
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	a.sort()
	flag = 0
	for (idx, val) in enumerate(a[:n - 1]):
		if a[idx + 1] - a[idx] >= 2:
			flag = 1
			break
	if flag == 1:
		print('NO')
	else:
		print('YES')
	t -= 1


t = int(input())
res = []
for i in range(t):
	n = int(input())
	a = sorted([int(x) for x in input().strip().split(' ')])
	yes = True
	solution = set()
	for j in range(n):
		if not solution:
			solution.add(a[j])
		elif a[j] - 1 in solution:
			solution.remove(a[j] - 1)
			if a[j] + 1 not in solution:
				solution.add(a[j])
		elif a[j] + 1 in solution:
			continue
		else:
			solution.add(a[j])
	if solution and len(solution) == 1:
		res.append('YES')
	else:
		res.append('NO')
print('\n'.join(res))


def soln():
	n = int(input())
	arr = list(map(int, input().split()))
	if n == 1:
		return 'YES'
	arr = sorted(arr)
	past = arr[0]
	for i in range(1, n):
		if arr[i] - past > 1:
			return 'NO'
		past = arr[i]
	return 'YES'
for i in range(int(input())):
	print(soln())


t = int(input())
for _ in range(0, t):
	n = int(input())
	aa = [int(i) for i in input().split()]
	aa.sort()
	if n == 1:
		print('YES')
	else:
		ans = 1
		for i in range(1, n):
			if aa[i] - aa[i - 1] > 1:
				ans = 0
				break
		print(['NO', 'YES'][ans])


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	for i in range(n):
		l[i] = l[i] % 2
	if n % 2 == 0:
		if sum(l) == n or sum(l) == 0:
			print('NO')
		else:
			print('YES')
	elif sum(l) == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = []
	a.sort()
	for i in range(n - 1):
		l.append(abs(a[i] - a[i + 1]))
	var = len(l)
	c = 0
	for i in range(len(l)):
		if l[i] > 1:
			f = 0
			break
		else:
			c += 1
	if c == var:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	a = int(input())
	b = [int(x) % 2 for x in input().split()]
	s = sum(b)
	if s % 2 == 1:
		print('YES')
	elif 1 in b and 0 in b:
		print('YES')
	else:
		print('NO')


def oddeven(n, arr):
	codd = 0
	ceven = 0
	s = 0
	for i in range(n):
		s += arr[i]
		if arr[i] % 2 == 0:
			ceven += 1
		else:
			codd += 1
	if s % 2 != 0:
		return 'YES'
	elif ceven == n:
		return 'NO'
	elif codd == n:
		return 'NO'
	else:
		return 'YES'
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(oddeven(n, arr))


m = int(input())
sol = []

def solve(l):
	sum = 0
	for i in l:
		sum += i
	if sum % 2:
		return 'YES'
	else:
		(odd, even) = (0, 0)
		for i in l:
			if i % 2:
				odd += 1
			else:
				even += 1
		if odd == 0 or even == 0:
			return 'NO'
		else:
			return 'YES'
for i in range(m):
	n = int(input())
	l = list(map(int, input().split()))
	sol.append(solve(l))
for i in sol:
	print(i)


def f(a):
	if len(a) != 1:
		a.sort()
	n = len(a) - 1
	while n != 0:
		if abs(a[1] - a[0]) <= 1:
			a = a[1:]
			n -= 1
		else:
			return 'NO'
	return 'YES'
results = []
n = int(input())
for num in range(n):
	t = int(input())
	arr = input()
	if len(arr) != 1:
		a = [int(x) for x in arr.split()]
		o = f(a)
		results.append(o)
	else:
		results.append('YES')
for elem in results:
	print(elem)


from fractions import Fraction
from collections import defaultdict
import math
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')
t = int(input())
for _ in range(t):
	n = int(input())
	l = list([int(x) for x in input().split()])
	pos = 0
	f = 0
	l.sort()
	while pos < len(l) - 1:
		if abs(l[pos] - l[pos + 1]) > 1:
			f = 1
			break
		pos += 1
	if f == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	k = [0] * 105
	m = 102
	for i in l:
		k[i] += 1
		m = min(m, i)
	for i in range(m, 105):
		if k[i] == 0:
			ans = i
			break
	sol = True
	for i in range(ans, 105):
		if k[i] > 0:
			sol = False
	if sol:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	ar = list(map(int, input().split()))
	if len(set(ar)) == 1:
		print('YES')
	else:
		yep = 1
		temp = list(set(ar))
		temp.sort()
		for i in range(0, len(temp) - 1):
			if abs(temp[i] - temp[i + 1]) != 1:
				yep = 0
				break
		if yep == 1:
			print('YES')
		else:
			print('NO')
	t -= 1


n = int(input())
ans = []
for i in range(n):
	a = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		ans.append('YES')
	elif sum(arr) % 2 == 0 and arr.count(arr[0]) == len(arr):
		ans.append('NO')
	else:
		temp = arr
		flag = 0
		for j in range(len(arr) - 1):
			temp[0] = temp[-(j + 1)]
			if sum(temp) % 2 != 0:
				flag = 1
				break
			temp = arr
		if flag:
			ans.append('YES')
		else:
			ans.append('NO')
for i in ans:
	print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	e = 0
	od = 0
	l = [int(i) for i in input().split()]
	for i in l:
		if i % 2 != 0:
			od += 1
		else:
			e += 1
	if od >= 1 and e >= 1 or (od >= 1 and n % 2 == 1):
		print('YES')
	else:
		print('NO')


cases = int(input())
for i in range(cases):
	n = int(input())
	arr = list(map(int, input().split()))
	res = []
	for k in arr:
		res.append(k % 2)
	if res.count(1) == n and n % 2 == 0:
		print('NO')
	elif res.count(1) == 0:
		print('NO')
	else:
		print('YES')


def del_one(a):
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] == 1:
			del a[i]
			return

def main():
	amount_of_tests = int(input())
	for _ in range(amount_of_tests):
		n = int(input())
		bad_guys = []
		a = [int(i) for i in input().split()]
		a = list(set(a))
		a.sort()
		while len(a) > 1:
			old_len = len(a)
			del_one(a)
			if old_len == len(a):
				print('NO')
				break
		else:
			print('YES')
main()


for x in range(int(input())):
	n = int(input())
	numbers = sorted(list(map(int, input().split())))
	s = 0
	for i in range(n - 1):
		if numbers[i + 1] - numbers[i] > 1:
			s = 1
			break
	if s:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	o = 0
	e = 0
	for j in l:
		c = 0
		if j % 2 == 0:
			e += 1
		else:
			o += 1
		if n % 2 == 0 and o >= 1 and (e >= 1):
			c = 1
			print('YES')
			break
		elif n % 2 != 0 and o >= 1:
			c = 1
			print('YES')
			break
	if c == 0:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	ans = 'Yes'
	arr = list(map(int, input().split()))
	arr.sort()
	while len(arr) > 1:
		if arr[1] - arr[0] <= 1:
			arr.remove(arr[0])
		else:
			ans = 'No'
			break
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	if sum(x) % 2 == 1:
		print('Yes')
	else:
		f = 0
		g = 0
		for i in x:
			if i % 2 == 0:
				f = 1
			else:
				g = 1
		if f == 1 and g == 1:
			print('Yes')
		else:
			print('No')


t = int(input())
a = []
n = []
for i in range(t):
	n.append(input())
	a.append(input())
for test in a:
	Test = []
	test = test.split()
	for i in range(len(test)):
		Test.append(int(test[i]))
	Test.sort()
	s = Test[0]
	for i in Test:
		if i == s:
			continue
		else:
			s = None
			break
	if s == Test[0]:
		print('YES')
	else:
		u = 0
		for r in range(len(Test) - 1):
			if abs(int(Test[0]) - int(Test[1])) <= 1:
				b = min(Test[0], Test[1])
				Test.remove(b)
			else:
				print('No')
				u = 2
				break
		if u != 2:
			print('YES')


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


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	count = len(a)
	a.sort()
	for i in range(1, n + 1):
		if count == 1:
			print('YES')
			break
		elif i == n:
			print('NO')
			break
		if abs(a[i] - a[i - 1]) <= 1:
			count -= 1


import sys
for _ in range(int(sys.stdin.readline().rstrip())):
	n = int(sys.stdin.readline().rstrip())
	a = list(map(int, sys.stdin.readline().rstrip().split()))
	a.sort()
	re = 'YES'
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			re = 'NO'
			break
	print(re)


def removeSmallest(arr):
	arr = sorted(arr)
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			return 'NO'
	return 'YES'
n = int(input())
for i in range(n):
	k = int(input())
	arr = [int(x) for x in input().split()]
	print(removeSmallest(arr))


for _ in range(int(input())):
	a = int(input())
	n = list(map(int, input().split()))
	n = sorted(n)
	while True:
		yn = 0
		for (k, i) in enumerate(range(len(n) - 1)):
			if -1 <= n[i] - n[i + 1] <= 1:
				n.remove(n[k])
				yn += 1
				break
		if yn == 0:
			break
	if len(n) == 1:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	noe = int(input())
	ele = list(map(int, input().split()))
	odd = 0
	even = 0
	for j in ele:
		if j % 2 == 0:
			even += 1
		else:
			odd += 1
	if len(ele) == even:
		print('NO')
	elif odd % 2 == 0 and len(ele) == odd:
		print('NO')
	else:
		print('YES')


def apex():
	tc = int(input())
	for _ in range(tc):
		n = int(input())
		a = list(map(int, input().split()))
		a.sort()
		if n > 1:
			c = 0
			for i in range(0, n - 1):
				if abs(a[i] - a[i + 1]) > 1:
					c = 1
			if c == 1:
				print('NO')
			else:
				print('YES')
		else:
			print('YES')
apex()


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	last = a[0]
	flag = 0
	for el in a[1:]:
		if last <= el and el - last <= 1:
			last = el
		else:
			flag = 1
			break
	print('YES' if flag == 0 else 'NO')


for _ in range(int(input())):
	n = int(input())
	s = [int(i) for i in input().split()]
	sum = a = b = 0
	for i in range(n):
		sum += s[i]
		if s[i] % 2 == 0:
			a += 1
		else:
			b += 1
	if sum % 2 == 0 and b == n or (sum % 2 == 0 and a == n):
		print('NO')
	else:
		print('YES')


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

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

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

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

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

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

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

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

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

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


for _ in range(int(input())):
	n = int(input())
	arr = [int(k) for k in input().split()]
	(odd, even, t) = (0, 0, 0)
	for i in range(n):
		if arr[i] % 2 == 0:
			even += 1
		else:
			odd += 1
		t += arr[i]
	if t % 2 != 0:
		print('YES')
	elif even == n:
		print('NO')
	elif odd == n and n % 2 != 0:
		print('YES')
	elif odd == n and n % 2 == 0:
		print('NO')
	else:
		print('YES')


def remove_smallest():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = [int(x) for x in input().split()]
		a = sorted(a)
		is_good = True
		for i in range(1, len(a)):
			if abs(a[i] - a[i - 1]) > 1:
				is_good = False
				break
		if is_good:
			print('YES')
		else:
			print('NO')
remove_smallest()


c = int(input())
for u in range(c):
	n = int(input())
	A = list(map(int, input().split()))
	od = 0
	eve = 0
	for h in range(n):
		if A[h] % 2 == 0:
			eve += 1
		else:
			od += 1
	if sum(A) % 2 != 0:
		print('YES')
	elif eve >= 1 and od >= 1:
		print('YES')
	else:
		print('NO')


for u in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 0
	s = 0
	for i in range(n):
		if l[i] % 2 != 0:
			c = c + 1
		s = s + l[i]
	if s % 2 == 1:
		print('YES')
	elif c == 0 or c == n:
		print('NO')
	else:
		print('YES')


def IS_possible(arr):
	a = False
	c = 0
	if sum(arr) % 2 != 0:
		return 'YES'
	m = set(arr)
	if len(m) == 1:
		return 'NO'
	for i in arr:
		if i % 2 == 0:
			c += 1
	if c == len(arr) or c == 0:
		return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	print(IS_possible(arr))


import sys
input = sys.stdin.readline
n = int(input())
ans = 0
for i in range(n):
	(m, l) = (int(input()), list(map(int, input().split())))
	l.sort()
	ans = True
	for i in range(len(l) - 1):
		if abs(l[i + 1] - l[i]) > 1:
			print('NO')
			ans = False
			break
	if ans:
		print('YES')


T = int(input())
for i in range(T):
	n = int(input())
	s = [int(j) for j in input().split()]
	flag = 0
	for j in range(len(s) - 1):
		if s[j] % 2 != s[j + 1] % 2:
			flag = 1
	if flag == 0:
		if len(s) % 2 == 1 and s[0] % 2 == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary_rep(n):
	l = []
	while n > 0:
		l.append(n % 2)
		n = n // 2
	return l
for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	answer = 'YES'
	for i in range(n - 1):
		if ar[i + 1] - ar[i] > 1:
			answer = 'NO'
			break
	print(answer)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	s = 0
	(even, odd) = (0, 0)
	for j in range(len(a)):
		if a[j] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == n:
		print('NO')
	if odd == n and odd % 2 == 0:
		print('NO')
	elif odd == n and odd % 2 != 0:
		print('YES')
	if even > 0 and odd > 0:
		print('YES')


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
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 main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		sa = sorted(a)
		f = True
		for j in range(1, len(sa)):
			if sa[j] - sa[j - 1] > 1:
				f = False
				break
		if f:
			print('YES')
		else:
			print('NO')
main()


def unilist(l, n):
	l.sort()
	diff = list((l[i + 1] - l[i] for i in range(n - 1))) + [0]
	if max(diff) > 1:
		return 'NO'
	else:
		return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print(unilist(l, n))


for tc in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	o = 0
	e = 0
	if sum(l) % 2:
		print('YES')
	else:
		o = []
		e = []
		for i in l:
			if i % 2 == 0:
				e.append(i)
			else:
				o.append(i)
		if len(e) == 0 and len(o) % 2:
			print('YES')
		elif len(e) == 0 and (not len(o) % 2):
			print('NO')
		elif len(e) > 0 and len(o) == 0:
			print('NO')
		else:
			print('YES')


def array_with_odd_sum(N, arr):
	odd = False
	even = False
	array_sum = 0
	for num in arr:
		array_sum += num
		odd = odd or num % 2
		even = even or num % 2 == 0
	if array_sum % 2 or (odd and even):
		return 'YES'
	return 'NO'
test_cases = int(input())
for case in range(test_cases):
	N = int(input())
	arr = list(map(int, input().split()))
	print(array_with_odd_sum(N, arr))


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	p = a[0]
	nn = True
	for i in a:
		if abs(i - p) > 1:
			print('NO')
			nn = False
			break
		p = i
	if nn:
		print('YES')


def run():
	n = int(input())
	nums = [int(i) for i in input().split()]
	nums.sort()
	for i in range(1, n):
		if nums[i] > nums[i - 1] + 1:
			print('NO')
			return
	print('YES')
	return
t = int(input())
for i in range(t):
	run()


t = int(input())
for i in range(t):
	l = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	f = True
	for i in range(l - 1):
		if abs(a[i + 1] - a[i]) > 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


n = int(input())

def f(arr):
	(odd, even) = (0, 0)
	for x in arr:
		if x % 2:
			odd += 1
		else:
			even += 1
	if odd % 2:
		print('YES')
	elif odd and even:
		print('YES')
	else:
		print('NO')
for _ in range(n):
	input()
	arr = list(map(int, input().split()))
	f(arr)


t = int(input())
for i in range(t):
	n = int(input())
	f = list(map(int, input().split()))
	s1 = 0
	s2 = 0
	for j in range(len(f)):
		if f[j] % 2 == 0:
			s1 += f[j]
		else:
			s2 += f[j]
	if s2 % 2 != 0:
		print('YES')
	elif s2 != 0 and s1 != 0:
		print('YES')
	else:
		print('NO')


n = int(input())
numbers = []
for i in range(n):
	input()
	temp = list(map(int, input().split()))
	temp.sort()
	numbers.append(temp)
for numberList in numbers:
	val = True
	for i in range(1, len(numberList)):
		if numberList[i] - numberList[i - int(1)] > int(1):
			val = False
	if val:
		print('YES')
	else:
		print('NO')


def func(n):
	n = list(map(int, n.split()))
	if sum(n) % 2 != 0:
		return 'YES'
	if len(set(n)) == 1:
		return 'NO'
	if len([i for i in n if i % 2 != 0]) == 0:
		return 'NO'
	if len([i for i in n if i % 2 == 0]) == 0:
		return 'NO'
	return 'YES'

def main():
	t = int(input())
	input_list = []
	for i in range(t):
		input()
		input_list.append(input())
	for i in list(map(func, input_list)):
		print(i)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = set(a)
	if len(s) == max(s) - min(s) + 1:
		print('YES')
	else:
		print('NO')


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

def rList():
	return list(map(int, input().split()))
t = int(input())
for i in range(t):
	n = int(input())
	a = rList()
	countA = 0
	countB = 0
	for i in a:
		if i % 2 == 0:
			countA += 1
		else:
			countB += 1
	if countA == 0:
		if n % 2 == 1:
			print('YES')
		else:
			print('NO')
	elif countB == 0:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	c = 0
	m = input()
	m = int(m)
	k = input().split()
	if len(k) == 1:
		print('YES')
	else:
		for j in range(m):
			k[j] = int(k[j])
		k.sort()
		for p in range(m - 1):
			if k[p + 1] - k[p] > 1 and c == 0:
				print('NO')
				c += 1
				break
		if c == 0:
			print('YES')


test = int(input())
while test != 0:
	n = int(input())
	arr = list(map(int, input().split()))
	even = 0
	odd = 0
	for i in range(n):
		if arr[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0:
		print('NO')
	elif even == 0:
		if odd % 2 == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')
	test -= 1


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	f = 0
	for i in range(n - 1):
		if ar[i + 1] - ar[i] > 1:
			print('NO')
			f = 1
			break
	if not f:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		a.sort()
		maxd = -1
		for i in range(n - 1):
			maxd = max(maxd, a[i + 1] - a[i])
		if maxd >= 2:
			print('NO')
		else:
			print('YES')


def read_int():
	n = int(input())
	return n

def read_ints():
	ints = [int(x) for x in input().split(' ')]
	return ints

def solve(n, a):
	odd = False
	even = False
	if sum(a) % 2 == 1:
		return 'YES'
	for i in range(n):
		if a[i] % 2 == 1:
			odd = True
		else:
			even = True
		if odd and even:
			return 'YES'
	return 'NO'
t = read_int()
for case in range(t):
	n = read_int()
	a = read_ints()
	sol = solve(n, a)
	print(sol)


import os
import sys
from atexit import register
from io import StringIO
sys.stdout = StringIO()
register(lambda : os.write(1, sys.stdout.getvalue().encode()))
import math
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(k) for k in sys.stdin.readline().split()]
	if sum(a) % 2 == 1:
		print('YES')
	else:
		parities = set()
		for i in a:
			parities.add(i % 2)
		print('YES' if len(parities) == 2 else 'NO')


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : map(int, INP().split())
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=' '):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	exit()
for _ in range(INT()):
	n = INT()
	arr = sorted(ARR())
	ans = 'YES'
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			ans = 'NO'
			break
	print(ans)


def check_possible(array):
	if sum(array) % 2 == 1:
		return True
	remainders = [x % 2 == 0 for x in array]
	if all(remainders):
		return False
	if not True in remainders:
		return False
	return True
t = int(input())
for i in range(t):
	n = int(input())
	array = [int(x) for x in input().split()]
	ans = check_possible(array)
	if ans:
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	while t:
		n = int(input())
		arr = []
		arr = list(map(int, input().split()))
		arr.sort()
		ok = 1
		if n == 1:
			print('YES\n')
		else:
			for i in range(1, n):
				if abs(arr[i - 1] - arr[i]) > 1:
					ok = 0
					break
			if ok == 0:
				print('NO\n')
			else:
				print('YES\n')
		t -= 1
main()


t = int(input())
for _ in range(t):
	length_of_ls = int(input())
	ls = list(map(int, input().split()))
	if len(ls) == 1:
		print('YES')
	else:
		ls.sort()
		for i in range(1, len(ls)):
			if -1 <= ls[0] - ls[1] <= 1:
				ls.pop(0)
		if len(ls) == 1:
			print('YES')
		else:
			print('NO')


import math
from sys import stdin, stdout
from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	f = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			f = 1
			print('NO')
			break
	if f == 0:
		print('YES')


try:
	for test in range(int(input())):
		size = int(input())
		arr = list(map(int, input().split()))
		arr.sort()
		(i, j) = (0, 1)
		while j < len(arr):
			if arr[j] - arr[i] <= 1:
				i += 1
				j += 1
			else:
				break
		if i == len(arr) - 1:
			print('YES')
		else:
			print('NO')
except:
	pass


for _ in range(int(input())):
	n = int(input())
	L = list(map(int, input().split()))
	a = False
	b = False
	for i in L:
		if i % 2 == 1:
			a = True
		else:
			b = True
	if a and b or sum(L) % 2 == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	n = int(input())
	a = input().split()
	for j in range(n):
		a[j] = int(a[j])
	check = True
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			check = False
	if check:
		print('YES')
	else:
		print('NO')


sets = int(input())
glod_counter = 0
while glod_counter < sets:
	len_o_list = int(input())
	data = list(map(int, input().split()))
	data = sorted(data)
	for i in range(1, len_o_list):
		if data[i] - data[i - 1] <= 1 or data[i] == data[i - 1]:
			continue
		else:
			print('NO')
			break
	else:
		print('YES')
	glod_counter += 1


t = int(input())
for you in range(t):
	n = int(input())
	l = input().split()
	li = [int(i) for i in l]
	poss = 0
	if sum(li) % 2 == 1:
		print('YES')
	else:
		for i in range(n):
			for j in range(i + 1, n):
				if abs(li[i] - li[j]) % 2 == 1:
					poss = 1
					break
		if poss == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	k = 1
	lis = list(map(int, input().split()))
	lis.sort()
	for i in range(1, n):
		if lis[i] - lis[i - 1] <= 1:
			pass
		else:
			k = 0
			break
	if k:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	o = len(set([i for i in x if i % 2 == 1]))
	e = len(set([i for i in x if i % 2 == 0]))
	if e > 0 and o > 0 or sum(x) % 2 == 1:
		print('YES')
	else:
		print('NO')


def removeSmallest(a):
	if len(a) == 1:
		return 'YES'
	else:
		a.sort()
		for i in range(1, len(a)):
			if a[i] - a[i - 1] > 1:
				return 'NO'
		return 'YES'
n = int(input())
for i in range(n):
	k = int(input())
	l = list(map(int, input().split()))
	print(removeSmallest(l))


for x in range(int(input())):
	a = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2 == 1:
		print('YES')
	else:
		s = 0
		for y in l:
			if y % 2 == 1:
				s += 1
		if s > 0 and s < a:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	summ = 0
	numb = int(input())
	arr = list(map(int, input().split()))
	summ = sum(arr)
	if summ % 2 != 0:
		print('YES')
	else:
		ch1 = False
		ch2 = False
		for j in range(numb):
			if arr[j] % 2 == 0 and (not ch1):
				ch1 = True
			if arr[j] % 2 != 0 and (not ch2):
				ch2 = True
			if ch1 and ch2:
				print('YES')
				break
		if not ch1 or not ch2:
			print('NO')


n = int(input())
cases = [(int(input()), list(map(int, input().split()))) for _ in range(n)]
for case in cases:
	if sum(case[1]) % 2 != 0:
		print('YES')
		continue
	(even, odd) = (False, False)
	for i in range(case[0]):
		if even and odd:
			break
		elif case[1][i] % 2 == 0:
			even = True
		else:
			odd = True
	if even and odd:
		print('YES')
	else:
		print('NO')


k = int(input())
for _ in range(k):
	k_el = int(input())
	data = sorted(set(map(int, input().split())))
	k = None
	fl = True
	for n in data:
		if k is None:
			k = n + 1
		elif n == k:
			k += 1
		else:
			fl = False
			print('NO')
			break
	if fl is True:
		print('YES')


def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		A = [int(i) for i in input().split()]
		A.sort()
		if N == 1 or all((A[i + 1] - A[i] <= 1 for i in range(N - 1))):
			print('YES')
		else:
			print('NO')
main()


for _ in range(int(input())):
	n = int(input())
	array = list(map(int, input().strip().split()))
	odds = 0
	sumo = 0
	for i in array:
		sumo += i
		if i % 2 != 0:
			odds += 1
	if sumo % 2 != 0:
		print('YES')
		continue
	if odds > 0 and odds < n:
		print('YES')
	else:
		print('NO')


Q = int(input())
for i in range(Q):
	N = int(input())
	L = list(map(int, input().split()))
	L.sort()
	flag = 0
	for i in range(1, N):
		if L[i] - L[i - 1] > 1:
			flag = 1
	if flag == 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = int(input())
	l = list(map(int, input().split()))
	l1 = []
	for x in l:
		if x % 2 != 0:
			l1.append(x)
	s1 = len(l1)
	if s1 == 0 or (s1 == s and s % 2 == 0):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	ans = 'YES'
	string = [int(i) for i in input().split()]
	string.sort()
	prev = string.pop(0)
	for i in string:
		if i - prev > 1:
			ans = 'NO'
			break
		prev = i
	print(ans)


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline

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

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n').split(' ')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	n = val()
	l = [i & 1 for i in li()]
	if l.count(1):
		if l.count(1) & 1:
			print('YES')
		elif l.count(0):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def prov():
	for i in range(len(L) - 1):
		if L[i] % 2 == 1 and L[i + 1] % 2 == 0 or (L[i] % 2 == 0 and L[i + 1] % 2 == 1):
			return True
	return False
col = int(input())
for _ in range(col):
	n = input()
	L = list(map(int, input().split()))
	if sum(L) % 2 == 1:
		print('YES')
	elif prov():
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	size = int(input())
	elements = [int(x) for x in input().split()]
	if sum(elements) % 2 != 0:
		print('YES')
	else:
		c = 0
		for e in elements:
			if e % 2 != 0:
				c += 1
		if c == 0 or c == len(elements):
			print('NO')
		else:
			print('YES')


from math import gcd

def solve():
	t = int(input())
	for i in range(t):
		n = int(input())
		m = [int(s) for s in input().split()]
		k = 0
		s = 0
		for j in range(n):
			if m[j] % 2 != 0:
				k += 1
			s += m[j]
		if 0 < k < n or s % 2 != 0:
			print('YES')
		else:
			print('NO')
solve()


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	kk = 0
	if len(l) == 1:
		print('YES')
	else:
		for i in range(n - 1):
			if i == 0:
				if l[i + 1] - l[i] > 1:
					kk += 1
					break
			elif l[i + 1] - l[i] > 1:
				kk += 1
				break
		if l[n - 1] - l[n - 2] > 1:
			kk = 1
		if kk > 0:
			print('NO')
		else:
			print('YES')


import heapq

def one():
	return int(input())

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

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

def st():
	return input()
for i in range(one()):
	a = one()
	l = lis()
	even = False
	odd = False
	for j in l:
		if not even and j % 2 == 0:
			even = True
		if not odd and j % 2 == 1:
			odd = True
		if odd and even:
			break
	if odd and even:
		print('YES')
	elif len(l) % 2 == 1:
		if odd:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for q in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	x = n
	i = 0
	while i < n - 1:
		if arr[i] == arr[i + 1] or arr[i] + 1 == arr[i + 1]:
			x -= 1
		i += 1
	if x == 1:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
from heapq import heappush, heappop
from functools import lru_cache
import math
rl = lambda : stdin.readline()
rll = lambda : stdin.readline().split()
rli = lambda : map(int, stdin.readline().split())
rlf = lambda : map(float, stdin.readline().split())
(INF, NINF) = (float('inf'), float('-inf'))
MOD = 10 ** 9 + 7

def main():
	T = int(rl())
	for _ in range(T):
		n = int(rl())
		A = list(rli())
		A.sort()
		flag = False
		for i in range(1, len(A)):
			if A[i] - A[i - 1] > 1:
				flag = True
				break
		print('NO' if flag else 'YES')
	stdout.close()
main()


def solve():
	n = int(input())
	nums = sorted(list(map(int, input().split())))
	last = nums[0]
	for i in range(1, n):
		if nums[i] - last > 1:
			return 'NO'
		last = nums[i]
	return 'YES'
t = int(input())
for _ in range(t):
	print(solve())


t = int(input())
l = []
for _ in range(t):
	n = int(input())
	a = sorted([int(x) for x in input().split()])
	l = []
	for i in range(len(a)):
		for j in range(i + 1, len(a)):
			d = a[j] - a[i]
			if d <= 1:
				l.append(a[i])
				break
	if len(a) - len(l) == 1:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	a = list(sorted(set(map(int, input().split()))))
	flag = True
	while flag:
		if len(a) == 1:
			print('YES')
			flag = False
		elif abs(a[1] - a[0]) <= 1:
			a.remove(min(a[0], a[1]))
		else:
			print('NO')
			flag = False


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	flg = 1
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			print('NO')
			flg = 0
			break
	if flg:
		print('YES')


t = int(input())
while t > 0:
	n = int(input())
	arr = list(map(int, input().split()))
	o = e = 0
	flag = 0
	for i in arr:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if n % 2 == 1:
		if e == 0:
			flag = 1
	if e >= 1 and o >= 1:
		flag = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


n = int(input())

def func(n):
	size = int(input())
	new = list(map(int, input().split()))
	new.sort()
	mini = 0
	for i in range(len(new) - 1):
		if abs(new[i] - new[i + 1]) <= 1:
			continue
		else:
			return 'NO'
	return 'YES'
for i in range(n):
	print(func(n))


t = int(input())
b = []
for i in range(t):
	h = int(input())
	a = list(map(int, input().split()))
	sum1 = 0
	n = 0
	c = 0
	for i in range(len(a)):
		if a[i] % 2 == 0:
			c = 1
		if a[i] % 2 != 0:
			n = 1
	if c == 1 and n == 1:
		print('YES')
	elif c == 1:
		print('NO')
	elif n == 1 and h % 2 == 0:
		print('NO')
	else:
		print('YES')
print('\n'.join(b))


a = int(input())
while a:
	x = int(input())
	ls = list(map(int, input().split()))[:x]
	ls.sort()
	f = 'YES'
	for i in range(len(ls) - 1):
		if abs(ls[i] - ls[i + 1]) > 1:
			f = 'NO'
			break
	print(f)
	a -= 1


t = int(input())
for i in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	sum = 0
	odd = 0
	even = 0
	for j in li:
		if j % 2 != 0:
			odd = odd + 1
		else:
			even = even + 1
	flag = 0
	if len(li) % 2 == 0:
		if odd >= 1 and even >= 1:
			flag = 1
	elif odd >= 1:
		flag = 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	oddCount = 0
	for p in l:
		if p % 2 != 0:
			oddCount += 1
	if oddCount % 2 != 0:
		print('YES')
	elif oddCount % 2 == 0 and oddCount != n and (oddCount != 0):
		print('YES')
	else:
		print('NO')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007
for _ in range(stdint()):
	n = stdint()
	arr = list(stdarr())
	arr = sorted(arr)
	if n == 1:
		print('YES')
		continue
	pos = True
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			pos = False
			break
	if pos:
		print('YES')
	else:
		print('NO')


import io, os
from collections import deque
import bisect
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	a = int(input())
	l = RL()
	l.sort()
	flag = 1
	for i in range(1, a):
		if l[i - 1] == l[i] or l[i - 1] + 1 == l[i]:
			continue
		else:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	r = False
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			r = True
			break
	if r:
		print('NO')
	else:
		print('YES')


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

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

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from decimal import Decimal
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	n = int(data())
	a = sorted(mdata())
	k = 1
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			k = 0
			break
	if k:
		print('YES')
	else:
		print('NO')


test = int(input())
for _ in range(test):
	n = int(input())
	count = 0
	list1 = list(map(int, input().split()))
	if n == 1:
		print('YES')
	else:
		list1.sort()
		for k in range(n - 1):
			if abs(list1[k + 1] - list1[k]) > 1:
				count = 1
				break
		if count == 0:
			print('YES')
		else:
			print('NO')


n = int(input())
for i in range(n):
	a = int(input())
	b = [int(i) for i in input().split()]
	c = 0
	for j in range(0, len(b)):
		if b[j] % 2 != 0:
			c = c + 1
	d = len(b) - c
	if c % 2 != 0:
		print('Yes')
	elif c > 0 and d > 0:
		print('Yes')
	else:
		print('No')


from itertools import combinations
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sum_a = sum(a)
	ans = 'NO'
	if sum_a % 2 == 1:
		ans = 'YES'
	else:
		(flag_even, flag_odd) = (0, 0)
		for i in a:
			if i % 2 == 0:
				flag_even = 1
			else:
				flag_odd = 1
		if flag_even and flag_odd:
			ans = 'YES'
	print(ans)


t = int(input())
mas = [None] * t
for i in range(t):
	mas[i] = [int(input())]
	mas[i] += list(map(int, input().split()))
for i in range(t):
	kol = mas[i][0]
	cur = mas[i][1:]
	if sum(cur) % 2 == 1:
		print('YES')
		continue
	ch = cur[0] % 2
	flag = True
	for elem in cur[1:]:
		if elem % 2 != ch:
			flag = False
			break
	if flag:
		print('NO')
	else:
		print('YES')


for z in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	if sum(arr) % 2 != 0:
		print('YES')
		continue
	else:
		check = False
		for i in arr:
			if i % 2 != 0:
				check = True
				break
		if check == False:
			print('NO')
			continue
		elif check == True:
			newcheck = False
			for i in arr:
				if i % 2 == 0:
					newcheck = True
					break
			if newcheck:
				print('YES')
			else:
				print('NO')


case = int(input())
for i in range(case):
	odd = 0
	even = 0
	num = int(input())
	list1 = [int(v) for v in input().split()]
	for j in range(num):
		if list1[j] % 2 == 0:
			even += 1
		else:
			odd += 1
		if even != 0 and odd != 0:
			print('YES')
			break
		if j == num - 1:
			if odd % 2 == 1:
				print('YES')
			else:
				print('No')
		else:
			pass


import sys
lines = sys.stdin.readlines()
ntests = int(lines[0].rstrip())
for test in range(ntests):
	has_even = False
	has_odd = False
	n = int(lines[2 * test + 1])
	values = lines[2 * test + 2].split()
	for x in values:
		if int(x) % 2 == 0:
			has_even = True
		else:
			has_odd = True
		if has_even and has_odd:
			break
	if has_even and has_odd or (has_odd and n % 2 == 1):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline

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

def sieve(n):
	a = [1] * n
	for i in range(2, n):
		if a[i]:
			for j in range(i * i, n, i):
				a[j] = 0
	return a
for __ in range(int(input())):
	n = int(input())
	arr = sorted(I())
	diffs = []
	ans = 'YES'
	for i in range(n - 1):
		diffs.append(arr[i + 1] - arr[i])
		if arr[i + 1] - arr[i] > 1:
			ans = 'NO'
	print(ans)


from collections import Counter
for ti in range(int(input())):
	n = int(input())
	l1 = list(map(int, input().split(' ')))
	if sum(l1) % 2 == 1:
		print('YES')
	else:
		count1 = 0
		count2 = 0
		for i in l1:
			if i % 2 == 0:
				count1 = count1 + 1
			if i % 2 == 1:
				count2 = count2 + 1
		if count1 > 0 and count2 > 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	count = 0
	for i in range(n - 1):
		if abs(l[i] - l[i + 1]) <= 1:
			count += 1
	if count == n - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	data = list(map(int, input().split()))
	data = sorted(data)
	ndata = [1] * n
	for j in range(len(data) - 1):
		if data[j + 1] - data[j] <= 1:
			ndata[j] = 0
	if sum(ndata) > 1:
		print('NO')
	else:
		print('YES')


def solve(a):
	if len(a) == 1:
		return True
	a.sort()
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] >= 2:
			return False
	return True
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	if solve(a):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	lst = [int(i) for i in input().split()]
	lst.sort()
	flag = 0
	for i in range(n):
		if i + 1 < n and abs(lst[i] - lst[i + 1]) > 1:
			print('NO')
			flag = 1
			break
	if not flag:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split(' ')))
	if sum(l) % 2 != 0:
		print('YES')
	else:
		(c, d, k) = (0, 0, 0)
		for i in range(len(l)):
			if l[i] % 2 == 0:
				c = 1
			else:
				d = 1
			if c == 1 and d == 1:
				k = 1
				print('YES')
				break
		if k != 1:
			print('NO')


def check(arr, n):
	i = 0
	while len(arr) != 1:
		if abs(arr[i] - arr[i + 1]) > 1:
			return 'NO'
		arr.remove(min(arr[i], arr[i + 1]))
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	print(check(arr, n))


T = int(input())
for i in range(T):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	arr.sort()
	judge = 1
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			judge = 0
			break
	if judge:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	ar = [int(x) for x in input().split()]
	od = 0
	ev = 0
	sm = 0
	for j in ar:
		sm += j
		if j % 2 == 0:
			ev += 1
		else:
			od += 1
	if sm % 2 == 0:
		if ev != 0 and od != 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def ans(A):
	A = sorted(A)
	for i in range(len(A) - 1):
		if abs(A[i] - A[i + 1]) > 1:
			return 'NO'
	return 'YES'
	return A
T = int(input())
for t in range(T):
	input()
	A = list(map(int, input().split()))
	print(ans(A))


t = int(input())
res = []
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l, reverse=True)
	w = True
	for (x, y) in zip(l[:-1], l[1:]):
		if x - y > 1:
			w = False
			break
	if w:
		res.append('YES')
	else:
		res.append('NO')
for i in range(t):
	print(res[i])


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] <= 1:
			l[i] = None
	if n - l.count(None) == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for test in range(t):
	poss = True
	n = int(input())
	ar = [int(x) for x in input().split()]
	if n == 1:
		print('YES')
	else:
		ar.sort()
		for x in range(n - 1):
			if abs(ar[x] - ar[x + 1]) > 1:
				poss = False
				break
		if poss:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	n = int(input())
	arr = [int(elem) for elem in input().split()]
	(counter_even, counter_odd) = (0, 0)
	for elem in arr:
		if elem % 2 == 0:
			counter_odd += 1
		else:
			counter_even += 1
	if counter_even % 2 == 1 or counter_even * counter_odd > 0:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	m = int(input())
	l = list(map(int, input().split(' ')))
	j = 0
	f = 0
	for j in l:
		if j % 2 == 1:
			f = f + 1
	if f == 0:
		print('NO')
	elif f % 2 == 0:
		if f == m:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


for _ in range(int(input())):
	arr_len = int(input())
	arr = list(map(int, input().split()))
	f = 0
	arr.sort()
	if arr_len < 2:
		print('YES')
		continue
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] > 1:
			f = 1
			break
	if f:
		print('NO')
	else:
		print('YES')


t = int(input())
for case in range(t):
	n = int(input())
	a = [int(s) for s in input().split(' ')]
	a.sort()
	jumps = [a[i + 1] - a[i] for i in range(n - 1) if a[i + 1] - a[i] > 1]
	if len(jumps) > 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	k = 0
	rf = 0
	while k < n:
		if k != 0:
			if abs(a[k] - a[k - 1] > 1):
				rf = 1
		k += 1
	if rf == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	list1 = list(map(int, input().split()))
	length1 = len(list1)
	list2 = []
	list3 = []
	variable = 0
	for i in list1:
		if i % 2 == 0:
			list2.append(i)
		else:
			list3.append(i)
	if length1 % 2 != 0:
		if len(list3) != 0:
			print('YES')
		else:
			print('NO')
	elif len(list3) == 0 or len(list2) == 0:
		print('NO')
	else:
		print('YES')


tc = int(input())
for ip in range(tc):
	x = int(input())
	st = set(list(map(int, input().split())))
	s = list(st)
	if len(s) == 1:
		print('YES')
		continue
	p = 0
	s.sort()
	for n in range(1, len(s)):
		if s[n] - s[n - 1] != 1:
			p = 1
			break
	if p:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	numbers = int(input())
	list_ = list(map(int, input().split()))
	if numbers == 1:
		print('YES')
	else:
		list_.sort()
		a_list = list_[1:]
		b_list = list_[:-1]
		difference = []
		zip_object = zip(a_list, b_list)
		for (a_list_i, b_list_i) in zip_object:
			difference.append(a_list_i - b_list_i)
		if max(difference) > 1:
			print('NO')
		else:
			print('YES')


import sys
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def print(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer('\n')
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	ans = 'YES'
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			ans = 'NO'
			break
	print(ans)


for i in range(0, int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	b = sorted(b)
	k = 0
	c = 0
	d = 0
	while k < a - 1:
		if abs(b[k] - b[k + 1]) <= 1:
			c = c + 1
		else:
			d = d + 1
			break
		k += 1
	if d == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	nums = [int(x) for x in input().split()]
	if n == 1:
		print('YES')
	else:
		nums.sort()
		ans = 0
		for i in range(0, n - 1):
			if nums[i + 1] - nums[i] <= 1:
				ans += 1
		if ans == n - 1:
			print('YES')
		else:
			print('NO')


def run():
	tests_number = int(input())
	total = []
	for i in range(tests_number):
		even = False
		odd = False
		a = input()
		aux = [int(n) for n in input().split(' ')]
		for value in aux:
			if value % 2 == 0:
				even = True
			else:
				odd = True
			if even and odd:
				break
		if even and odd or (odd and (not even) and (len(aux) % 2 == 1)):
			total.append('YES')
		else:
			total.append('NO')
	for valor in total:
		print(valor)
run()


number = int(input())
count = 0
count_even = 0
count_odd = 0
for num in range(number):
	num_ = int(input())
	str_ = str(input()).split(' ')
	count = 0
	count_even = 0
	count_odd = 0
	for i in range(num_):
		if int(str_[i]) % 2 == 0:
			count_even += 1
		elif int(str_[i]) % 2 == 1:
			count_odd += 1
		count += int(str_[i])
	if count % 2 == 0:
		if count_even >= 1 and count_odd >= 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


import sys
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	arr = list(map(int, sys.stdin.readline().split()))
	check = sorted(arr)
	can = True
	for i in range(1, n):
		if check[i] - check[i - 1] > 1:
			can = False
			break
	if can:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	df = []
	if n == 1:
		print('YES')
		continue
	a.sort()
	chk = False
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			print('NO')
			chk = True
			break
	if chk == False:
		print('YES')


def check(numSet):
	if len(numSet) == 1:
		print('YES')
	elif numSet[1] - numSet[0] <= 1:
		numSet.remove(numSet[0])
		check(numSet)
	else:
		print('NO')
n = int(input())
for _ in range(n):
	input()
	numset = list(set(map(int, input().split())))
	numset.sort()
	check(list(numset))


t = int(input())
while t != 0:
	t = t - 1
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	res = 'YES'
	if len(a) != 1:
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				res = 'NO'
				break
	print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	l1 = [int(x) for x in input().split()]
	l1.sort()
	i = 0
	while i < len(l1) - 1 and l1[1 + i] - l1[i] <= 1:
		i += 1
	if i == len(l1) - 1:
		print('YES')
	else:
		print('NO')


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

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

def si():
	return input()

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

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

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

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

def main():
	for _ in range(ii()):
		c = 0
		n = ii()
		a = li()
		for i in range(n):
			if a[i] % 2 == 0:
				c += 1
		if c == n:
			print('NO')
		elif c == 0 and n % 2 == 0:
			print('NO')
		else:
			print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

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


t = int(input())
for tt in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	ok = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ok = False
			break
	if ok:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = [int(y) for y in input().split()]
	m = len(set(a))
	if m == 1:
		print('YES')
	else:
		f = 0
		a = sorted(a)
		for i in range(n - 1):
			if abs(a[i] - a[i + 1]) > 1:
				f = 1
				break
		if f == 0:
			print('YES')
		else:
			print('NO')


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

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

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

def getStr():
	return input()

def listStr():
	return list(input())
import collections as c

def solve():
	N = getInt()
	A = getInts()
	A.sort()
	for j in range(1, N):
		if A[j] - A[j - 1] > 1:
			return 'NO'
	return 'YES'
T = getInt()
for t in range(T):
	ans = solve()
	print(ans)


n = int(input())
for i in range(n):
	k = int(input())
	p = list(map(int, input().split()))
	p = sorted(p)
	s = 0
	for j in range(1, k):
		if p[j] - p[j - 1] > 1:
			s += 1
	if s > 0:
		print('NO')
	else:
		print('YES')


t = int(input())
while t > 0:
	flag = 0
	n = int(input())
	list1 = list(map(int, input().split()))[:n]
	list1.sort(reverse=True)
	for i in range(n - 1):
		if list1[i] - list1[i + 1] > 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')
	t -= 1


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

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

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

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

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

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

def main():
	t = II()
	for _ in range(t):
		n = II()
		aa = LI()
		if sum(aa) % 2:
			print('YES')
			continue
		odd = False
		even = False
		for a in aa:
			if a % 2:
				odd = True
			else:
				even = True
		if odd and even:
			print('YES')
		else:
			print('NO')
main()


test_cases = int(input())
for t in range(test_cases):
	n = int(input())
	f = 1
	l = list(map(int, input().split(' ')))
	l.sort()
	for i in range(len(l) - 1):
		d = l[i + 1] - l[i]
		if d == 0 or d == 1:
			pass
		else:
			f = 0
			break
	if f == 1:
		print('YES')
	else:
		print('NO')


a = int(input())
while a > 0:
	x = int(input())
	y = list(map(int, input().rstrip().split()))
	y.sort()
	s = ''
	for i in range(len(y) - 1):
		if y[i + 1] - y[i] > 1:
			s = '#'
			break
	if s == '#':
		print('NO')
	else:
		print('YES')
	a -= 1


def get_answer(a):
	a = sorted(a)
	for (curr_x, next_x) in zip(a, a[1:]):
		if next_x > curr_x + 1:
			return False
	return True

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = tuple(map(int, input().split()))
		can_remain_one_element = get_answer(a)
		output = 'YES' if can_remain_one_element else 'NO'
		print(output)
main()


import sys
input = sys.stdin.readline

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

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

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

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

def foo():
	n = inp()
	lst = inlt()
	lst.sort()
	for i in range(1, n):
		if abs(lst[i] - lst[i - 1]) > 1:
			print('NO')
			return
	print('YES')
t = inp()
for i in range(t):
	foo()


t = int(input())
for j in range(t):
	n = int(input())
	L = map(int, input().split())
	L = list(L)
	K = []
	for i in L:
		K = K + [i]
	K = sorted(K)
	k = 0
	for i in range(n - 1):
		if K[i] < K[i + 1] - 1:
			k = 1
			break
	if k == 0:
		print('YES')
	else:
		print('NO')


def func(lt):
	ectr = 0
	octr = 0
	for i in lt:
		if i % 2 == 0:
			ectr += 1
		else:
			octr += 1
		if ectr >= 1 and octr >= 1:
			return 'YES'
	if ectr == 0:
		if len(lt) % 2 == 0:
			return 'NO'
		else:
			return 'YES'
	elif octr == 0:
		return 'NO'
tc = int(input())
for i in range(0, tc):
	input()
	lt = list(map(lambda a: int(a), input().split(' ')))
	print(func(lt))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	END = False
	while not END:
		END = True
		i = 1
		while i < len(a):
			if abs(a[i] - a[i - 1]) <= 1:
				if a[i] > a[i - 1]:
					a.pop(i - 1)
				else:
					a.pop(i)
				END = False
			else:
				i += 1
	if len(a) == 1:
		print('YES')
	else:
		print('NO')


for case in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	a = sorted(a)
	ans = 'NO'
	i = 0
	while i != len(a) - 1:
		if a[i] == a[i + 1] or a[i] + 1 == a[i + 1]:
			a = a[1:]
		else:
			i += 1
	if len(a) == 1:
		ans = 'YES'
	print(ans)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 != 0:
		print('YES')
		continue
	odd = 0
	for i in arr:
		if i % 2 != 0:
			odd += 1
	if odd == 0:
		print('NO')
		continue
	if odd % 2 == 0:
		if n - odd > 0:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


try:
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		if n == 1:
			print('YES')
			continue
		flag = True
		x = sorted(a)
		for i in range(1, n):
			if x[i] - x[i - 1] > 1:
				flag = False
				break
		if flag == True:
			print('YES')
		else:
			print('NO')
except:
	pass


def sol(arr):
	for i in range(n - 1):
		if arr[i + 1] - arr[i] > 1:
			print('NO')
			return
	print('YES')
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	sol(arr)


import math
from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	if len(a) == 1:
		print('YES')
	else:
		a.sort()
		tmp = n
		for x in range(1, n):
			if a[x] - a[x - 1] <= 1:
				tmp -= 1
		if tmp == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	prev = arr[0]
	mark = True
	for i in arr:
		if i - prev > 1:
			mark = False
		prev = i
	if mark:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	v = 0
	f = 0
	for i in l:
		if i % 2 != 0:
			v = v + 1
		else:
			f = f + 1
	if v % 2 != 0:
		print('YES')
	elif v % 2 == 0 and v > 0 and (f > 0):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	len_arr = int(input())
	mod = [0, 0]
	for i in map(int, input().split()):
		mod[i % 2] += 1
	if mod[1] == 0:
		print('NO')
	elif mod[0] == 0:
		print('YES' if len_arr % 2 else 'NO')
	else:
		print('YES')


results = []
tests = int(input())
for _x in range(tests):
	n = int(input())
	a = list((int(item) for item in input().split()))[:n]
	a.sort()
	ok = True
	for i in range(1, len(a)):
		if a[i] - a[i - 1] > 1:
			ok = False
			break
	if ok:
		results.append('YES')
	else:
		results.append('NO')
print(*results, sep='\n')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l = sorted(l)
	cp = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			cp = -1
	if cp == -1:
		print('NO')
	else:
		print('YES')


def odd(arr, n):
	res = sum(arr)
	if res % 2 != 0:
		return True
	else:
		if arr.count(arr[0]) == n:
			return False
		if n % 2 == 0:
			odd = even = 0
			for i in range(n):
				if arr[i] % 2 == 0:
					even = 1
				else:
					odd = 1
				if odd == 1 and even == 1:
					return True
			return False
		else:
			for i in range(n):
				if arr[i] % 2 != 0:
					return True
			return False
t = int(input())
output = []
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))[:n]
	if odd(arr, n):
		output.append('YES')
	else:
		output.append('NO')
for i in output:
	print(i)


n = int(input())
for t in range(n):
	l = []
	ln = int(input())
	s = input().split()
	for i in s:
		l.append(int(i))
	l.sort()
	for i in range(0, ln - 1):
		if l[i + 1] - l[i] > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	lst = [int(i) for i in input().split() if int(i) % 2 != 0]
	if n % 2 == 0:
		if len(lst) != n and len(lst) != 0:
			print('YES')
		else:
			print('NO')
	elif len(lst) == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	x = int(input())
	amr = list(map(int, input().split()))
	amr.sort()
	flag = True
	for i in range(1, x):
		if amr[i] - amr[i - 1] <= 1:
			continue
		else:
			flag = False
			break
	print('YES' if flag == True else 'NO')


t = int(input())
for q in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	c = 0
	for i in range(0, n - 1):
		j = i + 1
		if abs(a[i] - a[j]) <= 1:
			a[a.index(min(a[i], a[j]))] = 105
	if n - a.count(105) == 1:
		print('YES')
	else:
		print('NO')


def solve():
	for _ in range(ii()):
		n = ii()
		a = sorted(li())
		if n == 1:
			print('YES')
			continue
		ha = False
		ini = a[0]
		for ai in a[1:]:
			if ai - ini > 1:
				ha = True
				break
			else:
				ini = ai
		print('NO' if ha else 'YES')
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())
si = lambda : input()
solve()


t = int(input())
for i in range(t):
	n = int(input())
	array = list(map(int, input().split()))
	evens = []
	odds = []
	for i in array:
		if i % 2 == 0:
			evens.append(i)
		else:
			odds.append(i)
	if not odds:
		print('NO')
		continue
	if len(odds) % 2 != 0:
		print('YES')
		continue
	if not evens:
		print('NO')
	else:
		print('YES')


def func(arr: set) -> str:
	a = min(arr)
	b = max(arr)
	new_arr = sorted(arr)
	for i in range(1, len(new_arr)):
		if new_arr[i] >= new_arr[i - 1] + 2:
			return 'No'
	return 'Yes'
T = int(input())
val = list(str())
for _ in range(T):
	n = int(input())
	val.append(func(set(map(int, input().split()))))
for v in val:
	print(v)


for i in range(0, int(input())):
	c = 0
	n = int(input())
	a = []
	a = [int(x) for x in input().split()]
	a.sort()
	i = 1
	while i < n:
		if a[i] - a[i - 1] > 1:
			c = 1
		i += 1
	if c == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	flag = True
	i = j = 0
	while i < n:
		if arr[i] % 2 != 0:
			flag = False
			j += 1
		i += 1
	if flag:
		print('NO')
	elif not flag and j == n and (n % 2 == 0):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	a = sorted([int(_) for _ in input().split()])
	for (x, y) in zip(a, a[1:]):
		if abs(x - y) > 1:
			print('NO')
			break
	else:
		print('YES')


for i in range(int(input())):
	s = int(input())
	t = list(map(int, input().split()))
	(odd, even, suma) = (0, 0, 0)
	for elem in t:
		if elem % 2:
			odd += 1
		else:
			even += 1
		suma += elem
	if suma % 2:
		print('YES')
	elif even == 0 or odd == 0:
		print('NO')
	else:
		print('YES')


n = int(input())
count = 0
for i in range(0, n):
	m = int(input())
	num = list(map(int, input().split()))
	num.sort()
	for j in range(0, m - 1):
		if num[j + 1] - num[j] == 0 or num[j + 1] - num[j] == 1:
			count += 1
	if count == m - 1:
		print('YES')
	else:
		print('NO')
	count = 0


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	ans = 0
	i = 0
	k = len(a)
	while i < k - 1:
		if a[i + 1] == a[i]:
			ans += 1
			i += 1
		elif a[i + 1] - a[i] == 1:
			ans += 1
			i += 1
		else:
			i += 1
	if len(a) - ans == 1:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	x = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	flag = False
	for j in range(len(a) - 1):
		if a[j + 1] - a[j] > 1:
			print('NO')
			flag = True
			break
	if flag == False:
		print('YES')


def solve():
	n = int(input())
	a = sorted(list(map(int, input().split())))
	res = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			res = False
			break
	print('YES' if res else 'NO')
for _ in range(int(input().strip())):
	solve()


import sys
input = sys.stdin.readline
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
SI = lambda : input().strip('\n')
II = lambda : int(input())
for _ in range(II()):
	n = II()
	a = sorted(MI())
	ok = True
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			ok = False
	print('YES' if ok else 'NO')


from collections import defaultdict, deque

def main():
	t = int(input())
	for c in range(t):
		n = int(input())
		ar = list(sorted(map(int, input().split(' '))))
		print('YES' if len([i for i in range(n) if i + 1 < n and ar[i + 1] - ar[i] > 1]) == 0 else 'NO')
main()


from sys import stdin

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

def r_t(tp):
	return map(tp, r().strip().split())

def r_l(tp):
	return list(r_t(tp))

def solve(n, A):
	A.sort()
	for i in range(n - 1):
		if abs(A[i] - A[i + 1]) > 1:
			return 'NO'
	return 'YES'

def main():
	cases = int(r())
	for _ in range(cases):
		n = int(r())
		A = r_l(int)
		print(solve(n, A))
main()


import sys
from sys import stdin
import math

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

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

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

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

def fminput():
	return map(int, stdin.readline().strip().split())

def flinput():
	return list(map(int, stdin.readline().strip().split()))
for _ in range(iinput()):
	n = iinput()
	list1 = linput()
	c1 = 0
	c2 = 0
	c3 = 0
	list1.sort()
	for i in range(n - 1):
		if abs(list1[i] - list1[i + 1]) == 1:
			c2 += 1
		elif abs(list1[i] - list1[i + 1]) == 0:
			c1 += 1
		else:
			c3 += 1
	if c3 > 0:
		print('NO')
	else:
		print('YES')


def remove_smallest():
	matchCount = int(input())
	outerCount = 1
	outputList = []
	while outerCount <= matchCount:
		numberList = []
		listCount = int(input())
		innerCount = 1
		numberList = [int(num) for num in input().split()]
		check_remove_smallest_possible(numberList, outputList)
		outerCount = outerCount + 1
	for result in outputList:
		print(result)

def check_remove_smallest_possible(numberList, outputList):
	if len(numberList) == 1:
		outputList.append('YES')
	else:
		numberListModofied = list(set(numberList))
		numberListModofied.sort()
		if len(numberListModofied) == 1:
			outputList.append('YES')
		i = 0
		j = 1
		while j < len(numberListModofied) and len(numberListModofied) > 1:
			if abs(numberListModofied[i] - numberListModofied[j]) != 1:
				outputList.append('NO')
				break
			else:
				i = i + 1
				j = j + 1
				if j == len(numberListModofied):
					outputList.append('YES')
remove_smallest()


import sys
from functools import lru_cache
from collections import defaultdict

def solve(arr):
	if len(arr) == 1:
		return True
	arr.sort()
	for (a, b) in zip(arr, arr[1:]):
		if a == b:
			continue
		elif a == b - 1:
			continue
		return False
	return True

def main(mat):
	for a in mat:
		if solve(a):
			print('YES')
		else:
			print('NO')
mat = []
for (e, line) in enumerate(sys.stdin.readlines()):
	if e == 0:
		continue
	elif e % 2 == 0:
		mat.append(list(map(int, line.strip().split())))
main(mat)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort(reverse=True)
	p = 0
	q = 0
	for j in range(n - 1):
		if a[j] - a[j + 1] > 1:
			p = p + 1
		else:
			q = q + 1
	if p > 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(map(int, input().split()))
	for (a1, a2) in zip(a[:-1], a[1:]):
		if a2 - a1 > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for i in range(0, t):
	n = int(input())
	ev = 0
	od = 0
	a = [int(x) for x in input().split(' ')]
	for j in range(0, n):
		if a[j] % 2 != 0:
			od += 1
		else:
			ev += 1
	if ev > 0 and od > 0:
		print('YES')
	elif ev == 0 and n % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for T in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.sort()
	flag = True
	for i in range(n - 1):
		if ar[i + 1] - ar[i] > 1:
			flag = False
			break
	if flag == True:
		print('Yes')
	else:
		print('No')


def read():
	return [int(x) for x in input().split()]
(cas,) = read()
for _ in range(cas):
	(n,) = read()
	x = sorted(read())
	f = True
	for i in range(1, n):
		if x[i] > x[i - 1] + 1:
			f = False
	print('YES' if f else 'NO')


for _ in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	k = int(0)
	for x in b:
		if x % 2 == 0:
			k = k + 1
	if k == 0 and a % 2 == 0:
		print('NO')
	elif k == 0 and a % 2 != 0:
		print('YES')
	elif k == a:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = input()
	x = list((int(i) for i in input().split()))
	x.sort()
	for i in range(1, len(x)):
		if x[i] > x[i - 1]:
			if x[i] - x[i - 1] != 1:
				print('NO')
				break
	else:
		print('YES')


for i in range(int(input())):
	l = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	fl = 0
	if len(arr) == 2:
		if arr[1] - arr[0] > 1:
			print('NO')
		else:
			print('YES')
	elif len(arr) == 1:
		print('YES')
	else:
		for i in range(1, len(arr)):
			if arr[i] - arr[i - 1] > 1:
				print('NO')
				fl = 1
				break
		if fl == 0:
			print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	li.sort()
	ok = 'YES'
	for j in range(1, n):
		if li[j] - li[j - 1] > 1:
			ok = 'NO'
	print(ok)


T = int(input())
for j in range(T):
	n = int(input())
	a = 0
	l = [int(x) for x in input().split()]
	for i in l:
		if i % 2 != 0:
			a = a + 1
	if a == n and a % 2 == 0 or a == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	t = int(input())
	a = list(map(int, input().strip().split()))[:t]
	e = 0
	f = 0
	for i in range(t):
		if a[i] % 2 == 0:
			e = e + 1
		else:
			f = f + 1
	if t % 2 == 0 and (e == t or f == t):
		print('NO')
	elif t % 2 != 0 and e == t:
		print('NO')
	else:
		print('YES')


t = int(input())
for x in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	p = 0
	c = 0
	while len(a) > 1:
		if a[1] - a[0] <= 1:
			a.pop(0)
		else:
			break
	if len(a) > 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a1 = input().split()
	a = []
	for i in a1:
		a.append(int(i))
	a.sort()
	for i in range(n - 1):
		if a[i + 1] - a[i] <= 1:
			continue
		else:
			print('NO')
			break
	else:
		print('YES')


import math
import functools

def test(data):
	if sum(data) % 2 == 1:
		return True
	contains_even = False
	contains_odd = False
	for item in data:
		if item % 2 == 0:
			contains_even = True
		if item % 2 == 1:
			contains_odd = True
	if contains_even and contains_odd:
		return True
	return False
T = int(input())
for i in range(T):
	length = int(input())
	data = list(map(int, input().split()))
	if test(data) == True:
		print('YES')
	else:
		print('NO')


a = int(input())
for x in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	c.sort()
	p = 0
	for x in range(b - 1):
		if abs(c[x] - c[x + 1]) < 2:
			p += 1
		else:
			break
	if p == b - 1:
		print('YES')
	else:
		print('NO')


tc = int(input())
for ctr in range(tc):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	q = int(input())
	a = list(map(int, input().split()))
	odd = 0
	for item in a:
		if item % 2 == 1:
			odd += 1
	if odd == 0:
		print('NO')
	elif odd % 2 == 1:
		print('YES')
	elif odd == q:
		print('NO')
	else:
		print('YES')


import sys
import math
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	n = inp()
	ara = inara()
	ara.sort()
	flag = True
	for i in range(1, n):
		flag &= ara[i] - ara[i - 1] <= 1
	if flag:
		print('YES')
	else:
		print('NO')


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def isPowerOfTwo(x):
	return x and (not x & x - 1)

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

def Golomb(n):
	dp = [0] * (n + 1)
	dp[1] = 1
	for i in range(2, n + 1):
		dp[i] = 1 + dp[i - dp[dp[i - 1]]]
	return dp[1:]

def solve(leftAllowed, leftLast, ix, movesLeft, dp, a):
	if dp[leftAllowed][leftLast][ix] != -1:
		return dp[leftAllowed][leftLast][ix]
	if movesLeft == 0:
		return 0
	res = 0
	if leftLast == 0 and ix > 0 and (leftAllowed > 0):
		res = max(res, solve(leftAllowed - 1, 1, ix - 1, movesLeft - 1, dp, a) + a[ix - 1])
	res = max(res, solve(leftAllowed, 0, ix + 1, movesLeft - 1, dp, a) + a[ix + 1])
	dp[leftAllowed][leftLast][ix] = res
	return dp[leftAllowed][leftLast][ix]
MOD = 1000000007
PMOD = 998244353
T = 1
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().rstrip().split()))
	if n == 1:
		print('YES')
		continue
	a.sort()
	flag = True
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) > 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	vec = list(map(int, input().split()))
	vec.sort()
	ok = True
	for i in range(1, n):
		ok &= vec[i] - vec[i - 1] <= 1
	print('YES' if ok else 'NO')


w = int(input())
for _ in range(w):
	n = int(input())
	a = list(map(int, input().split()))[:n]
	if sum(a) % 2 != 0:
		print('YES')
	else:
		e = 0
		for ele in a:
			if ele % 2 != 0:
				e += 1
		if e != 0 and e % 2 == 0 and (len(a) > e):
			print('YES')
		else:
			print('NO')


import io
import os
import sys
from atexit import register
import random
import math
import itertools
DEBUG = False
STRESSTEST = False
if not DEBUG:
	input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
sys.stdout = io.BytesIO()
register(lambda : os.write(1, sys.stdout.getvalue()))
tokens = []
tokens_next = 0

def nextStr():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = input().split()
		tokens_next = 0
	tokens_next += 1
	if type(tokens[tokens_next - 1]) == str:
		return tokens[tokens_next - 1]
	return tokens[tokens_next - 1].decode()

def nextInt():
	return int(nextStr())

def nextIntArr(n):
	return [nextInt() for i in range(n)]

def print(*argv, end='\n'):
	for arg in argv:
		sys.stdout.write((str(arg) + ' ').encode())
	sys.stdout.write(end.encode())

def genTestCase():
	raise NotImplementedError

def bruteforce(a):
	raise NotImplementedError

def doStressTest():
	while True:
		curTest = genTestCase()
		mySoln = solve(curTest)
		bruteforceSoln = bruteforce(curTest)
		if mySoln != bruteforceSoln:
			print('### Found case ###')
			print(curTest)
			print(f'{mySoln} should have been: {bruteforceSoln}')
			return

def solve(a):
	if sum(a) % 2 != 0:
		return True
	if all((i % 2 == 0 for i in a)):
		return False
	if any((i % 2 == 0 for i in a)):
		return True
	return False
if not DEBUG and STRESSTEST:
	raise Exception('Wrong flags!')
if STRESSTEST:
	doStressTest()
else:
	t = nextInt()
	for _ in range(t):
		a = nextIntArr(nextInt())
		res = solve(a)
		print('YES' if res else 'NO')
sys.stdout.flush()


for _ in range(int(input().strip(' '))):
	l = int(input().strip(' '))
	a = list(map(int, input().strip(' ').split(' ')))
	(i, j) = (0, 0)
	a.sort()
	posssible = True
	while i < len(a) and j < len(a) - 1:
		if a[j + 1] - a[i] <= 1:
			posssible = True
		else:
			posssible = False
			break
		i += 1
		j += 1
	if posssible:
		print('YES')
	else:
		print('NO')


CORRECT = 'YES'
INCORRECT = 'NO'

def solve(string):
	numbers = [int(i) for i in string.split()]
	if len(numbers) == 1:
		return CORRECT
	numbers.sort()
	last_number = numbers[0]
	for current_number in numbers[1:]:
		if abs(current_number - last_number) > 1:
			return INCORRECT
		last_number = current_number
	return CORRECT
t = int(input())
result = list()
for _ in range(t):
	n = input()
	result.append(solve(input()))
print('\n'.join(result))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	arr = list(map(int, input().strip().split()))
	arr = sorted(arr)
	ele = arr[0]
	flag = 0
	for i in range(1, n):
		if arr[i] - ele > 1:
			print('NO')
			flag = 1
			break
		ele = arr[i]
	if flag == 0:
		print('YES')


T = int(input())
for t in range(T):
	N = int(input())
	x = list(map(int, input().split()))
	x.sort()
	count = 0
	ans = [abs(x[n] - x[n - 1]) for n in range(1, len(x))]
	for k in range(len(ans)):
		if ans[k] > 1:
			count += 1
	if count >= 1:
		print('NO')
	else:
		print('YES')


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

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

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

def invr():
	return map(int, input().split())
n = inp()
for _ in range(n):
	m = inp()
	l = inlt()
	l.sort()
	t = 1
	prev = l[0]
	cnt = 0
	while t < m:
		if prev != -1 and l[t] > prev + 1:
			cnt += 1
		prev = l[t]
		t += 1
	if cnt > 0:
		print('NO')
	else:
		print('YES')


t = int(input().strip())
for _ in range(t):
	n = int(input().strip())
	(evens, odds) = (0, 0)
	arr = list(map(int, input().split()))
	for n in arr:
		if n % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds % 2 == 1 or (odds > 0 and evens > 0):
		print('YES')
	else:
		print('NO')


t = int(input())
import collections as c
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a.sort()
	tr = 1
	b = []
	for i in range(1, n):
		b.append(abs(a[i] - a[i - 1]))
	for i in b:
		if i > 1:
			tr = 0
			break
	if tr == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for T in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	odd = 0
	ans = 'NO'
	for i in range(n):
		if l[i] % 2:
			odd += 1
	if odd % 2 == 1:
		ans = 'YES'
	if odd > 0 and n > 2 and (odd != n):
		ans = 'YES'
	print(ans)


queries = int(input())
for i in range(queries):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr.sort()
	flag = True
	for i in range(1, n):
		if arr[i] - arr[i - 1] > 1:
			flag = False
			break
	print(['NO', 'YES'][flag])


def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('Yes')
		return
	if n % 2 == 1:
		for i in range(n):
			if arr[i] % 2 == 1:
				print('Yes')
				return
		print('No')
	else:
		flage = 0
		flago = 0
		for i in range(n):
			if arr[i] % 2 == 0:
				flage = 1
			else:
				flago = 1
			if flage and flago:
				print('Yes')
				return
		print('No')
t = int(input())
while t:
	solve()
	t = t - 1


def answer(A):
	A.sort()
	if len(A) == 1:
		return True
	if len(A) == 2:
		return A[1] - A[0] <= 1
	else:
		diff_a = []
		for i in range(0, len(A) - 1):
			if A[i + 1] - A[i] <= 1:
				del A[i]
				return answer(A)
			else:
				continue
	return False
T = int(input())
for i in range(0, T):
	N = input()
	l = list(map(int, input().strip().split()))
	print('YES' if answer(l) else 'NO')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(n - 1):
		d = abs(l[i + 1] - l[i])
		if d >= 2:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted(list(map(int, input().split())))
	b = a.copy()
	for i in range(n - 1):
		if abs(a[i + 1] - a[i]) > 1:
			print('NO')
			break
	else:
		print('YES')


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
t = int(input())
while t:
	t -= 1
	input()
	ls = list(map(int, input().split()))
	ls.sort()
	for i in range(1, len(ls)):
		if ls[1] - ls[0] <= 1:
			ls.pop(0)
		else:
			print('NO')
			break
	if len(ls) == 1:
		print('YES')


import math
t = int(input())
for case in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if a[i] - a[i - 1] > 1:
				print('NO')
				break
		else:
			print('YES')


T = int(input())
for I in range(0, T):
	X = input()
	Y = sorted(list(map(int, input().split(' '))))
	Z = 'YES'
	for J in range(1, len(Y)):
		if Y[J] - Y[J - 1] > 1:
			Z = 'NO'
			break
	print(Z)


for _ in range(int(input())):
	n = int(input())
	if n == 1:
		input()
		print('Yes')
		continue
	a = list(map(int, input().split()))
	a.sort()
	flag = True
	for i in range(n - 1):
		if a[i + 1] - a[i] > 1:
			flag = False
	if flag:
		print('Yes')
	else:
		print('No')


def main():
	n = int(input())
	mass = list(map(int, input().split(' ')))
	mass.sort()
	i = 1
	flag = True
	while i < len(mass):
		if abs(mass[i - 1] - mass[i]) > 1:
			print('NO')
			flag = False
			i = len(mass)
		i += 1
	if flag:
		print('YES')
cont = int(input())
for i in range(cont):
	main()


for t in range(int(input())):
	n = int(input())
	arr = sorted(list(map(int, input().split())))
	flg = True
	for i in range(1, n):
		if abs(arr[i] - arr[i - 1]) > 1:
			flg = False
			break
	if flg:
		print('YES')
	else:
		print('NO')


def small(a, b):
	c = len(a)
	d = a[0]
	for i in range(0, b):
		if abs(a[i] - d) >> 1:
			return 'NO'
		d = a[i]
	return 'YES'
for i in range(int(input())):
	b = int(input())
	e = list(map(int, input().split()))
	e.sort()
	print(small(e, b))


def remove_smallest(n, a):
	if n == 1:
		return 'YES'
	else:
		a.sort()
		for i in range(n - 1):
			if a[i + 1] - a[i] > 1:
				return 'NO'
		return 'YES'
test_cases = int(input())
for _ in range(test_cases):
	n = input()
	a = [int(i) for i in input().split()]
	print(remove_smallest(len(a), a))


from sys import stdin, stdout
from math import gcd
input = stdin.readline
print = stdout.write

def gcda(l):
	if len(l) == 0:
		return 1
	res = l[0]
	for i in range(1, len(l)):
		res = gcd(res, l[i])
	return res
t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	for i in range(1, n):
		if l[i - 1] + 1 < l[i]:
			print('NO')
			break
	else:
		print('YES')
	print('\n')


t = int(input())
for i in range(t):
	n = int(input())
	d = input().split(' ')
	for j in range(n):
		d[j] = int(d[j])
	d = sorted(d)
	if n == 1:
		print('YES')
		continue
	vis = 0
	for j in range(n - 1):
		if d[j + 1] - d[j] > 1:
			vis = 1
	if vis == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	sum = 0
	a = list(map(int, input().split()))
	o = False
	e = False
	for i in a:
		sum += i
		if i % 2 == 0:
			e = True
		else:
			o = True
	if sum % 2 != 0:
		print('YES')
		continue
	if o and e:
		print('YES')
		continue
	print('NO')


t = int(input())
import math
while t > 0:
	t -= 1
	n = int(input())
	l = list(map(int, input().split()))
	i = 0
	j = 0
	l.sort()
	while i < len(l) - 1:
		if abs(l[i] - l[i + 1]) <= 1:
			l.pop(i)
		else:
			i += 1
	if j == 0 and len(l) == 1:
		print('YES')
	else:
		print('NO')


def func(a, b):
	if len(b) == 1:
		return 25
	else:
		ind = b[0]
		del b[0]
		if ind + 1 in b or ind in b:
			return func(a - 1, b)
		else:
			return 26
t = int(input())
for g in range(t):
	len_1 = int(input())
	list_1 = list(map(int, input().split()))
	list_1.sort()
	h = func(len_1, list_1)
	if h == 25:
		print('YES')
	else:
		print('NO')


for _ in [0] * int(input()):
	n = int(input())
	k = 0
	summ = 0
	for i in map(int, input().split()):
		if i % 2:
			k += 1
		summ += i
	print('YES' if summ % 2 or (k != n and k > 0) else 'NO')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	if len(arr) == 1 or len(set(arr)) == 1:
		print('YES')
	else:
		max = 0
		for i in range(len(arr) - 1):
			current_max = arr[i + 1] - arr[i]
			if current_max > max:
				max = current_max
		if max > 1:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	n = int(input())
	v = list(map(int, input().split()))
	v.sort()
	a = [0]
	for i in range(1, len(v)):
		a.append(v[i] - v[i - 1])
	flag = 0
	for i in a:
		if i > 1 or i < -1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	a = True
	p = l[0]
	for i in l:
		if i - p > 1:
			a = False
			break
		p = i
	print('YES' if a == True else 'NO')


def print_solution(arr):
	arr_sum = sum(arr)
	if arr_sum % 2 == 1:
		print('YES')
		return
	odd = []
	even = []
	for (i, el) in enumerate(arr):
		if el % 2 == 0:
			even.append(i)
		else:
			odd.append(i)
	if len(even) == 0 and len(odd) % 2 == 0 or len(even) == len(arr):
		print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(lambda x: int(x), input().strip().split()))
	print_solution(arr)


def solve(n, arr):
	arr.sort()
	for i in range(n - 1):
		if abs(arr[i] - arr[i + 1]) <= 1:
			continue
		return 'No'
	return 'Yes'
for i in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	print(solve(n, arr))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	key = 0
	for i in range(1, n):
		if l[i] - l[i - 1] >= 2:
			key = 1
			print('NO')
			break
	if key == 0:
		print('YES')


t = int(input())
for tt in range(t):
	n = int(input())
	a = input().split(' ')
	k = 0
	for aa in range(len(a)):
		a[aa] = int(a[aa])
		if a[aa] % 2 == 1:
			k += 1
	if k % 2 == 1:
		print('YES')
	elif k != n and k != 0:
		print('YES')
	elif k == 0:
		print('NO')
	else:
		print('NO')


for x in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	ans = 'YES'
	for i in range(1, n):
		if a[i] - a[i - 1] <= 1:
			continue
		else:
			ans = 'NO'
	print(ans)


def test(inputArray):
	if len(inputArray) <= 1:
		return True
	L = [i for i in set(inputArray)]
	L.sort()
	for i in range(len(L) - 1):
		if L[i + 1] - L[i] >= 2:
			return False
	return True
numberOfInputs = int(input())
for rounds in range(numberOfInputs):
	l = input()
	array = [int(i) for i in input().split(' ')]
	if test(array):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	(count1, count2) = (0, 0)
	s = sum(l)
	for i in range(len(l)):
		if l[i] % 2 == 0:
			count1 += 1
		else:
			count2 += 1
	if s % 2 == 0 and (count1 == len(l) or count2 == len(l)):
		print('NO')
	else:
		print('YES')
	t = t - 1


t = int(input())
for i in range(t):
	a = int(input())
	arr = [int(x) for x in input().split()]
	temp = arr.sort()
	possible = True
	for j in range(a - 1):
		if abs(arr[j] - arr[j + 1]) > 1:
			possible = False
			break
	if possible == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	odd = 0
	even = 0
	for j in l:
		if j % 2 == 1:
			odd += 1
		else:
			even += 1
	if odd % 2 == 1:
		print('YES')
	elif odd >= 1 and odd % 2 == 0 and (even >= 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	f = 0
	s = int(input())
	arr = list(map(int, input().split()))
	for j in arr:
		if j % 2 != 0:
			f += 1
	if (f % 2 != 0 or len(arr) > f) and f != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	odd = 0
	eve = 0
	for i in a:
		if i % 2 == 0:
			eve += 1
		else:
			odd += 1
	if eve == 0 and odd % 2 == 0 or odd == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	o = 0
	e = 0
	if n % 2 == 0:
		for i in A:
			if i % 2 == 1:
				o = 1
			if i % 2 == 0:
				e = 1
		if o == 1 and e == 1:
			print('YES')
		else:
			print('NO')
	else:
		for i in A:
			if i % 2 == 1:
				o = 1
				break
		if o == 1:
			print('YES')
		else:
			print('NO')


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

def si():
	return input()

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

def li():
	return list(mi())
import math
for _ in range(ii()):
	c = 0
	n = ii()
	a = li()
	for i in a:
		if i % 2:
			c += 1
	d = n - c
	if sum(a) % 2:
		print('YES')
	elif d and c:
		print('YES')
	else:
		print('NO')


def solve():
	T = int(input())
	for t in range(T):
		n = int(input())
		ip = input().split()
		a = [int(x) for x in ip]
		(e, o) = (0, 0)
		for i in range(n):
			if a[i] % 2 == 0:
				e += 1
			else:
				o += 1
		if o % 2 != 0:
			print('YES')
			continue
		elif o == 0:
			print('NO')
			continue
		elif e == 0 and o > 0 and (o % 2 == 0):
			print('NO')
			continue
		elif e > 0 and o > 0 and (o % 2 == 0):
			print('YES')
			continue
		else:
			print('NO')
			continue
solve()


nb_tests = int(input())
for _ in range(nb_tests):
	n = int(input())
	a = input().split()
	branches = [[int(a[0])]]
	for i in range(1, n):
		cur = int(a[i])
		found = False
		for (j, branch) in enumerate(branches):
			if branch[0] - 1 <= cur <= branch[-1] + 1:
				found = True
				if cur == branch[0] - 1:
					merged = False
					if j > 0:
						if cur == branches[j - 1][-1] + 1:
							merged_branch = [branches[j - 1][0], branch[1]]
							branches[j - 1] = merged_branch
							del branches[j]
							merged = True
					if not merged:
						branches[j] = [cur, branch[-1]]
					break
				elif cur == branch[-1] + 1:
					merged = False
					if j < len(branches) - 1:
						if cur == branches[j + 1][0] - 1:
							merged_branch = [branch[0], branches[j + 1][-1]]
							branches[j] = merged_branch
							del branches[j + 1]
							merged = True
					if not merged:
						branches[j] = [branch[0], cur]
					break
		if not found:
			branches.append([cur])
			branches.sort()
	result = 'YES' if len(branches) == 1 else 'NO'
	print(result)


def sol(b, n):
	b.sort()
	for i in range(1, n):
		if b[i] - b[i - 1] > 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(sol(a, n))


def getAns(n, a):
	a.sort()
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			return 'NO'
	return 'YES'

def main():
	t = int(input())
	anss = [''] * t
	for i in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		anss[i] = getAns(n, a)
	for ans in anss:
		print(ans)
main()


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		l = list(map(int, input().split()))
		odd = 0
		for i in l:
			if i & 1 == 1:
				odd += 1
		if odd & 1 == 1:
			print('YES')
		elif odd > 0 and n - odd > 0:
			print('YES')
		else:
			print('NO')
main()


def rem_smallest(arr):
	arr.sort()
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] == 1 or arr[i] == arr[i - 1]:
			pass
		else:
			return 'NO'
	else:
		return 'YES'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	print(rem_smallest(arr))


a = int(input())
for i in range(a):
	k = int(input())
	l = list(set(map(int, input().split())))
	while len(l) != 1:
		j = min(l)
		l.remove(j)
		b = min(l)
		if b - j > 1:
			print('NO')
			break
	else:
		print('YES')


def sol(s):
	for i in range(len(s) - 1):
		if abs(s[i] - s[i + 1]) > 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = sorted(set(a))
	print(sol(s))


for _ in range(int(input())):
	n = int(input())
	c = 0
	arr = list(map(int, input().split()))
	arr.sort()
	for x in range(0, n - 1):
		if arr[x + 1] - arr[x] > 1:
			c += 1
			break
	if c > 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = True
	while len(l) > 1:
		p = l[0]
		p1 = l[1]
		c = abs(p - p1)
		if c > 1:
			print('NO')
			flag = False
			break
		else:
			l.pop(0)
	if flag:
		print('YES')


for i in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	x.sort()
	if len(x) == 1:
		print('YES')
	else:
		k = 0
		for j in range(1, len(x)):
			if x[j] - x[j - 1] > 1:
				print('NO')
				k = 1
				break
		if k == 0:
			print('YES')


x = int(input())
for _ in range(x):
	_ = input()
	arr = input().split()
	arr = [int(char) for char in arr]
	arr.sort()
	len_arr = len(arr)
	for i in range(1, len(arr)):
		if abs(arr[i] - arr[i - 1]) <= 1:
			len_arr -= 1
	if len_arr <= 1:
		print('YES')
	else:
		print('NO')


import sys
read = lambda : sys.stdin.readline().strip()
for _ in range(int(read())):
	length = int(read())
	nums = list(map(int, read().split()))
	nums.sort()
	for i in range(1, length):
		if abs(nums[i] - nums[i - 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


def odd_sum(numbers):
	odd_numbers = 0
	for number in numbers:
		if number % 2 != 0:
			odd_numbers += 1
	if odd_numbers == 0 or (len(numbers) % 2 == 0 and odd_numbers == len(numbers)):
		return False
	else:
		return True
for _ in range(int(input())):
	n = int(input())
	numbers = list(map(int, input().split()))
	print('YES' if odd_sum(numbers) else 'NO')


t = int(input())
for ex in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	a.sort()
	if n == 1:
		print('YES')
	else:
		max_diff = a[1] - a[0]
		for i in range(2, n):
			max_diff = max(max_diff, a[i] - a[i - 1])
		if max_diff <= 1:
			print('YES')
		else:
			print('NO')


import random

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

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	f = 0
	i = 1
	while i < n:
		if a[i] - a[i - 1] <= 1:
			i += 1
		else:
			i += 1
			f += 1
	if f <= 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = map(int, input().split())
	a = list(set(a))
	d = 0
	a.sort()
	for i in range(len(a) - 1):
		if abs(a[i + 1] - a[i]) > 1:
			d = 1
	if d == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for case in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a = list(sorted(a))
	b = [a[0]]
	for i in range(1, n):
		if a[i] != a[i - 1]:
			b.append(a[i])
	n2 = len(b)
	if b[-1] - b[0] + 1 == n2:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline

def ch():
	n = int(input())
	a = sorted(list(map(int, input().split())))
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			return False
	return True
t = int(input())
while t:
	t -= 1
	if ch() == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	l = input().split(' ')
	s = ''
	count = 0
	if len(l) == 1:
		s = 'YES'
	else:
		for i in range(len(l)):
			l[i] = int(l[i])
		l.sort()
		for i in range(len(l) - 1):
			if l[i] == l[i + 1] - 1 or l[i] == l[i + 1]:
				count += 1
	if count == len(l) - 1:
		s = 'YES'
	else:
		s = 'NO'
	print(s)


for _ in range(int(input())):
	c = 0
	n = int(input())
	arr = sorted(set(map(int, input().split())))
	if arr[len(arr) - 1] - arr[0] == len(arr) - 1:
		c = 1
	if c != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
inp_arr = []
for i in range(t):
	size = int(input())
	if size < 1 or size > 50:
		raise ValueError('enter the value between 1 and 50')
	inp_arr.append(input())
	if len(inp_arr[i].split()) != size:
		raise ValueError('Enter correct no of elements')
for s in inp_arr:
	arr = list(map(int, s.strip().split()))
	arr.sort()
	i = 0
	flag = 1
	if len(arr) == 1:
		print('yes')
	else:
		while i <= len(arr) - 2:
			if arr[i + 1] - arr[i] > 1:
				print('NO')
				flag = 0
				break
			i += 1
		if flag:
			print('Yes')


tc = int(input())
for i in range(tc):
	size = int(input())
	a = list(map(int, input().split()))
	a.sort()
	size = len(a)
	output = 'YES'
	for j in range(size - 1):
		diff = a[j + 1] - a[j]
		if diff > 1:
			output = 'NO'
			break
	print(output)


number = int(input())
for i in range(number):
	(s4, sn4) = (0, 0)
	line = []
	n = int(input())
	line += [int(i) for i in input().split()]
	for j in line:
		k = j % 2
		if k == 1:
			sn4 += 1
		else:
			s4 += 1
	if sn4 == 0 or (sn4 % 2 == 0 and s4 == 0):
		print('NO')
	else:
		print('YES')


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

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

def cd(it):
	ret_val = dict()
	for v in it:
		ret_val[v] = ret_val.get(v, 0) + 1
	return ret_val
for _ in range(ri()):
	_ = ri()
	a = [i % 2 for i in r()]
	if any(a):
		if len(a) % 2:
			print('YES')
		elif not all(a):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


t = int(input())
for case in range(t):
	len_arr = int(input())
	arr = map(int, input().split(' '))
	arr = sorted(arr)
	res = True
	for i in range(len(arr) - 1):
		if arr[i + 1] - arr[i] > 1:
			res = False
			break
	print('YES' if res else 'NO')


for _ in range(int(input())):
	n = int(input())
	nums = list(map(int, input().split()))
	ev = 0
	odd = 0
	for i in range(n):
		if nums[i] % 2 == 0:
			ev += 1
		else:
			odd += 1
	if sum(nums) % 2 != 0:
		print('YES')
	elif ev > 0 and odd > 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	k = int(input())
	l = list(map(int, input().split()))
	l.sort()
	i = 0
	z = 0
	while i < len(l) - 1:
		if abs(l[i + 1] - l[i]) >= 2:
			z = 1
			break
		i = i + 1
	if z != 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for iii in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag1 = False
	flag2 = False
	s = 0
	for i in range(n):
		s += a[i]
		if a[i] % 2 == 0:
			flag1 = True
		else:
			flag2 = True
	if s % 2 == 1 or (flag1 and flag2):
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
q = int(input())
for i in range(q):
	n = int(input())
	a = list(map(int, stdin.readline().split()))
	a.sort()
	flag = 0
	for i in range(1, n):
		if a[i] - a[i - 1] > 1:
			flag = 1
			break
	if flag == 0:
		print('YES')
	else:
		print('NO')


testcases = int(input())
for i in range(testcases):
	n = int(input())
	arr = list(map(int, input().split()))
	done = False
	arr.sort()
	for j in range(n - 1):
		if arr[j + 1] - arr[j] > 1:
			done = True
			print('NO')
			break
	if not done:
		print('YES')


for i in range(int(input())):
	n = int(input())
	li = [int(x) for x in input().split()]
	(odd, even) = (False, False)
	for num in li:
		if num % 2 != 0:
			odd = True
		else:
			even = True
	print('YES') if sum(li) % 2 != 0 or (odd and even) else print('NO')


import math

def BuubleSort(l, a):
	cnt = 0
	even = 0
	for i in l:
		if i % 2 != 0:
			cnt += 1
		else:
			even += 1
	if cnt % 2 != 0:
		return 'YES'
	elif cnt != 0 and even > 0:
		return 'YES'
	return 'NO'

def main():
	t = int(input())
	for _ in range(t):
		a = int(input())
		l = list(map(int, input().split()))
		ans = BuubleSort(l, a)
		print(ans)
main()


for _ in range(int(input())):
	t = int(input())
	lst = list(map(int, input().split()))
	if sum(lst) % 2 == 1:
		print('YES')
	else:
		c = 0
		for i in lst:
			if i % 2 == 1:
				c += 1
		if 0 < c < t:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = sorted([int(i) for i in input().split()])
	ans = 'YES'
	for i in range(n - 1):
		if abs(a[i] - a[i + 1]) > 1:
			ans = 'NO'
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	t = 0
	for j in range(1, len(a)):
		if a[j] - a[j - 1] > 1:
			t = 1
			break
	print('YNEOS'[t::2])


t = int(input())
s = ''
while t > 0:
	n = int(input())
	flag = True
	list = [int(i) for i in input().split()]
	list.sort(reverse=True)
	for i in range(n - 1):
		if abs(list[i] - list[i + 1]) > 1:
			s += 'NO\n'
			flag = False
			break
	if flag:
		s += 'YES\n'
	t -= 1
print(s)


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = sorted(set(map(int, stdin.readline().split())))
	if len(a) == 1:
		print('YES')
		continue
	t = [a[i + 1] - a[i] for i in range(len(a) - 1) if a[i + 1] - a[i] <= 1]
	if len(t) == len(a) - 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if n % 2:
		for i in set(a):
			if i % 2:
				print('YES')
				break
		else:
			print('NO')
	else:
		p = False
		np = False
		for i in set(a):
			if i % 2:
				np = True
			else:
				p = True
			if p and np:
				break
		if p and np:
			print('YES')
		else:
			print('NO')


t = int(input())
for f in range(t):
	n = int(input())
	a = [int(s) for s in input().split()]
	ch = nch = i = 0
	for i in range(n):
		if a[i] % 2 == 0:
			ch += 1
		else:
			nch += 1
	if ch > 0 and nch > 0 or (nch == n and n % 2 != 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	l = sorted([int(x) for x in input().split()])
	res = 'YES'
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] > 1:
			res = 'NO'
			break
	print(res)


import sys

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

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

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	n = int(input())
	arr = get_array()
	odd = even = 0
	for i in range(n):
		if not arr[i] & 1:
			even += 1
		else:
			odd += 1
	if sum(arr) & 1 or (odd and even):
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	ar = [int(x) for x in input().split()]
	ar.sort()
	count = 0
	if n != 1:
		for x in range(n - 1):
			if abs(ar[x] - ar[x + 1]) > 1:
				count += 1
		if count > 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


for i in range(int(input())):
	user = input()
	ls = sorted(list(map(int, input().split())))
	a = ls[0]
	for j in ls[1:]:
		if j == a or j == a + 1:
			a = j
		else:
			print('NO')
			break
	else:
		print('YES')


import sys
input = sys.stdin.buffer.readline

def solution():
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	flag = 0
	for i in range(1, n):
		if l[i] - l[i - 1] > 1:
			flag = 1
	if flag:
		print('NO')
	else:
		print('YES')
t = int(input())
for _ in range(t):
	solution()


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

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

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

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

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

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

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

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

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

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

def testcase(t):
	for p in range(t):
		solve()
from random import randint
from collections import defaultdict, deque

class Graph(object):

	def __init__(self, dic):
		self.dict = dic
		self.vertex = set()

	def addedge(self, a, b):
		if self.dict[a] == []:
			self.vertex.add(a)
		if b != None:
			self.dict[a].append(b)

	def con_com_util(self, i, unvisited, count, comp):
		for j in self.dict[i]:
			if j in unvisited:
				unvisited.remove(j)
				comp[count].append(j)
				comp = self.con_com_util(j, unvisited, count, comp)
		return comp

	def conn_components(self):
		unvisited = self.vertex.copy()
		count = 0
		comp = defaultdict(list)
		while unvisited:
			i = unvisited.pop()
			comp[count].append(i)
			comp = self.con_com_util(i, unvisited, count, comp)
			count += 1
		return (count, comp)

def countSetBits(n):
	count = 0
	while n:
		n &= n - 1
		count += 1
	return count

def solve():
	n = int(inp())
	ar = lis()
	ce = 0
	for i in ar:
		if i % 2 == 0:
			ce += 1
	if ce == n or (ce == 0 and n % 2 == 0):
		print('NO')
	else:
		print('YES')
testcase(int(inp()))


for _ in range(int(input())):
	l = int(input())
	l1 = list(map(int, input().split()))
	l1.sort()
	c = 1
	for i in range(1, len(l1)):
		if l1[i] - l1[i - 1] > 1:
			c += 1
			break
	if c == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	n = int(input())
	l = [int(i) for i in input().split()]
	ans = ''
	l.sort()
	if len(l) == 1:
		print('YES')
	else:
		try:
			for i in range(1, len(l) + 1):
				if l[i] - l[i - 1] <= 1:
					ans = 'YES'
				else:
					ans = 'NO'
					break
		except:
			pass
		print(ans)
	t = t - 1


t = int(input())
for i in range(t):
	a = int(input())
	A = list(map(int, input().split()))
	A.sort()
	k = 0
	ans = 0
	while k != a - 1:
		if abs(A[k] - A[k + 1]) > 1:
			ans = 1
			break
		k += 1
	if ans == 1:
		ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


T = int(input())
for case in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	min_item = min(a)
	max_item = max(a)
	for i in range(min_item + 1, max_item):
		if i not in a:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for x in range(0, t):
	n = int(input())
	arr = list(map(int, input().split()))
	arr.sort()
	b = arr[0]
	ans = 'YES'
	for i in range(1, n):
		if arr[i] - b > 1:
			ans = 'NO'
			break
		b = arr[i]
	print(ans)


import sys
queries = int(sys.stdin.readline())
for query in range(queries):
	len_of_array = int(sys.stdin.readline())
	array = sys.stdin.readline().strip().split()
	even = False
	uneven = False
	for element in array:
		if int(element) % 2 == 0:
			even = True
		else:
			uneven = True
	if even and uneven or (uneven and len_of_array % 2 == 1):
		print('YES')
	else:
		print('NO')


N = int(input())
for _ in range(N):
	n = input()
	a = list(map(int, input().split()))
	res = False
	if int(n) % 2 == 0:
		for i in range(1, len(a)):
			if a[i] % 2 != a[i - 1] % 2:
				res = True
				break
	else:
		for el in a:
			if el % 2 == 1:
				res = True
				break
	if res:
		print('YES')
	else:
		print('NO')


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


test_cases = int(input())
for test_case in range(test_cases):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	a.sort()
	for i in range(n - 1):
		if len(a) == 1:
			print('YES')
			break
		if a[i + 1] - a[i] > 1:
			print('NO')
			break
		else:
			count += 1
	if count == n - 1:
		print('YES')


def run():
	n = int(input())
	nums = list(map(int, input().split()))
	nums.sort()
	found = False
	for i in range(1, len(nums)):
		if nums[i] - nums[i - 1] > 1:
			print('NO')
			found = True
			break
	if not found:
		print('YES')
t = int(input())
for i in range(t):
	run()


def main():
	op = ''
	t = int(input())
	for i in range(t):
		input()
		ip = [int(item) for item in input().split(' ')]
		odd_cnt = 0
		even_cnt = 0
		sum_ip = 0
		for num in ip:
			sum_ip += num
			if num % 2 != 0:
				odd_cnt += 1
			elif num % 2 == 0:
				even_cnt += 1
		if sum_ip % 2 != 0:
			op += 'YES' + '\n'
		elif even_cnt == 0 or odd_cnt == 0:
			op += 'NO' + '\n'
		else:
			op += 'YES' + '\n'
	print(op)
main()


from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

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

def si():
	return str(input())

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

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

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

def fsi():
	return str(stdin.readline())

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

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

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

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

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

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

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1
t = ii()
for _ in range(t):
	n = ii()
	l = li()
	(o, e) = (0, 0)
	for i in range(n):
		if l[i] % 2 == 0:
			e += 1
		else:
			o += 1
	if n % 2 == 0:
		if e == n or o == n:
			print('NO')
		else:
			print('YES')
	elif e == n:
		print('NO')
	else:
		print('YES')


def ans(n, A):
	A.sort()
	for i in range(n - 1):
		if A[i + 1] - A[i] <= 1:
			continue
		else:
			return 'NO'
	return 'YES'
L = []
t = int(input())
for i in range(t):
	n = int(input())
	A = [int(x) for x in input().split()]
	L.append(ans(n, A))
for l in L:
	print(l)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	if sum(arr) % 2 == 1:
		print('YES')
		continue
	evenFlg = False
	oddFlg = False
	for e in arr:
		if e % 2 == 0 and (not evenFlg):
			evenFlg = True
		if e % 2 == 1 and (not oddFlg):
			oddFlg = True
	if oddFlg and evenFlg:
		print('YES')
		continue
	print('NO')


cases = int(input())
for i in range(cases):
	evev = 0
	number = int(input())
	alist = list(map(int, input().split()))
	if sum(alist) % 2 != 0:
		print('YES')
	else:
		for p in alist:
			if p % 2 != alist[0] % 2:
				print('YES')
				evev += 1
				break
		if evev == 0:
			print('NO')


t = int(input())
i = 0
while i < t:
	a = int(input())
	riga = list(map(int, input().strip().split()))
	tot = riga[0]
	il = 1
	while il < a:
		tot = tot + riga[il]
		il = il + 1
	if tot % 2 != 0:
		print('yes')
	else:
		il = 1
		if riga[0] % 2 == 0:
			ris = True
		else:
			ris = False
		d = ris
		while il < a:
			if riga[il] % 2 == 0:
				ris = True
			else:
				ris = False
			if ris != d:
				print('yes')
				break
			il = il + 1
		if ris == d:
			print('no')
	i = i + 1


for i in range(int(input())):
	a = int(input())
	b = input().split()
	for j in range(a):
		b[j] = int(b[j])
	b = sorted(b)
	k = 0
	for i in range(a - 1):
		if int(b[1]) - int(b[0]) == 1 or int(b[1]) - int(b[0]) == 0:
			b.pop(0)
		else:
			k += 1
			break
	if k == 1:
		print('NO')
	else:
		print('YES')


def func(n):
	for i in range(n):
		k = int(input())
		l = list(map(int, input().split()))
		odd = 0
		even = 0
		if sum(l) % 2 != 0:
			print('YES')
			continue
		for i in l:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if even == len(l):
			print('NO')
		elif odd == len(l):
			print('NO')
		else:
			print('YES')
n = int(input())
func(n)


T = int(input())
for t in range(T):
	n = int(input())
	l = [int(i) for i in input().split(' ')]
	list.sort(l)
	flag = 0
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			flag = 1
	if flag >= 1:
		print('NO')
	else:
		print('YES')


n_sets = int(input())
for i in range(n_sets):
	n = int(input())
	a = [int(x) for x in input().split()]
	n_ch = len(list(filter(lambda x: x % 2 == 1, a)))
	if n % 2 == 1 and n_ch != 0:
		print('YES')
	elif n_ch != 0 and n_ch != n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	l.sort()
	check = True
	for i in range(n - 1):
		if abs(l[i + 1] - l[i]) > 1:
			check = False
			break
	if check:
		print('YES')
	else:
		print('NO')


for nt in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	if sum(l) % 2:
		print('YES')
		continue
	(odd, even) = (0, 0)
	for i in l:
		if i % 2:
			odd = 1
		else:
			even = 1
	if odd == 0 or even == 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.sort()
	diff = []
	for i in range(n - 1):
		diff.append(l[i + 1] - l[i])
	if set(diff) == {1} or set(diff) == {0} or set(diff) == {0, 1} or (n == 1):
		print('YES')
	else:
		print('NO')


def sample(a, n):
	(p1, p2) = (0, 1)
	while p1 < p2 and p2 < len(a):
		if abs(a[p1] - a[p2]) <= 1:
			if a[p1] <= a[p2]:
				a.pop(p1)
			else:
				a.pop(p2)
		else:
			p2 += 1
	if len(a) == 1:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	if len(a) == 1:
		print('YES')
	else:
		print(sample(a, n))


def main():
	n = int(input())
	for i in range(n):
		even = 0
		odd = 0
		inpt = int(input())
		a = [int(x) for x in input().split()]
		for elem in a:
			if elem % 2 == 0:
				even += 1
			else:
				odd += 1
		if even == 0:
			if odd % 2 == 0:
				print('NO')
			else:
				print('YES')
		elif odd == 0:
			print('NO')
		else:
			print('YES')
main()


z = int(input())
for i in range(z):
	a = int(input())
	l = list(map(int, input().split()))
	l.sort()
	xq = 0
	cd = 0
	if len(l) == 1:
		print('YES')
	else:
		for i in range(len(l) - 1):
			if abs(l[i] - l[i + 1]) > 1:
				print('NO')
				cd += 1
				break
			else:
				xq += 1
	if xq > 0 and cd == 0:
		print('YES')


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.sort()
	while len(a) > 1:
		if a[-1] - a[-2] <= 1:
			a.pop()
		else:
			break
	if len(a) == 1:
		stdout.write('YES' + '\n')
	else:
		stdout.write('NO' + '\n')


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	l.sort()
	f = True
	for i in range(n - 1):
		if l[i + 1] - l[i] > 1:
			f = False
			break
	if f:
		print('YES')
	else:
		print('NO')


T = int(input())
while T > 0:
	T -= 1
	sum = 0
	odd = 0
	even = 0
	N = int(input())
	a = list(map(int, input().split()))
	for i in range(0, N):
		sum += a[i]
		if a[i] % 2 != 0:
			odd += 1
		else:
			even += 1
	if sum % 2 == 0:
		if odd == N:
			print('NO')
		elif odd == 0:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	ls.sort()
	if n == 1:
		print('YES')
		continue
	for j in range(1, n):
		if abs(ls[j] - ls[j - 1]) > 1:
			print('NO')
			break
	else:
		print('YES')


N = int(input())

def Test():
	if min(a) + 1 in a:
		return a.remove(min(a))
	elif a.count(min(a)) > 1:
		return a.remove(min(a))
	else:
		return False

def Main():
	if len(a) > 1:
		work = Test()
		if work == None:
			return Main()
	else:
		return
for i in range(N):
	n = int(input())
	a = list(map(int, input().split()))
	Main()
	if len(a) == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = sum(a)
	if s % 2:
		print('YES')
	else:
		even = -1
		odd = -1
		for x in a:
			if x & 1:
				odd = x
			else:
				even = x
		print('YNEOS'[even == -1 or odd == -1::2])


test = int(input())
for t in range(test):
	n = int(input())
	l = list(map(int, input().split()))
	s = sum(l)
	if s % 2 == 1:
		print('YES')
	else:
		odd = 0
		for i in l:
			if i % 2 == 1:
				odd += 1
			else:
				continue
		if n > odd and odd > 0:
			print('YES')
		else:
			print('NO')


queries = int(input())
while queries > 0:
	n = int(input())
	lst = list(map(int, input().strip().split()))
	odd = 0
	even = 0
	for i in lst:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd % 2 != 0 or (odd >= 1 and even >= 1):
		print('YES')
	else:
		print('NO')
	queries -= 1


def main():
	for _ in range(int(input())):
		c = int(input())
		arr = map(int, input().split())
		odd = 0
		even = 0
		ret = False
		for n in arr:
			if n % 2 == 0:
				even += 1
			else:
				odd += 1
			if odd > 0 and even > 0:
				ret = True
				break
		if ret or (c % 2 == 1 and odd == c):
			print('YES')
		else:
			print('NO')
main()


from sys import stdin, stdout
x = lambda : list(map(int, stdin.readline().strip().split()))

def func(arr):
	arr = list(set(arr))
	m = 0
	arr.sort()
	check = arr[0]
	for i in range(1, len(arr)):
		if arr[i] != check + 1:
			m = 1
			break
		elif arr[i] == check + 1:
			check = arr[i]
	if m == 1:
		return 'No'
	return 'Yes'
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	arr = x()
	ans = func(arr)
	print(ans)


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for _ in range(t):
		n = int(stdin.readline())
		ary = list(map(int, stdin.readline().split()))
		ary.sort()
		ans = 'YES'
		for i in range(1, n):
			if ary[i] - ary[i - 1] > 1:
				ans = 'NO'
				break
		stdout.write(ans)
		stdout.write('\n')
	return
main()


def removeSmall(List):
	List = sorted(List)
	for i in range(len(List) - 1):
		if not List[i + 1] - List[i] <= 1:
			return 'NO'
	return 'YES'

def takeInput(List):
	lis = list(map(int, input().split()))
	List.append(lis)

def __main__():
	AllInput = []
	t = int(input())
	for counter in range(t):
		n = int(input())
		takeInput(AllInput)
	for counter in range(t):
		print(removeSmall(AllInput[counter]))
	return
__main__()


for _ in ' ' * int(input()):
	a = int(input())
	l = 0
	k = list(map(int, input().split()))
	z = 0
	for i in k:
		if i % 2:
			z += 1
		else:
			l += 1
	if z % 2 != 0 or (z >= 1 and l >= 1):
		print('YES')
	else:
		print('NO')


total = int(input())
for test_cases in range(total):
	length = int(input())
	num_list = list(map(int, input().split()))
	num_list.sort()
	if len(num_list) == 1:
		print('YES')
	else:
		for i in range(1, len(num_list)):
			if num_list[i] - num_list[i - 1] > 1:
				print('NO')
				break
		else:
			print('YES')


def oddcnt(s):
	f = 0
	for i in s:
		if i % 2 == 1:
			f += 1
	return f
for _ in range(int(input())):
	n = int(input())
	ls = list(map(int, input().split()))
	o = oddcnt(ls)
	if o:
		if n % 2 == 0:
			if o != n:
				print('YES')
			else:
				print('NO')
		else:
			print('YES')
	else:
		print('NO')


import math
import datetime
import collections
import statistics
import itertools

def is_prime(num):
	for i in range(2, int(math.sqrt(num)) + 1):
		if num % i == 0:
			return False
	return True

def input_list():
	ll = list(map(int, input().split(' ')))
	return ll
tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = input_list()
	arr.sort()
	c = True
	if n == 1:
		print('YES')
	else:
		for i in range(1, n):
			if arr[i] - arr[i - 1] > 1:
				c = False
				break
		if c:
			print('YES')
		else:
			print('NO')


t = int(input())
for i2 in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	(s, ocheck, echeck) = (0, 0, 0)
	for i in range(n):
		if x[i] % 2 == 1:
			ocheck = 1
		else:
			echeck = 1
		s += x[i]
	if s % 2 == 1 or ocheck * echeck > 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ev = 0
	od = 0
	sm = 0
	for i in range(n):
		if a[i] % 2 == 1:
			od = 1
		else:
			ev = 1
		sm += a[i]
	if ev == 1 and od == 1 or sm % 2 == 1:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	var = int(input())
	lis = input().split(' ')
	for i in range(var):
		lis[i] = int(lis[i]) % 2
	if lis.count(0) == var or (lis.count(1) == var and var % 2 == 0):
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split(' ')))
	(odds, even) = (0, 0)
	summ = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odds += 1
		summ += i
	if summ % 2 != 0:
		print('YES')
	elif odds == 0 or even == 0:
		print('NO')
	else:
		print('YES')


def main():
	n = int(input())
	for _ in range(n):
		k = int(input())
		a = list(map(int, input().split()))
		odd = False
		even = False
		for x in a:
			if x % 2 == 0:
				odd = True
			else:
				even = True
		if odd and even:
			print('YES')
		elif odd:
			print('NO')
		elif k % 2 == 1:
			print('YES')
		else:
			print('NO')
main()


for _ in range(int(input())):
	n = int(input())
	num = [int(i) for i in input().split()]
	num.sort()
	l = n
	i = 0
	while i < n - 1:
		if abs(num[i] - num[i + 1]) <= 1:
			l -= 1
		i += 1
	if l == 1:
		print('YES\n')
	else:
		print('NO\n')


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

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

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

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
import bisect
for _ in range(I()):
	n = I()
	a = L()
	if sum(a) % 2 == 1:
		print('YES')
		continue
	b = [a[i] % 2 for i in range(n)]
	cnt = Counter(b)
	print(['YES', 'NO'][(cnt[1] == n or cnt[1] == 0) or (n == 1 and b[0] == 0)])


n = int(input())
elements = list()
ans = True
for i in range(n):
	nint = input()
	elements = [int(i) for i in input().split()]
	elements.sort()
	for i in range(len(elements) - 1):
		if abs(elements[i + 1] - elements[i]) > 1:
			ans = False
	print('YES') if ans else print('NO')
	ans = True


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

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	k = 0
	for e in a:
		if e % 2 == 1:
			k += 1
	if k == 0 or (k == n and k % 2 == 0):
		print('NO')
	else:
		print('YES')

def main():
	t = int(input())
	while t:
		solve()
		t -= 1
main()


n = int(input())
for i in range(n):
	p = int(input())
	l = list(map(int, input().split()))
	count1even = 0
	count2odd = 0
	for i in range(len(l)):
		if l[i] % 2 == 0:
			count1even += 1
		elif l[i] % 2 != 0:
			count2odd += 1
	if count2odd > 0:
		if count2odd % 2 != 0:
			print('YES')
		elif count2odd % 2 == 0:
			if count1even > 0:
				print('YES')
			elif count1even == 0:
				print('NO')
	elif count2odd == 0:
		print('NO')


n = int(input())
for t in range(n):
	qt = int(input())
	sc = list(map(int, input().split()))
	if sum(sc) % 2 == 0:
		flagP = 0
		flagI = 0
		for k in sc:
			if k % 2 != 0:
				flagI = 1
			else:
				flagP = 1
		if flagP == flagI:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	sum = 0
	for i in range(n):
		sum += a[i]
	if sum % 2 != 0:
		print('YES')
	else:
		oddctr = 0
		evenctr = 0
		for i in range(0, n):
			if a[i] % 2 == 0:
				evenctr += 1
			else:
				oddctr += 1
			if evenctr >= 1 and oddctr >= 1:
				break
		if evenctr >= 1 and oddctr >= 1:
			print('YES')
		else:
			print('NO')


T = int(input())
for i in range(T):
	temp1 = int(input())
	temp = input()
	temp = temp.split()
	for i in range(temp1):
		temp[i] = int(temp[i])
	temp.sort()
	t = 0
	if temp1 != 1:
		for i in range(temp1):
			if abs(temp[i] - temp[i + 1]) <= 1:
				if temp1 == i + 2:
					t = temp1 - 1
					break
			else:
				break
	if t == temp1 - 1:
		print('YES')
	else:
		print('NO')


def check(arr, n):
	arr = sorted(arr)
	for i in range(n):
		if arr[i] - arr[i - 1] >= 2:
			return 'NO'
	return 'YES'
number_test = int(input())
for i in range(number_test):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = check(arr, n)
	print(ans)


t = int(input())
list1 = []
ans = 'YES'
for i in range(t):
	lenght = int(input())
	listnum = input().split(' ')
	for x in listnum:
		x = int(x)
		list1.append(x)
	list1 = sorted(list1)
	if len(list1) == 1:
		print('YES')
	else:
		for y in range(lenght - 1):
			first = list1[y]
			second = list1[y + 1]
			if abs(first - second) > 1:
				ans = 'NO'
				break
			else:
				ans = 'YES'
		print(ans)
	list1 = []


t = int(input())
i = 0
while i < t:
	n = int(input())
	j = 0
	sum = 0
	ocnt = 0
	ecnt = 0
	a = input()
	a = a.split()
	while j < n:
		if int(a[j]) % 2 == 0:
			ecnt = ecnt + 1
		elif int(a[j]) % 2 == 1:
			ocnt = ocnt + 1
		sum = sum + int(a[j])
		j = j + 1
	if sum % 2 == 1:
		print('YES')
	elif ocnt == len(a) or ecnt == len(a):
		print('NO')
	else:
		print('YES')
	i = i + 1