CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
flag = True
for i in range(n-1):
    for j in range(i+1, n):
        if a[i] == a[j]:
            flag = False
            break
    else:
        continue
    break

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

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

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

l = []
ans = 'YES'
for i in a:
    if (i in l) != True:
        l.append(i)
    else:
        ans = 'NO'

print(ans)



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

l = set(a)
if n == len(l):
    print('YES')
else:
    print('NO')
# Original solution
n = int(eval(input()))
a = [int(i) for i in input().split()]
b = set(a)
if len(a) == len(b):
    print('YES')
else:
    print('NO')

# Optimized solution
n = int(eval(input()))
a = set(map(int, input().split()))
if len(a) == n:
    print('YES')
else:
    print('NO')
# Original solution
d1 = int(eval(input()))
d = input().split()
d2 = [int(x) for x in d]
count=0
for n in range(d1):

    for m in range(n+1,d1):
        if d2[n] == d2[m]:
            count+=1


if count==0  :
    print("YES")
else:
    print("NO")

    

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

c = [0]*n
flag = 0
c[0] = a[0]
for i in range(n):
  for j in range(i):
    if c[j] == a[i]:
      flag = 1
      break
  if flag == 1:
    break
  else:
    c[i] = a[i]

#print(c)
if flag == 0:
  print("YES")
else:
  print("NO")
  

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

a.sort()
flag = 0

for i in range(n-1):
  if a[i] == a[i+1]:
    flag = 1
    break
    
if flag == 0:
  print("YES")
else:
  print("NO")
# Original solution
# -*- coding: utf-8 -*-

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

for i in range(n):
    for j in range(i+1, n):
        if al[i] == al[j]:
            print('NO')
            exit()
print('YES')

# Optimized solution
# -*- coding: utf-8 -*-

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

for i in range(n-1):
    if al[i] == al[i+1]:
        print('NO')
        exit()
print('YES')
# Original solution
def onlya(n , a):

    ans = "YES"

    for i in range(n):
        for w in range(i + 1 , n):
            if a[i] == a[w]:
                return "NO"

    return ans

def main():
    n = int(eval(input()))
    a = list(map(int,input().split()))
    print((onlya(n , a)))

if __name__ == '__main__':
    main()

# Optimized solution

def has_duplicates(seq):
    return len(seq) != len(set(seq))

def onlya(n , a):

    ans = "YES"

#    for i in range(n):
#        for w in range(i + 1 , n):
#            if a[i] == a[w]:
#                return "NO"

    if has_duplicates(a):
        return "NO"

    return ans

def main():
    n = int(eval(input()))
    a = list(map(int,input().split()))
    print((onlya(n , a)))

if __name__ == '__main__':
    main()
# Original solution
#C
#入力
N=int(eval(input()))
A=list(map(int,input().split()))

#処理
t=0
for i in range(len(A)):
    if A[i] in A[:i]+A[i+1:]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")

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

#処理

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

for nn in range(n - 1, 0, -1):
  t = li.pop(nn)
  if li.count(t) != 0:
    print('NO')
    exit()
print('YES')

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

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

N = int(eval(input()))
*A, = list(map(int, input().split()))


D = {}

for i in range(N):
    e = A[i]
    if not(e in D):
        D[e] = 1
    else:
        D[e] = D[e] + 1

for key in D:
    if D[key]>=2:
        print("NO")
        sys.exit()
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
n=int(eval(input()))
A=list(map(int,input().split()))

def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]

if len(A)==len(get_unique_list(A)):
    print("YES")
else:
    print("NO")

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

A = list(set(A))

if len(A) == n:
    print('YES')
else :
    print('NO')
# Original solution
def merge(l,r,a):
    l1 = len(l)
    r1 = len(r)
    i,j,k = 0,0,0
    while j<l1 and k<r1:
        if l[j]<r[k]:
            a[i] = l[j]
            j+=1
        elif l[j] == r[k]:
            a[i]=l[j]
            j+=1
            global res
            print("NO")
            quit()
            return 0
        else:
            a[i] = r[k]
            k+=1
        i+=1
    while j<l1:
        a[i] = l[j]
        j+=1
        i+=1
    while k<r1:
        a[i] = r[k]
        k+=1
        i+=1
    return a

def mergeSort(a):
    n = len(a)
    if n == 1:
        return a
    else:
        mid = n//2
        left = []
        right = []
        for i in range(mid):
            left.append(a[i])
        for i in range(mid, n):
            right.append(a[i])
        mergeSort(left)
        mergeSort(right)
        merge(left,right,a)
        return a


n = int(eval(input()))
a = list(map(int,input().split()))
res = True
s = mergeSort(a)
if res:
    print("YES")
