CodeEff/ECCO huggingface dataset:
# Original solution
a = int(eval(input()))
lis = list(map(int,input().split()))

ans = []

for i in range(a):
    b = lis[i]
    c = ans.count(b)
    if c == 0:
        ans.append(b)

if len(ans) == a:
    print("YES")
else:
    print("NO")

# Optimized solution
a = int(eval(input()))
lis = list(map(int,input().split()))

ans = list(set(lis))

if a == len(ans):
    print("YES")
else:
    print("NO")
# Original solution
length=eval(input())
#len-1
Narray=sorted(input().split())
n=0
while n<int(length)-1:
	if Narray[n] == Narray[n+1]:
		print("NO")
		break
	elif n==int(length)-2:
		print("YES")
		break
	else:
		n+=1
    	

# Optimized solution
s=eval(input())
array=[]
array+=(int(x) for x in input().split())
array.sort()
def judge(array,s):
  for i in range(int(s)-1):
    if array[i] == array[i+1]:
        return "NO"
  return "YES"

print((judge(array,s)))
# Original solution
n=int(eval(input()))
s=list(map(int,input().split()))
s.sort()

cnt=0
for i in range(n-1):
    for j in range(i+1,n):
        if s[i]==s[j]:
            print('NO')
            exit()
        else:
            cnt+=1
if cnt==n*(n-1)//2:            
    print('YES')
        

# Optimized solution
n=int(eval(input()))
s=list(map(int,input().split()))
s.sort()

cnt=0
for i in range(n-1):
    if s[i]==s[i+1]:
        print('NO')
        exit()
    else:
        cnt+=1
if cnt==n-1:            
    print('YES')
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

a = sorted(a)
for i in range(n-1):
    if a[i] == a[i+1]:
        print("NO")
        exit()
print("YES")
  

# Optimized solution
n = int(eval(input()))
a = set(list(map(int, input().split())))

if len(a) == n:
    print("YES")
else:
    print("NO")
# Original solution
import sys

N = int(eval(input()))
A = list(map(int,input().split()))
for i in range(N-1) :
    for j in range(i+1,N) :
        if A[i] == A[j] :
            print("NO")
            sys.exit()
print("YES")

# Optimized solution
import sys

N = int(eval(input()))
A = list(map(int,input().split()))
A = sorted(A)
for i in range(N-1) :
    if A[i] == A[i+1] :
        print("NO")
        sys.exit()
print("YES")
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
for a in A:
    if A.count(a) != 1:
        print("NO")
        exit()

print("YES")

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
if len(set(A)) == N:
    print("YES")
else:
    print("NO")
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
if len(set(A)) == N:
    print("YES")
else:
    print("NO")

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
if len(set(A)) == len(A):
    print("YES")
else:
    print("NO")
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
list=[]
for i in a:
	if i in list:
		print("NO")
		break
	list.append(i)
else:
	print("YES")



# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
a.sort()
for i in range(n-1):
	if a[i]==a[i+1]:
		print("NO")
		break
else:
	print("YES")
# Original solution
import collections
N = int(eval(input()))
A = list(map(int, input().split()))


table = collections.defaultdict(int)
for x in A:
    table[x] += 1
    if table[x] > 1:
        print("NO")
        exit(0)
print("YES")


# Optimized solution
N = int(eval(input()))
A = set(list(map(int, input().split())))
if len(A) == N:
    print("YES")
else:
    print("NO")
# Original solution
N = int(eval(input()))
A = set(list(map(int, input().split())))
if len(A) == N:
    print("YES")
else:
    print("NO")


# Optimized solution
N = int(eval(input()))
A = set((list(map(int, input().split()))))

if len(A) == N:
    print("YES")
else:
    print("NO")
# Original solution
num = int(eval(input()))
p = list(map(int, input().split()))
pList = list(p)

aList = []
ret = "YES"
for i in range(num):
    if pList[i] in aList:
        ret = "NO"
        break
    aList.append(pList[i])

print(("{}".format(ret)))

