We call two numbers $x$ and $y$ similar if they have the same parity (the same remainder when divided by $2$), or if $|x-y|=1$. For example, in each of the pairs $(2, 6)$, $(4, 3)$, $(11, 7)$, the numbers are similar to each other, and in the pairs $(1, 4)$, $(3, 12)$, they are not.

You are given an array $a$ of $n$ ($n$ is even) positive integers. Check if there is such a partition of the array into pairs that each element of the array belongs to exactly one pair and the numbers in each pair are similar to each other.

For example, for the array $a = [11, 14, 16, 12]$, there is a partition into pairs $(11, 12)$ and $(14, 16)$. The numbers in the first pair are similar because they differ by one, and in the second pair because they are both even.


-----Input-----

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

Each test case consists of two lines.

The first line contains an even positive integer $n$ ($2 \le n \le 50$) — length of array $a$.

The second line contains $n$ positive integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 100$).


-----Output-----

For each test case print:  YES if the such a partition exists,  NO otherwise. 

The letters in the words YES and NO can be displayed in any case.


-----Example-----
Input
7
4
11 14 16 12
2
1 8
4
1 1 1 1
4
1 2 5 6
2
12 13
6
1 6 3 10 5 8
6
1 12 3 10 5 8

Output
YES
NO
YES
YES
YES
YES
NO



-----Note-----

The first test case was explained in the statement.

In the second test case, the two given numbers are not similar.

In the third test case, any partition is suitable.

Difficulty: introductory

Starter code:

Solutions:
def read_int():
    return int(input())


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


t = read_int()
for case_num in range(t):
    n = read_int()
    a = list(read_ints())
    cnt = [0 for i in range(101)]
    even = 0
    for ai in a:
        cnt[ai] += 1
        if ai % 2 == 0:
            even += 1
    odd = n - even
    if even % 2 == 0:
        print('YES')
    else:
        ok = False
        for i in range(1, 100):
            if cnt[i] > 0 and cnt[i + 1] > 0:
                ok = True
                break
        print('YES' if ok else 'NO')


q = int(input())
for i in range(q):
	n = int(input())
	l = list(map(int,input().split()))
	l.sort()
	kol = False
	for i in range(1,n):
		if l[i] == l[i-1] + 1:
			kol =True
			break
	par = 0
	npar = 0
	for i in l:
		if i%2 == 0:
			par += 1
		else:
			npar += 1
	if not kol:
		if par%2 == 0 and npar%2 == 0:
			print("YES")
		else:
			print("NO")
	else:
		if par%2 == 0 and npar%2 == 0:
			print("YES")
		elif par%2 == 1 and npar%2 == 1:
			print("YES")
		else:
			print("NO")

from math import *
import math

def r1(t):
    return t(input())

def r2(t):
    return [t(i) for i in input().split()]


for zzz in range(r1(int)):
    n = r1(int)
    a = r2(int)
    co = 0
    ce = 0
    for i in range(n):
        if a[i] & 1:
            co += 1
        else:
            ce += 1
    if (co % 2 == 0) and (ce % 2 == 0):
        print("YES")
    else:
        a.sort()
        ha = False
        for i in range(n - 1):
            if a[i + 1] - a[i] == 1:
                ha = True
                break
        if ha:
            print("YES")
        else:
            print("NO")
            


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

T = int(input())
for t in range(T):
    N = int(input())
    A = list(map(int, input().split()))
    par = [a % 2 for a in A]
    odd = sum(par)
    even = N - odd
    res = "NO"
    if (even % 2) == 0 and (odd % 2) == 0:
        res = "YES"
    elif (even % 2) != 0 and (odd % 2) != 0:
        sA = sorted(A)
        for i in range(N - 1):
            ai = sA[i]
            aip = sA[i + 1]
            if aip - ai == 1:
                res = "YES"
                break

    print(res)


import sys
from collections import defaultdict as dd
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
#from math import *
import copy
#sys.setrecursionlimit(10**6)
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
def li():
	return [int(x) for x in input().split()]
def fi():
	return int(input())
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())	

def bo(i):
	return ord(i)-ord('a')


t=fi()
while t>0:
	t-=1
	n=fi()
	a=li()
	d={}
	o=e=0
	for i in a:
		if i%2:
			o+=1
		else:
			e+=1	
		d[i]=1	
	if o%2==0 :
		print("YES")
		continue
	flag=0	
	for i in a:
		if i+1 in d or i-1 in d:
			print("YES")
			flag=1
			break
	if flag==0:
		print("NO")					


T = int(input())

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

    evens = 0
    odds = 0

    aa.sort()

    ba = -100

    cnt = 0
    for a in aa:
        if a % 2 == 0:
            evens += 1
        else:
            odds += 1

        if abs(a - ba) == 1:
            cnt += 1
            ba = -100
        else:
            ba = a

    evens %= 2
    odds %= 2

    if evens == 0 and odds == 0:
        print("YES")
    else:
        if cnt >= 1:
            print("YES")
        else:
            print("NO")


T = int(input())