else:
    print("NO")

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

A.sort()
ans = "YES"
for i in range(N-1):
    if A[i] == A[i+1]:
        ans = "NO"
        break

print(ans)

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

ans ="YES" if len(set(A))==N else "NO"

print(ans)
# Original solution
num = eval(input())
str_list = input().split(" ")
 
yes = True
 
for index, s in enumerate(str_list):
	if s in str_list[:index]:
		yes = False
		break
if yes:
	print("YES")
else:
	print("NO")

# Optimized solution
num = eval(input())
str_list = input().split(" ")
 
yes = True
num_dict = {}
for s in str_list:
	if s in num_dict:
		yes = False
		break
	else:
		num_dict[s] = 1
if yes:
	print("YES")
else:
	print("NO")
# Original solution
import collections

N=int(eval(input()))
A=list(map(int,input().split()))
a=collections.Counter(A).most_common()
print(("YES" if a[0][1]==1 else "NO"))


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

i=0
while(i<n):
  if(a[i] in a[i+1:]):
    print("NO")
    sys.exit()
  i += 1
print("YES")

# Optimized solution
import sys
n = int(eval(input()))
a = list(map(int,input().split()))
'''
for num in a:
  i = a.index(num)
  if(num in a[i+1:]):
    print("NO")
    sys.exit()
print("YES")
'''

i=0
a.sort()
while(i<n-1):
  if(a[i] == a[i+1]):
    print("NO")
    sys.exit()
  i += 1
print("YES")
# Original solution
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str

def solve(N: int, A: "List[int]"):
    for i in range(0,N):
        if (A[i] in A[i+1:]):
            print(NO)
            return

    print(YES)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/env python3
import sys

YES = "YES"  # type: str
NO = "NO"  # type: str

def solve(N: int, A: "List[int]"):
    p = sorted(A)
    for i in range(0,N-1):
        if (p[i] == p[i+1]):
            print(NO)
            return

    print(YES)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
Ai = list(map(int, input().split()))
Distinct = 0
for x in range(N-1):
    if Ai[x] in Ai[x+1:]:
        Distinct += 1

if Distinct == 0:
    print('YES')

else:
    print('NO')

# Optimized solution
N = int(eval(input()))
Ai = list(map(int, input().split()))
Ai_set = set(Ai)
if len(Ai) - len(Ai_set) == 0:
    print('YES')

else:
    print('NO')
# Original solution
N = int(eval(input()))
A = input().split()

for i in range(N):
    a = A.pop(0)
    if a in A:
        print("NO")
        break

if i == N-1:
    print("YES")



# Optimized solution
N = int(eval(input()))
A = input().split()
A.sort()
f = 0

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

if f==0:
    print("YES")
# Original solution
n = int(eval(input()))
a = [int(i) for i in input().split()]

tmp = ""

for i in range(n):
    tmp = a[i]
    for j in range (i+1, n):
        if (tmp ==  a[j]):
            print("NO")
            exit()
        else:
            continue

print("YES")


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

a = sorted(a)
tmp = ""

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

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

# Optimized solution
import sys
N=int(eval(input()))
A=list(map(int,input().split()))
A.sort()
for i in range(1,N):
    if A[i-1]==A[i]:
        print('NO')
        sys.exit()
print('YES')
# Original solution
import sys
stdin = sys.stdin
from collections import deque

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

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

# Optimized solution
import sys
stdin = sys.stdin
from itertools import accumulate

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

n = ni()
a = na()
if n == len(set(a)):
    print("YES")
else:
    print("NO")
# Original solution
N=int(eval(input()))
S=list(map(int,input().split()))
P=set(S)
Q=len(P)
if N==Q:
	print("YES")
else:
	print("NO")

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

min_a = min(a)
x = [i for i in range(min_a, max(a)+1)]
for i in range(n):
   if x[a[i]-min_a] == -1:
      print('NO')
      exit()
   else:
      x[a[i]-min_a] = -1

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
N = int(eval(input()))
A = set(input().split())
print(('YNEOS'[len(A)!=N::2]))

# Optimized solution
n = int(eval(input()))
print(('YNEOS'[len(set(input().split()))!=n::2]))
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
cnt = 0
for i in range(1,n):
  for j in range(i):
    if a[i] == a[j]:
      cnt = 1
if cnt == 0:
  print("YES")
else:
  print("NO")

# 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()))
sq = list(map(int, input().split()))
for _ in range(n):
    c = sq.pop()
    if c in sq:
        print('NO')
        exit()
print('YES')

# Optimized solution
n = int(eval(input()))
sq = list(map(int, input().split()))
st = set(sq)
if len(sq) == len(st):
    print('YES')
else:
    print('NO')