# Optimized solution
# C - Distinct or Not
# https://atcoder.jp/contests/abc154/tasks/abc154_c

num = int(eval(input()))
p = list(map(int, input().split()))
list.sort(p)

ret = "YES"
for i in range(num-1):
    if p[i] == p[i+1]:
        ret = "NO"
        break

print(("{}".format(ret)))
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
be_len = len(A)
A = list(set(A))
if len(A) == be_len:
    print("YES")
else:
    print("NO")


# Optimized solution
N = int(input())
A = list(map(int, input().split()))
print("YES") if len(A) == len(list(set(A))) else print("NO")
# Original solution
n = int(eval(input()))
lis = [x for x in input().split()]
lis.sort()

for i in range(1, n):
  if lis[i-1] == lis[i]:
    print("NO")
    exit()
  
print("YES")

# Optimized solution
n = int(eval(input()))
lis = input().split()
dic = {}

for i in range(n):
  if lis[i] not in dic:
    dic[lis[i]] = 1
  else:
    dic[lis[i]] += 1
    
for x in list(dic.values()):
  if x != 1:
    print("NO")
    exit()

print("YES")
# Original solution
n = int(eval(input()))
List = list(map(int, input().split()))
flag = True

for i in range(n):
    if flag:
        obj = List[i]
        for j in range(i+1, n - i):
            if obj == List[j]:
                flag = False
        
if flag:
    print('YES')
else:
    print('NO')

# Optimized solution
n = int(eval(input()))
List = list(map(int, input().split()))

def ha(st):
    return len(st) != len(set(st))

if ha(List):
    print('NO')
else:
    print('YES')
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
A.sort()

for i in range(N-1):
    for j in range(N-i-1):
        if A[i] == A[i+j+1]:
            print("NO")
            exit()

print("YES")

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
A.sort()

for i in range(N-1):
    if A[i] == A[i+1]:
        print("NO")
        exit()

print("YES")
# Original solution
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return list(map(int,sys.stdin.readline().replace("\n","").split()))
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list([int(x)*-1 for x in sys.stdin.readline().replace("\n","").split()])
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n = i()
a = intl()
a = list(set(a))
if len(a) == n:
    print("YES")
else:
    print("NO")

# Optimized solution
n = int(eval(input()))
print(("YES" if len(set(input().split())) == n else "NO"))
# Original solution
#入力（後でいじる）
def pin(type=int):
    return list(map(type,input().split()))
#どっかで最悪計算量の入力データを用意する関数を作ろう？
def worstdata():
    a=0
    return a
#solution:
def comp(x,y):
    dp=[0,max(act[0])]*(N+1) #[i]日目のActivity で得られる最大幸福量
    
    return 0

#input
n,=(pin())
S=list(pin())

c=[]
cond=0
for i in range(len(S)):
    if S[i] in c:
        cond=1
        break
    c.append(S[i])
#print(solution(H,N))
print((["NO","YES"][1-cond]))



# Optimized solution
#入力（後でいじる）
def pin(type=int):
    return list(map(type,input().split()))
#どっかで最悪計算量の入力データを用意する関数を作ろう？
def worstdata():
    a=0
    return a
#solution:
def comp(p):#期待値
    return ((p+1)/2)



#input
n,=(pin())
S=sorted(list(pin()))
cond=1
for i in range(1,n):
    if S[i]-S[i-1]==0:
        cond=0
        break

print((["NO","YES"][cond]))
# Original solution
n = int(eval(input()))
l = list(map(int, input().split()))
p = "YES"

for i in range(n):
    if 1 < l.count(l[i]):
        p = "NO"
        break
    
print(p)

# Optimized solution
n = int(eval(input()))
l = list(map(int, input().split()))

if len(l) != len(set(l)):
    print("NO")
else:
    print("YES")
# Original solution
n = int(eval(input()))
num = input().split()
 
def check():
  for s in num:
    if(num.count(s) >= 2):
      print("NO")
      return
  print("YES")

check()