for t in range(T):
    N = int(input())
    A = [int(_) for _ in input().split()]
    even = [el for el in A if el % 2 == 0]
    odd = [el for el in A if el % 2 == 1]
    sA = sorted(A)
    v = 0
    for i in range(len(A)-1):
        if sA[i+1] - sA[i] == 1:
            v += 1
    if len(even) % 2 == 0 and len(odd) % 2 == 0:
        print('YES')
    else:
        if v > 0:
            print('YES')
        else:
            print('NO')


"""T=int(input())
for _ in range(0,T):
    N=int(input())
    a,b=map(int,input().split())
    s=input()
    s=[int(x) for x in input().split()]
    for i in range(0,len(s)):
        a,b=map(int,input().split())"""


T=int(input())
for _ in range(0,T):
    N=int(input())
    s=[int(x) for x in input().split()]
    c0=0
    c1=0
    pos=[0]*102
    for i in range(0,len(s)):
        pos[s[i]]=1
        if(s[i]%2==0):
            c0+=1
        else:
            c1+=1
        
    if(c0%2==0):
        print('YES')
    else:
        temp='NO'
        for i in range(0,len(pos)-1):
            if(pos[i]==1 and pos[i+1]==1):
                temp='YES'
                break
        print(temp)
        
    



t = int(input())
for _ in range(t):
    n = int(input())
    s = list(map(int, input().split()))
    even = []
    odd = []
    for i in range(n):
        if s[i] % 2 == 0:
            even.append(s[i])
        else:
            odd.append(s[i])
    if len(even) % 2 == 0:
        print("YES")
    else:
        even = set(even)
        for val in odd:
            if val - 1 in even or val + 1 in even:
                print("YES")
                break
        else:
            print("NO")

import sys
q=int(input())
for i in range(q):
    n=int(sys.stdin.readline())
    a=[int(i) for i in sys.stdin.readline().split()]
    minrazn=999999
    a.sort()
    ch=0
    nch=0
    for k in range(n):
        if k<n-1:
            if a[k]%2==0:
                ch+=1
            else:
                nch+=1
            if minrazn>a[k+1]-a[k] and a[k+1]!=a[k] :
                minrazn=a[k+1]-a[k]
        else:
            if a[k]%2==0:
                ch+=1
            else:
                nch+=1
    if ch%2==0:
        print('YES')
    elif minrazn==1:
        print('YES')
    else:
        print('NO')
        


"""
Author: Q.E.D
Time: 2020-05-24 08:43:25
"""
T = int(input())
for _ in range(T):
    n = int(input())
    a = list(map(int, input().split()))
    odd, even = [], []
    for x in a:
        if x % 2 == 1:
            odd.append(x)
        else:
            even.append(x)
    if len(odd) % 2 == 0 and len(even) % 2 == 0:
        ans = 'YES'
    else:
        for i in range(len(odd)):
            valid = False
            for j in range(len(even)):
                if abs(odd[i] - even[j]) == 1:
                    valid = True
                    break
            if valid:
                break
        ans = 'YES' if valid else 'NO'
    print(ans)



import sys
# from functools import lru_cache, cmp_to_key
# from heapq import merge, heapify, heappop, heappush
from math import sqrt, sin, cos, pi
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

# sys.setrecursionlimit(pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
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 list(map(int, data().split()))


def ssp(): return list(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()
    even, odd = [], []
    for i in range(n):
        if arr[i] & 1:
            odd.append(arr[i])
            continue
        even.append(arr[i])
    if not(len(odd) & 1):
        out("YES")
        continue
    r = False
    for i in odd:
        for j in even:
            if abs(i-j) == 1:
                r = True
                break
        if r:
            break
    if r:
        out("YES")
        continue
    out("NO")


for _ in range(int(input())):
    c = int(input())
    f = sorted([int(i) for i in input().split()])
    f1 = False
    ch = 0
    nech = 0
    if f[0] % 2 == 1:
        nech += 1
    else:
        ch += 1
    for i in range(1, c):
        if f[i] - f[i - 1] == 1:
            f1 = True
        if f[i] % 2 == 1:
            nech += 1
        else:
            ch += 1

    if nech % 2 != ch % 2:
        print('NO')
    else:
        if nech % 2 == 0:
            print('YES')
        elif f1:
            print('YES')
        else:
            print('NO')


t=int(input())
for you in range(t):
    n=int(input())
    l=input().split()
    li=[int(i) for i in l]
    lodd=[]
    leven=[]
    for i in li:
        if(i%2):
            lodd.append(i)
        else:
            leven.append(i)
    if(len(leven)%2==0):
        print("YES")
    else:
        done=0
        for i in lodd:
            for j in leven:
                if(abs(i-j)==1):
                    done=1
                    break
        if(done):
            print("YES")
        else:
            print("NO")


import sys, math,os
from io import BytesIO, IOBase
#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
#from itertools import permutations,combinations
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')
sys.setrecursionlimit(100000)
INF = float('inf')
mod = int(1e9)+7


def main():

    for t in range(int(data())):
        n=int(data())
        a=mdata()
        e=0
        for i in range(n):
            if a[i]%2==0:
                e+=1
        if e%2==0:
            out("YES")
        else:
            s=set(a)
            flag=False
            for i in a:
                if i+1 in s:
                    flag=True
                    break
            if flag==True:
                out("YES")
            else:
                out("NO")

def __starting_point():
    main()
__starting_point()