# Original solution
import sys
msg = sys.stdin.readlines()
a = []
for x in msg:
  a.append(x.replace('\n', ''))
arra = a[1].split(' ')
dump = []
res = 'YES'
for x in range(int(a[0])):
  if arra[x] in dump:
    res = 'NO'
    break
  dump.append(arra[x])
print(res)



# Optimized solution
import sys
msg = sys.stdin.readlines()
a = []
for x in msg:
  a.append(x.replace('\n', ''))
arra = a[1].split(' ')
arra = [int(x) for x in arra]
if len(arra) == len(set(arra)):
  print('YES')
else:
  print('NO')
# Original solution
n = int(eval(input()))
A = input().split(' ')

fl = "YES"
for i, a in enumerate(A):
  if a in A[i+1:]:
    fl = "NO"
    break

print(fl)

# Optimized solution
n = int(eval(input()))
A = 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()))

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

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

if n == len(set(a)):
    print('YES')
else:
    print('NO')
# Original solution
import collections
N=int(eval(input()))
L=list(map(int,input().split()))
a=len(L)
c=len(set(L))
if a==c:
    print('YES')
else:print('NO')

# Optimized solution
N=int(eval(input()))
L=list(map(int,input().split()))
a=len(L)
c=len(set(L))
if a==c:
    print('YES')
else:print('NO')
# Original solution
count = int(eval(input()))
s = list()
for x in input().split():
    if x in s:
        print("NO")
        break
    else:
        s.append(x)
else:
    print("YES")

# Optimized solution
count = int(eval(input()))
A      = [int(x) for x in 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()))
flag = 0
A.sort()
for i in range(len(A)-1):
    if A[i] == A[i+1]:
        flag += 1
        print("NO")
        break
    else:
        continue
if flag == 0:
    print("YES")

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
S = set(A)
if len(A) == len(S):
  print("YES")
else:
  print("NO")
# Original solution
n=int(eval(input()))
v=list(map(int,input().split()))
print(("YNEOS"[len(set(v))<n::2]))


# Optimized solution
n=int(eval(input()))
v=set(input().split())
print(("YNEOS"[len(v)<n::2]))
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
result = "YES"
for i in range(N):
    for j in range(N-i-1):
        if(A[i]== A[i+j+1]):
            result = "NO"
print(result)

# Optimized solution
N = int(eval(input()))
A = sorted(list(map(int,input().split())))
result = "YES"
for i in range(N-1):
    if(A[i]== A[i+1]):
        result = "NO"
print(result)
# Original solution
input_first = eval(input())
input_second= input().split()
N = int(input_first)
in_list = [int(i) for i in input_second]


flag = 0
for i in range(N):
    if flag !=0:
        break
    for j in range(i+1,N):
        # print("i",in_list[i],"j",in_list[j])

        if in_list[i]==in_list[j]:
            print("NO")
            flag =1
            break

        
if flag ==0:
    print("YES")


# Optimized solution

# input_first= 5
# input_second=[2,6,1,4,5] 
input_first = eval(input())
input_second= input().split()
N = int(input_first)
in_list = [int(i) for i in input_second]


check_dic = {}
flag  =0
for i in in_list:
    if i in list(check_dic.keys()):
        # print(i)
        print("NO")
        flag = 1
        break
    else:
        check_dic[i] = True
    

# print(check_dic)
if flag ==0:
    print("YES")
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
B = set(A)

if N == len(B):
    print("YES")
else:
    print("NO")

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

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

N = int(eval(input()))
A = list(map(int, input().split()))

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

print("YES")

# Optimized solution
import sys

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

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

print("YES")
# Original solution
N=int(eval(input()))
A=list(map(int,input().split()))

A_set=set(A)
if len(A_set)==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
def is_same(lst):
  n=len(lst)
  for i in range(n-1):
    for j in range(i+1,n):
      if(lst[i]==lst[j]):
        return True
  return False
    

n=int(eval(input()))
input_line=[int(x) for x in input().split()]
if(not is_same(input_line)):
  print("YES")
else:
  print("NO")

# Optimized solution
def is_neighbor_same(lst):
  for i in range(len(lst)-1):
    if(lst[i]==lst[i+1]):
      return True
  return False

eval(input())
input_line=[int(x) for x in input().split()]
input_line.sort()
if(is_neighbor_same(input_line)):
  print("NO")
else:
  print("YES")
# Original solution
n = int(eval(input()))
a = list(map(int,input().split()))

ans = True
for i in range(n-1):
    for j in range(i+1,n):
        if a[j]==a[i]:
            ans = False
            break
        else:
            continue
if ans==True:
    print("YES")
else:
    print("NO")


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