# Optimized solution
n = int(eval(input()))
num = input().split()

if len(set(num)) == n:
  print("YES")
else:
  print("NO")
# Original solution
N = int(eval(input()))
A = list(input().split())
while A!=[]:
    a = A.pop()
    if a in A:
        print('NO')
        exit()
print('YES')

# Optimized solution
N = int(eval(input()))
A = list(input().split())
A.sort()
for i in range(N-1):
    if A[i]==A[i+1]:
        print('NO')
        exit()
print('YES')
# Original solution
import collections
s = int(eval(input()))
a = list(map(str, input().split()))
n = {}
for i in a:
  n.setdefault(i, 0)
for i in a:
  n[i] += 1
x = 0
for i in list(n.values()):
  if x <= i:
    x = i
if x == 1:
  print("YES")
else:
  print("NO")

# Optimized solution
s = int(eval(input()))
a = list(map(str, input().split()))
n = {}
for i in a:
  n.setdefault(i, 0)
for i in a:
  n[i] += 1
x = 0
for i in list(n.values()):
  if x <= i:
    x = i
if x == 1:
  print("YES")
else:
  print("NO")
# Original solution
s = int(eval(input()))
a = list(map(str, input().split()))
n = {}
for i in a:
  n.setdefault(i, 0)
for i in a:
  n[i] += 1
x = 0
for i in list(n.values()):
  if x <= i:
    x = i
if x == 1:
  print("YES")
else:
  print("NO")

# Optimized solution
n = eval(input())
a = list(map(int,input().split()))
if len(set(a)) == len(a):
  print("YES")
elif len(set(a)) != len(a):
  print("NO")
# Original solution
n = eval(input())
a = list(map(int,input().split()))
if len(set(a)) == len(a):
  print("YES")
elif len(set(a)) != len(a):
  print("NO")

# Optimized solution
n = eval(input())
a = list(map(int,input().split()))
if len(a)== len(set(a)):
  print("YES")
else:
  print("NO")
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

_A = set(A)

if len(A) == len(_A):
    print('YES')
else:
    print('NO')


# Optimized solution
N = eval(input())
A = input().split()

_A = set(A)

if len(A) == len(_A):
    print('YES')
else:
    print('NO')
# Original solution
import sys
n = int(eval(input()))
s = list(map(int, input().split()))
tmp = []
for i in s:
    if i in tmp:
        print('NO')
        sys.exit()
    tmp.append(i)
print('YES')

# Optimized solution
import sys
n = int(eval(input()))
s = list(map(int, input().split()))
s.sort()
k = 0
for i in s:
    if i == k:
        print('NO')
        sys.exit()
    k = i
print('YES')
# Original solution
N = int(eval(input()))

numList = list(map(int, input().split()))
numList.sort()

ans = "YES"

for z in range(N-1):
  if numList[z] == numList[z+1]:
    ans = "NO"
    break
    
print(ans)

# Optimized solution
n = int(eval(input()))
a_list = [i for i in input().split()]

a_set = set(a_list)

if len(a_set) == n:
    print('YES')
else:
    print('NO')
# Original solution
N = int(eval(input()))
seq = list(map(int,input().split()))
ans = "YES"

for i in range(N):
    for j in range(i+1, N):
        if seq[i] == seq[j]:
            ans = "NO"
            break
    if ans == "NO":
        break

print(ans)

# Optimized solution
N = int(eval(input()))
seq = list(map(int,input().split()))
ans = "YES"

seq.sort()

for i in range(N-1):
    if seq[i] == seq[i+1]:
        ans = "NO"
        break


print(ans)
# Original solution
N = int(eval(input()))
A_list = list(map(int,input().split()))

sw = 0
for i in range(len(A_list)):
  for j in range(i+1, len(A_list)):
    if A_list[i] == A_list[j]:
      sw = 1
      break
if sw == 1:
  print('NO')
else:
  print('YES')

