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$.
[{"code": "import sys\nimport math\ndef II():\n\treturn int(sys.stdin.readline())\n\ndef LI():\n\treturn list(map(int, sys.stdin.readline().split()))\n\ndef MI():\n\treturn list(map(int, sys.stdin.readline().split()))\n\ndef SI():\n\treturn sys.stdin.readline().strip()\nt = II()\nfor q in range(t):\n\tn = II()\n\ta = sorted(LI())\n\tboo = True\n\tfor i in range(1,n):\n\t\tif a[i]-a[i-1]>1:\n\t\t\tboo = False\n\t\t\tbreak\n\tprint(\"YES\" if boo else \"NO\")\n", "passed": true, "time": 0.16, "memory": 14140.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\nfor nt in range(int(input())):\n\tn = int(input())\n\ta = list(map(int,input().split()))\n\ta.sort()\n\tflag = \"YES\"\n\tfor i in range(1,n):\n\t\tif a[i]-a[i-1]>=2:\n\t\t\tflag = \"NO\"\n\t\t\tbreak\n\tprint (flag)", "passed": true, "time": 0.16, "memory": 14132.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n=int(input())\n    s=sorted(map(int,input().split()))\n    ans='YES'\n    for i in range(1,n):\n        if s[i]-s[i-1]>1:ans='NO';break\n    print(ans)", "passed": true, "time": 0.24, "memory": 14036.0, "status": "done"}, {"code": "\"\"\"\n                            pppppppppppppppppppp\n                         ppppp  ppppppppppppppppppp\n                      ppppppp    ppppppppppppppppppppp\n                      pppppppp  pppppppppppppppppppppp\n                      pppppppppppppppppppppppppppppppp\n                              pppppppppppppppppppppppp\n       ppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppp\n      pppppppppppppppppppppppppppppppppppppppppppppppp  ppppppppppppppppppppp\n     ppppppppppppppppppppppppppppppppppppppppppppppppp  pppppppppppppppppppppp\n    ppppppppppppppppppppppppppppppppppppppppppppppp    pppppppppppppppppppppppp\n   pppppppppppppppppppppppppppppppppppppppppppppp     pppppppppppppppppppppppppp\n  ppppppppppppppppppppppppppppppppppppppppppppp      pppppppppppppppppppppppppppp\n  pppppppppppppppppppppppppppppppp               pppppppppppppppppppppppppppppppp\n  pppppppppppppppppppppppppppp     pppppppppppppppppppppppppppppppppppppppppppppp\n  ppppppppppppppppppppppppppp    pppppppppppppppppppppppppppppppppppppppppppppppp\n    pppppppppppppppppppppppp  pppppppppppppppppppppppppppppppppppppppppppppppppp\n     ppppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppppp\n      pppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppppp\n       ppppppppppppppppppppp  ppppppppppppppppppppppppppppppppppppppppppppp\n                              pppppppppppppppppppppppp\n                              pppppppppppppppppppppppppppppppp\n                              pppppppppppppppppppppp  pppppppp\n                              ppppppppppppppppppppp    ppppppp\n                                 ppppppppppppppppppp  ppppp\n                                    pppppppppppppppppppp\n\"\"\"\n\n\nimport sys\nfrom functools import lru_cache, cmp_to_key\nfrom heapq import merge, heapify, heappop, heappush, nsmallest\nfrom math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log\nfrom collections import defaultdict as dd, deque, Counter as C\nfrom itertools import combinations as comb, permutations as perm\nfrom bisect import bisect_left as bl, bisect_right as br, bisect\nfrom time import perf_counter\nfrom fractions import Fraction\nfrom decimal import Decimal\n# sys.setrecursionlimit(pow(10, 6))\n# sys.stdin = open(\"input.txt\", \"r\")\n# sys.stdout = open(\"output.txt\", \"w\")\nmod = pow(10, 9) + 7\nmod2 = 998244353\ndef data(): return sys.stdin.readline().strip()\ndef out(var, end=\"\\n\"): sys.stdout.write(str(var)+end)\ndef outa(*var, end=\"\\n\"): sys.stdout.write(' '.join(map(str, var)) + end)\ndef l(): return list(sp())\ndef sl(): return list(ssp())\ndef sp(): return list(map(int, data().split()))\ndef ssp(): return list(map(str, data().split()))\ndef l1d(n, val=0): return [val for i in range(n)]\ndef l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]\n\n\nfor _ in range(int(data())):\n    n = int(data())\n    arr = l()\n    r = True\n    arr.sort()\n    for i in range(1, n):\n        if arr[i] - arr[i-1] > 1:\n            r = False\n            break\n    out((\"YES\", \"NO\")[r == False])\n", "passed": true, "time": 0.15, "memory": 14176.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    am  = int(input())\n    arr = list(map(int,input().split()))\n    fl = True\n    arr.sort()\n    for i in range(am-1):\n        if arr[i+1]-arr[i] > 1:\n            fl = False\n            break\n    if fl:\n        print(\"YES\")\n    else:\n        print(\"NO\")", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "t = int(input())\n\nfor _ in range(t):\n    n = int(input())\n    a = list(map(int, input().split()))\n    \n    s = set(a)\n    if len(s) == max(s) - min(s) + 1:\n        print(\"YES\")\n    else:\n        print(\"NO\")\n", "passed": true, "time": 0.15, "memory": 14148.0, "status": "done"}, {"code": "# Author: S Mahesh Raju\n# Username: maheshraju2020\n# Date: 05/08/2020\n\nfrom sys import stdin, stdout, setrecursionlimit\nfrom math import gcd, ceil, sqrt\nfrom collections import Counter\nfrom bisect import bisect_left, bisect_right\nii1 = lambda: int(stdin.readline().strip())\nis1 = lambda: stdin.readline().strip()\niia = lambda: list(map(int, stdin.readline().strip().split()))\nisa = lambda: stdin.readline().strip().split()\nsetrecursionlimit(100000)\nmod = 1000000007\n\ntc = ii1()\nfor _ in range(tc):\n    n = ii1()\n    arr = sorted(iia())\n    for i in range(1, n):\n        if arr[i] - arr[i - 1] > 1:\n            print('NO')\n            break\n    else:\n        print('YES')\n            \n", "passed": true, "time": 0.22, "memory": 14380.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\n\nfor _ in range(int(input())):\n    n=int(input())\n    L=list(map(int,input().split()))\n    L.sort()\n    for i in range(n-1):\n        if L[i+1]-L[i]>1:\n            print('NO')\n            break\n    else:\n        print('YES')\n", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n = int(input())\n    arr = list(map(int, input().split()))\n    arr.sort()\n    flag = 0\n    for i in range(n - 1):\n        if arr[i + 1] - arr[i] > 1:\n            flag = 1\n            break\n    if flag:\n        print(\"NO\")\n    else:\n        print(\"YES\")", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n = int(input())\n    lst = list(map(int, input().split()))\n    lst.sort()\n    ans = \"YES\"\n    for i in range(n-1):\n        if lst[i+1]-lst[i]>1:\n            ans = \"NO\"\n            break\n    print(ans)", "passed": true, "time": 0.14, "memory": 14348.0, "status": "done"}, {"code": "import math\n\nT = int(input())\n\nfor i in range(T):\n  n = int(input())\n  #n,k = map(int, input().split())\n  a = list(map(int,input().split()))\n  #a = input()\n  d = False\n  \n  a.sort()\n\n  for i in range(1,n):\n    if a[i]-a[i-1]>1:\n      print('NO')\n      d = True\n      break\n  \n  if not d:\n    print('YES')\n  \n", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "from sys import stdin,stdout\nimport math\nfrom collections import Counter,defaultdict\nLI=lambda:list(map(int,input().split()))\nMAP=lambda:list(map(int,input().split()))\nIN=lambda:int(input())\nS=lambda:input()\n\ndef case():\n    n=IN()\n    a=sorted(LI())\n    for i in range(n-1):\n        if a[i+1]-a[i]>=2:\n            print(\"NO\")\n            return\n    print(\"YES\")\nfor _ in range(IN()):\n    case()\n                \n", "passed": true, "time": 0.24, "memory": 14176.0, "status": "done"}, {"code": "import math\nt = int(input())\nfor g in range(t):\n    n = int(input())\n    A = list(map(int,input().split()))\n    A.sort()\n    ans = \"YES\"\n    for i in range(1,n):\n        if(A[i]-A[i-1]>=2):\n            ans = \"NO\"\n            break\n    print(ans)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "ans = []\nfor _ in range(int(input())):\n    n = int(input())\n    u = list(map(int, input().split()))\n    u.sort()\n    for i in range(1, n):\n        if u[i] - u[i - 1] > 1:\n            print('NO')\n            break\n    else:\n        print('YES')\n", "passed": true, "time": 0.2, "memory": 14212.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nimport os\nfrom sys import stdin, stdout\n\n\ndef solve(tc):\n    n = int(stdin.readline().strip())\n    seq = list(map(int, stdin.readline().split()))\n    seq = sorted(seq)\n\n    base = seq[0]\n    for i in range(1,n):\n        if seq[i]-base>1:\n            print(\"NO\")\n            return\n        base = seq[i]\n    print(\"YES\")\n\n\n\ntcs = 1\ntcs = int(stdin.readline().strip())\ntc = 1\nwhile tc <= tcs:\n    solve(tc)\n    tc += 1\n", "passed": true, "time": 0.24, "memory": 14152.0, "status": "done"}, {"code": "def solve():\n    n = int(input())\n    a = list(map(int, input().split()))\n    a.sort()\n    for i in range(n - 1):\n        if abs(a[i + 1] - a[i]) > 1:\n            print('NO')\n            return\n    print('YES')\n\nt = int(input())\nfor _ in range(t):\n    solve()", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "from sys import stdin, stdout  \n \nt=int(stdin.readline())\nfor _ in range(t):\n    n=int(stdin.readline() )\n    #n,x=(map(int, stdin.readline().strip().split()))\n    arr=list(map(int, stdin.readline() .strip().split()))\n    #s=input()\n\n    #stdout.write(str(cp))\n    #stdout.write(\"\\n\")\n\n    arr=sorted(arr)\n    flg=0\n    for i in range(1,n):\n        if(arr[i]-arr[i-1]>1):\n            flg=1\n            break\n    if(flg):\n        print(\"NO\")\n    else:\n        print(\"YES\")\n", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n = int(input())\n    ar = list(map(int, input().split()))\n    ar.sort()\n    np = False\n    for i in range(n):\n        if ar[i] - ar[i-1] > 1:\n            np = True\n    if np:\n        print(\"NO\")\n    else:\n        print(\"YES\")", "passed": true, "time": 0.23, "memory": 14148.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n = int(input())\n    #n, k = map(int, input().split())\n    a = list(map(int, input().split()))\n    a.sort()\n    s=1 \n    for i in range(n-1):\n        if(abs(a[i]-a[i+1])>1):\n            s=0 \n    if(s==1):\n        print(\"YES\")\n    else:\n        print(\"NO\")", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "import sys\n# from collections import deque\n# from collections import Counter\n# from math import sqrt\n# from math import log\n# from math import ceil\n# from bisect import bisect_left, bisect_right\n\n# alpha=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n# mod=10**9+7\n# mod=998244353\n\n# def BinarySearch(a,x): \n# \ti=bisect_left(a,x) \n# \tif(i!=len(a) and a[i]==x): \n# \t\treturn i \n# \telse: \n# \t\treturn -1\n\n# def sieve(n): \n# \tprime=[True for i in range(n+1)]\n# \tp=2\n# \twhile(p*p<=n): \n# \t\tif (prime[p]==True): \n# \t\t\tfor i in range(p*p,n+1,p): \n# \t\t\t\tprime[i]=False\n# \t\tp+=1\n# \tprime[0]=False\n# \tprime[1]=False\n# \ts=set()\n# \tfor i in range(len(prime)):\n# \t\tif(prime[i]):\n# \t\ts.add(i)\n# \treturn s\n\n# def gcd(a, b):\n# \tif(a==0):\n# \t\treturn b \n# \treturn gcd(b%a,a)\n\nfast_reader=sys.stdin.readline\nfast_writer=sys.stdout.write\n\ndef input():\n\treturn fast_reader().strip()\n\ndef print(*argv):\n\tfast_writer(' '.join((str(i)) for i in argv))\n\tfast_writer('\\n')\n\n#____________________________________________________________________________________________________________________________________\n\nfor _ in range(int(input())):\n\tn=int(input())\n\tl=list(map(int, input().split()))\n\tl.sort()\n\tans='YES'\n\tfor i in range(n-1):\n\t\tif(l[i+1]-l[i]>1):\n\t\t\tans='NO'\n\t\t\tbreak\n\tprint(ans)", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    n = int(input())\n    A = list(map(int,input().split()))\n    A.sort()\n    ans = \"YES\"\n    for i in range(1,n):\n        if(A[i]-A[i-1]>=2):\n            ans = \"NO\"\n            break\n    print(ans)    \n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}]