You're given an array $b$ of length $n$. Let's define another array $a$, also of length $n$, for which $a_i = 2^{b_i}$ ($1 \leq i \leq n$). 

Valerii says that every two non-intersecting subarrays of $a$ have different sums of elements. You want to determine if he is wrong. More formally, you need to determine if there exist four integers $l_1,r_1,l_2,r_2$ that satisfy the following conditions:   $1 \leq l_1 \leq r_1 \lt l_2 \leq r_2 \leq n$;  $a_{l_1}+a_{l_1+1}+\ldots+a_{r_1-1}+a_{r_1} = a_{l_2}+a_{l_2+1}+\ldots+a_{r_2-1}+a_{r_2}$. 

If such four integers exist, you will prove Valerii wrong. Do they exist?

An array $c$ is a subarray of an array $d$ if $c$ can be obtained from $d$ by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end.


-----Input-----

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 100$). Description of the test cases follows.

The first line of every test case contains a single integer $n$ ($2 \le n \le 1000$).

The second line of every test case contains $n$ integers $b_1,b_2,\ldots,b_n$ ($0 \le b_i \le 10^9$). 


-----Output-----

For every test case, if there exist two non-intersecting subarrays in $a$ that have the same sum, output YES on a separate line. Otherwise, output NO on a separate line. 

Also, note that each letter can be in any case. 


-----Example-----
Input
2
6
4 3 0 1 2 0
2
2 5

Output
YES
NO



-----Note-----

In the first case, $a = [16,8,1,2,4,1]$. Choosing $l_1 = 1$, $r_1 = 1$, $l_2 = 2$ and $r_2 = 6$ works because $16 = (8+1+2+4+1)$.

In the second case, you can verify that there is no way to select to such subarrays.

Difficulty: interview

Starter code:

Solutions:
for __ in range(int(input())):
    n = int(input())
    ar = list(map(int, input().split()))
    ar.sort()
    ans = "NO"
    for i in range(1, n):
        if ar[i] == ar[i - 1]:
            ans = 'YES'
            break
    print(ans)

from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
input=sys.stdin.readline
def inp():
    return int(input())
def st():
    return input().rstrip('\n')
def lis():
    return list(map(int,input().split()))
def ma():
    return list(map(int,input().split()))
t=inp()
while(t):
    t-=1
    n=inp()
    a=lis()
    b=set(a)
    if(len(b)==n):
        print("NO")
    else:
        print("YES")


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 random
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(list(map(int,input().split())))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(list(map(int,stdin.readline().split())))
#sys.setrecursionlimit(1500)
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):
    'Find leftmost value greater than x'
    i = bi.bisect_left(a, x)
    if i != len(a):
        return i
    else:            
        return -1
        
def main():
    try:
        n=I()
        l=list(In())
        z=set()
        flag=0
        for x in l:
            if x not in z:
                z.add(x)
            else:
                flag=1
                break
        if flag:
            yes()
        else:
            no()
    except:
        pass
        
M = 998244353
P = 1000000007
 
def __starting_point():
    for _ in range(I()):main()
    #for _ in range(1):main()

__starting_point()

t=int(input())
while t>0 :
    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]) :
            f=1 
            break
    if f==1 :
        print("YES")
    else :
        print("NO")
    t-=1

import sys
input = sys.stdin.readline

def main():
    n = int(input())
    blst = list(map(int, input().split()))
    blst.sort()
    bef = -1
    for b in blst:
        if b == bef:
            print("YES")
            return
        bef = b
    print("NO")
    
for _ in range(int(input())):
    main()

a = int(input())
for i in range (a):
    b = int(input())
    c = list(map(int, input().split()))
    c.sort()
    def abc(c):
        for j in range (b - 1):
            if c[j] == c[j + 1]:
                return "YES"
        return "NO"
    print(abc(c))

for _ in range(int(input())):
    n = int(input())
    b = list(map(int, input().split()))
    b.sort()
    ok = False
    for i in range(1, n):
        ok |= b[i] == b[i - 1]
    print("YES" if ok else "NO")


import sys

input = sys.stdin.readline

for _ in range(int(input())):
    n = int(input())
    a = list(map(int,input().split()))
    print("YES" if len(set(a))!=n else "NO")


t=int(input())
for i in range(t):
    n=int(input())
    b=list(map(int,input().split()))
    if len(set(b))==n:
        print("NO")
    else:
        print("YES")



t=int(input())

for _ in range(t):
	n=int(input())
	b=list(map(int,input().split()))
	if len(set(b))==n:
		print("NO")
	else:
		print("YES")

for _ in range(int(input())):
    n = int(input())
    a = [*map(int,input().split())]
    if(len(set(a))!=n):
        print("YES")
    else:
        print("NO")