# Optimized solution
N = int(eval(input()))
A_list = list(map(int,input().split()))
A_list.sort()
sw = 0
for i in range(len(A_list)-1):
  if A_list[i] == A_list[i+1]:
    sw = 1
    break
if sw == 0:
  print('YES')
else:
  print('NO')
# Original solution
a=int(eval(input()))
li = list(map(int,input().split()))
c = 0
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

for i in range(a-1):
    if len(list(set(li))) != len(li):
        c = 1
        break
    for j in range(i+1,a):
        x = make_divisors(li[j]*li[i])
        if len(x) != len(set(x)):
            c = 1
            break
    if c == 1:
        break

if c > 0:
    print('NO')
else:
    print('YES')

# Optimized solution
a=int(eval(input()))
li = list(map(int,input().split()))
c = 0
if len(li) != len(set(li)):
    print('NO')
else:
    print('YES')
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

cnt = 0

for i in range(n):
    for j in range(n):
        if a[i] == a[j]:
            cnt += 1

if cnt == n:
    print("YES")
elif cnt > n:
    print("NO")

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

if len(set(a)) == len(a):
    print("YES")
else:
    print("NO")
# Original solution
N=int(eval(input()))
A=list(map(int,input().split()))
ans=[]
for i in range(len(A)):
    if A[i] in ans:
        print("NO")
        break
    else:
        ans.append(A[i])
else:
    print("YES")

# Optimized solution
N=int(eval(input()))
A=list(map(int,input().split()))
if len(set(A))==len(A):
    print('YES')
else:
    print('NO')
# Original solution
S = int(eval(input()))
A = list(map(int,input().split()))

def main():
    flag = 0
    for i in range(len(A)-1):
        for j in range(i+1, len(A)):
            if A[i] == A[j]:
                flag = 1
                break
            else:
                continue

        if flag == 1:
            break
        else:
            continue

    if flag == 0:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()
    

# Optimized solution
S = int(eval(input()))
A = list(map(int,input().split()))

def main():
    flag = 0
    new_A = sorted(A)

    for i in range(S-1):
        if new_A[i] == new_A[i+1]:
            flag = 1
            break
        else:
            continue

    if flag == 0:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()
# Original solution
a = int(eval(input()))
li = list(map(int,input().split()))

n_li = sorted(li)


dup = [x for x in set(li) if li.count(x) > 1]

if not dup:
    print('YES')
else:
    print('NO')

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split(' ')))

is_break = False
seen = set()
for a in A:
    if a not in seen:
        seen.add(a)
    else:
        is_break=True
        break

if is_break:
    print('NO')
else:
    print('YES')
# Original solution
N= int(eval(input()))

A=list(input().split())

flag=1
for i in range(N-1):
  if A.count(A[i])>1:
    flag=0
if flag==1:
  print('YES')
else:
  print('NO')




# Optimized solution
N= int(eval(input()))

A=sorted(list(input().split()))
flag=1
for i in range(N-1):
  if A[i]==A[i+1]:
    flag=0
    break
if flag==1:
  print('YES')
else:
  print('NO')
# Original solution
def buble_sort(list,ans):
    i=len(list)
    while(i>1):
        for j in range(i-1):
            if(list[j]<list[j+1]):
                list[j],list[j+1]=list[j+1],list[j]
            elif(list[j]==list[j+1]):
                ans="NO"
                return ans
            else:
                pass
        i-=1
    return ans

N=int(eval(input()))
A=list(map(int,input().split()))
ans="YES"
ans=buble_sort(A,ans)
print(ans)

# Optimized solution
def quick_sort(list):
    stand=list[0]
    over=[]
    same=[]
    under=[]
    for i in list:
        if(i>stand):
            over.append(i)
        elif(i<stand):
            under.append(i)
        else:
            same.append(i)
    if(len(over)>1):
        over=quick_sort(over)
    else:
        pass
    if(len(under)>1):
        under=quick_sort(under)
    else:
        pass

    return over+same+under

N=int(eval(input()))
A=list(map(int,input().split()))
A=quick_sort(A)
ans="YES"
if(len(A)>1):
    for i in range(len(A)):
        if(A[i-1]==A[i]):
            ans="NO"
            break
        else:
            pass