if len(A)==len(a):
    print("YES")
else:
    print("NO")
# Original solution
import sys
N = int(eval(input()))
A = [int(i) for i in input().split()]
flg = 0
for i in range(len(A)-1):
  #print("i:"+str(i))
  for j in range(i+1,len(A)):
    #print("  j:"+str(j))
    if A[i] == A[j]:
      print("NO")
      sys.exit()
print("YES")

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

flag = True
for i in range(N):
  for j in range(i+1, N):
    if A[i] == A[j]:
      flag = False
      break
if flag:
  print("YES")
else:
  print("NO")

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

flag = True
A = sorted(A)
for i in range(N-1):
  if A[i] == A[i+1]:
    flag = False
if flag:
  print("YES")
else:
  print("NO")
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
s=set(a)
if n==len(s):
    print('YES')
else:
    print('NO')

# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
b=len(set(a))
if n==b:
    print('YES')
else:
    print('NO')
# Original solution
import sys

N = int(eval(input()))
d = list(map(int, input().split(" ")))

for item in d:
  if d.count(item) > 1:
    print("NO")
    sys.exit()

print("YES")


# Optimized solution
import sys

N = int(eval(input()))
d = list(map(int, input().split(" ")))

newList = list(dict.fromkeys(d))

if len(d) == len(newList):
  print('YES')
else:
  print("NO")
# Original solution
n = int(eval(input()))
li = [int(x) for x in input().split()]

sub = list()
for i in li:
    if i in sub:
        print("NO")
        break
    sub.append(i)
else:
    print("YES")

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

nozoki = list(set(li))
nozoki.sort()
li.sort()
if (nozoki == li):
    print("YES")
else:
    print("NO")
# Original solution
n = int(eval(input()))
li = [int(x) for x in input().split()]

nozoki = sorted(list(set(li)))
li.sort()
if (nozoki == li):
    print("YES")
else:
    print("NO")

# Optimized solution
n = int(eval(input()))
li = [int(x) for x in input().split()]
a = len(li)
se = set(li)
b = len(se)
if (a==b):
    print("YES")
else:
    print("NO")
# Original solution
N = int(eval(input()))
list1 = sorted(list(map(int, input().split())))
pre_num = None
s = 'YES'
for num in list1:
  if num == pre_num:
    s = 'NO'
    break
  pre_num = num
print(s)

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

s = 'YES'
for i in range(N-1):
  if list1[i] == list1[i+1]:
    s = 'NO'
    break
print(s)
# Original solution
n = int(eval(input()))
s = list(map(int,input().split()))

a = 0
for i in range(len(s)):
    if s.count(s[i]) > 1:
        a = 1
        break

if a == 0:
    print("YES")
else:
    print("NO")

# Optimized solution
n = int(eval(input()))
s = list(map(int,input().split()))
 
def count(x):
    if len(s) != len(set(x)):
        return "NO"
    else:
        return "YES"
print((count(s)))
# Original solution
N=int(eval(input()))
A=input().split()
 
for i in range(N):
  if A.count(A[i]) >1:
    print("NO")
    exit(0)
print("YES")

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

A=sorted(A)

for i in range(0,N):
  if len(A) > i+1:
    if A[i] == A[i+1]:
      print("NO")
      exit(0)
print("YES")
# Original solution
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = lr()
print(('YES' if len(set(A)) == N else 'NO'))


# Optimized solution
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = lr()
bl = len(set(A)) == N
print(('YES' if bl else 'NO'))
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
flag = False
for i in range(N-1):
    j = i+1
    while(j<N):
        if A[i]==A[j]:
            flag = True
            break
        j += 1
    if flag:
        break
if flag:
    print("NO")
else:
    print("YES")

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

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

# Optimized solution
import sys

def solve():
    input = sys.stdin.readline
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    A = set(A)
    if len(A) == N: print("YES")
    else: print("NO")

    return 0

if __name__ == "__main__":
    solve()
# Original solution
N = int(eval(input()))
A_list = [int(i) for i in input().split(" ")]

result = "YES"
for i in range(0, N-1):
  for j in range(i+1, N):
    if A_list[i] == A_list[j]:
      result = "NO"
      break
  if result == "NO":
    break

print(result)


# Optimized solution
N = int(eval(input()))
A_list = [int(i) for i in input().split(" ")]
B_list = list(set(A_list))

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

l=[]
dup=False
for e in A:
    if e in l:
        dup=True
        break
    else:
        l.append(e)

if dup==False:
    print("YES")
else:
    print("NO")

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

A.sort()
a=-1
ndup=True
for e in A:
    if a==e:
        ndup=False
    else:
        pass
    a=e
if ndup==True:
    print("YES")
else:
    print("NO")