else:
    pass
print(ans)
# Original solution
N = int(eval(input()))
An = list(map(int, input().split()))

duplicate_list = [x for x in set(An) if An.count(x) > 1]

if duplicate_list:
    print('NO')
else:
    print('YES')

# Optimized solution
N = int(eval(input()))
An = list(map(int, input().split()))
Bn = sorted(An)

y = -1
count = 0
for x in Bn:
    if x == y:
        count += 1
    y = x

if count == 0:
    print("YES")
else:
    print("NO")
# Original solution
def main():
        num = int(eval(input()))
        list_num = list(map(int, input().split()))
        flag = False
        for i,v in enumerate(list_num):
                if v in list_num[i+1:]:
                        flag = True
                        break

        if flag:
                print("NO")
        else:
                print("YES")

if __name__ == "__main__":
        main()


# Optimized solution
import os

def main():
	num = int(eval(input()))
	list_num = set(map(int, input().split()))
	if len(list_num) != num:
		print("NO")
	else:
		print("YES")

if __name__ == "__main__":
	main()
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
for _ in range(2,n+1):
  if a[_-1] in a[:_-1]:
    print('NO')
    exit()
print('YES')

# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
if len(a)==len(set(a)):
  print('YES')
else:
  print('NO')
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))
for idx, i in enumerate(a):
    if i in a[idx+1:]:
        print('NO')
        break
if idx == n - 1:
    print('YES')

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
a = sorted(a)
flag = True
for idx, i in enumerate(a[:-1]):
    if i == a[idx+1]:
        print('NO')
        flag= False
        break
if flag:
    print('YES')
# Original solution
set = int(eval(input()))

lis = list(map(int, input().split()))

v = 0

for i in range(set):
    for k in range(1 + i, set):
        #print()
        if lis[i] == lis[k]:
            v = 1
            
if v == 0:
    print("YES")
else:
    print("NO")

# Optimized solution
set = int(eval(input()))
 
lis = list(map(int, input().split()))
 
v = 0
lis.sort()

for i in range(set-1):
    if lis[i] == lis[i + 1]:
        v =1
            
if v == 0:
    print("YES")
else:
    print("NO")
# Original solution
count = int(eval(input()))
number_li = input().split(' ')

check_2 = 0

for i in range(count):
    check = number_li[i]
    for n in range(count):
        if i == n:
            continue

        if check == number_li[n]:
            check_2 = 1
            break
    if check_2 == 1:
        break

if check_2 == 1:
    print('NO')
else:
    print('YES')

# Optimized solution
count = int(eval(input()))
number_li = input().split(' ')
number_set = set(number_li)

list_len = len(number_li)
set_len = len(number_set)

if list_len == set_len:
    print('YES')
else:
    print('NO')
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))

ans=True
for i in range(n):
	for k in range(i+1,n):
		if a[i]==a[k]:
			ans=False

print(("YES" if ans else "NO"))

# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
setA=set(a)
print(("YES" if len(setA)==n else "NO"))
# Original solution
a = int(eval(input()))

s = input().split()
d = len(s)

for i in range(d-1):
  for f in range(i+1, d):
    if s[i] == s[f]:
      print("NO")
      break
  else:
    continue
  break
else:
  print("YES")

# Optimized solution
a = int(eval(input()))

s = input().split()

e = set(s)
if len(s) == len(e):
  print("YES")
else:
  print("NO")
# Original solution
n = int(eval(input()))
A = list(map(int, input().split()))
already = []
ans = 'YES'
for a in A:
    if a in already:
        ans = 'NO'
        break
    else:
        already.append(a)
print(ans)

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
if len(a) == len(set(a)):
    print('YES')
else:
    print('NO')
# Original solution
N = int(eval(input()))
A = [int(i) for i in input().split(" ")]

flag = True

for i in A:
    if A.count(i) != 1:
        flag = False
        break

if flag:
    print("YES")
else:
    print("NO")

# Optimized solution
N = int(eval(input()))
A = [int(i) for i in input().split(" ")]

flag = True

A.sort()
for i in range(1,len(A)):
    if A[i-1] == A[i]:
        flag =False
        break

if flag:
    print("YES")
else:
    print("NO")
# Original solution
def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    tmp = []
    is_unique = True
    for i in range(n):
        for j in tmp:
            if j == a[i]:
                is_unique = False
                break
        if not is_unique:
            break
        tmp.append(a[i])
    
    if is_unique:
        print("YES")
    else:
        print("NO")


if __name__=="__main__":
    main()


# Optimized solution
def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    tmp = {}
    is_unique = True
    for i in range(n):
        if a[i] in tmp:
            is_unique = False
            break
        tmp[a[i]] = a[i]
    
    if is_unique:
        print("YES")
    else:
        print("NO")


if __name__=="__main__":
    main()
# Original solution
n = eval(input())
a = input().split()
b = [int(i) for i in a]

for i in range(0,int(n)):
  if(b[i] in b[i+1:]):
    print("NO")
    exit()
print("YES")


# Optimized solution
n = eval(input())
a = input().split()
b = [int(i) for i in a]
 
b.sort()

for i in range(0,int(n)-1):
  if(b[i] == b[i+1]):
    print("NO")
    exit()
print("YES")
# Original solution
from collections import Counter
N=int(eval(input()))
A=list(map(int, input().split()))
B=Counter(A)
if N==len(B):
	print('YES')
else:
	print('NO')

# Optimized solution
from collections import Counter
N=int(eval(input()))
A=list(map(int, input().split()))
B=Counter(A)
if len(A)==len(B):
	print('YES')
else:
	print('NO')
# Original solution
count=0
mainasu=0
num=int(eval(input()))
An=[int(i) for i in input().split()]

for i in An[0:num]:
    mainasu+=1
    for w in An[mainasu:]:
        if w==i:
            count+=1
        
    if count>=1:
        break
    
if 0==count:
    print("YES")
    
else :
    print("NO")

# Optimized solution
def duplication(lis):
    return len(lis) == len(set(lis)) 

num=int(eval(input()))
An=[int(i) for i in input().split()]


if duplication(An) == True:
    print("YES")
    
else :
    print("NO")
# Original solution
# coding: utf-8

import collections

n=int(eval(input()))
a_list=list(map(int,input().split()))

if len(collections.Counter(a_list))==len(a_list):
    print("YES")
else:
    print("NO")

# Optimized solution
# coding: utf-8

n=int(eval(input()))
a_list=list(map(int,input().split()))

if len(a_list)==len(set(a_list)):
    print("YES")
else:
    print("NO")
# Original solution
import sys

n=int(eval(input()))
a=input().split()
for i in range(n-1):
  for j in range(i+1,n):
    if a[i]==a[j]:
      print("NO")
      sys.exit()
print("YES")

# Optimized solution
import sys

n=int(eval(input()))
a=sorted([int(x) for x in input().split()])
for i in range(n-1):
  if a[i]==a[i+1]:
    print("NO")
    sys.exit()
print("YES")
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
lst = []
for x in a:
  if x in lst:
    print('NO')
    break
  lst.append(x)
else:
  print('YES')
  


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
lst = []
if len(set(a)) != len(a):
  print('NO')
else:
  print('YES')
# Original solution
# -*- coding: utf-8 -*-
n = int(eval(input()))
a = [int(i) for i in input().split()]

"""
if len(set(a)) == len(a):
    print("YES")
else:
    print("NO")
"""

flag = True
a.sort()
for i in range(n - 1):
    if a[i] == a[i + 1]:
        flag = False
if flag:
    print("YES")
else:
    print("NO")


# Optimized solution
# -*- coding: utf-8 -*-
n = int(eval(input()))
a = [int(i) for i in input().split()] 

if len(set(a)) == n:
    print("YES")
else:
    print("NO")