Given is a sequence of integers A_1, A_2, ..., A_N.
If its elements are pairwise distinct, print YES; otherwise, print NO.

-----Constraints-----
 - 2 ≤ N ≤ 200000
 - 1 ≤ A_i ≤ 10^9
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N
A_1 ... A_N

-----Output-----
If the elements of the sequence are pairwise distinct, print YES; otherwise, print NO.

-----Sample Input-----
5
2 6 1 4 5

-----Sample Output-----
YES

The elements are pairwise distinct.

Difficulty: introductory

Starter code:

Solutions:
def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7

#import numpy as np
import sys
import math
import collections

n =N()
a = L()
s = set()
for i in range(n):
    if a[i] in s:
        print("NO")
        return
    s.add(a[i])
print("YES")

N = int(input())
A_ls = input().split(' ')
rst = set()
for i in A_ls:
    rst.add(i)
if len(rst) == N:
    print('YES')
else:
    print('NO')

import copy

N = int(input())
list1 = list(map(int, input().split()))
list2 = copy.copy(list1)
list3 = set(list1)



x=len(list2)
y=len(list3)


if x==y:
    print('YES')
else:
    print('NO')

def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    print('YES' if len(a)==len(set(a)) else 'NO')
resolve()

N = int(input())
A_ls = list(input().split(' '))
A_set = { i for i in A_ls }
if len(A_set) == N:
    print('YES')
else:
    print('NO')

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

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

print(ans)


N=int(input())
A=sorted(list(map(int,input().split())))
l=[]
#print(A)
for i in range(N-1):
  l.append(A[i+1]-A[i])

if 0 in l:
  print('NO')
else:print('YES')


n = int(input())
a = list(map(int,input().split()))
ans = len(a)
a1 = set(a)
ans1 = len(a1)

if ans == ans1:
  print("YES")
else:
  print("NO")

num = int(input())
table = list(map(int, input().split()))
count = 0
list.sort(table)
if num == 2:
        if table[0] == table[1]:
            count += 1
else:
    for i in range(1, num-1):
        if num == 2:
            if table[0] == table[1]:
                count += 1
        elif table[i] == table[i+1] or table[i-1] == table[i]:
            count += 1
        else:
            continue
if count == 0:
    print('YES')
else:
    print('NO')

n = int(input())
print("YES" if len(set(map(int,input().split())))==n else "NO")

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

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

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

for x in range(n-1):
  if an[x+1]-an[x] == 0:
    print("NO")
    break

else:
  print("YES")


n=int(input())
x=list(map(int,input().split()))
if(len(set(x))==n):print("YES")
else:print("NO")


input();a=[*map(int,input().split())];print('YNEOS'[len(set(a))!=len(a)::2])

import sys

n = int(input())
a = dict()
for x in map(int, input().split()):
  if a.get(x) == 1:
    print('NO')
    return

  a[x] = 1

print('YES')


N = int(input())
lst = list(map(int, input().split()))
k = list(set(lst))
if len(k) == N:
    print('YES')

else:
    print('NO')

n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(n-1):
	if l[i] == l[i+1]:
		print('NO')
		return

print('YES')

n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
ans = "YES"

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

print(ans)


N=int(input())
#b,c=int(input()),int(input())
# c=[]
#  for i in b:
#     c.append(i)
#e1,e2 = map(int,input().split())
A = list(map(int,input().split()))
#j = [input() for _ in range(a)]
# h = []
# for i in range(e1):
#     h.append(list(map(int,input().split())))
A.sort()
ans="YES"
for i in range(1,N):
    if A[i-1]==A[i]:
        ans="NO"
        break
print(ans)

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

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


n = int(input())
A = list(map(int, input().split()))

A = list(set(A))

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

n = int(input())
a = list(map(int, input().split()))
an = set(a)

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


n = int(input())
a = list(map(int,input().split()))
aa = set(a)
print("YES" if len(a) ==len(aa) else "NO")

N=int(input())
K=set(input().split())
i=len(K)
if i==N:
    print('YES')
else:
    print('NO')

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

s=set()
for i in range(N):
  s.add(A[i])
  
if len(s)==N:
  print("YES")
else:
  print("NO")

N = int(input())
A_ls = input().split(' ')
A_set = { i for i in A_ls }
if len(A_set) == N:
    print('YES')
else:
    print('NO')

N = int(input())
A = input().split()

A_set = set(A)

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

N=int(input())
A=sorted(list(map(int,input().split())))
l=[]
for i in range(N-1):
  l.append(A[i+1]-A[i])

if 0 in l:
  print('NO')
else:print('YES')


N = int(input())
A = sorted([int(i) for i in input().split()])
for i in range(N-1):
    if(A[i] == A[i+1]):
        print("NO")
        return
print("YES")

n=int(input())
nums=list(map(int,input().split()))
setnum=set(nums)
if(len(setnum)==n):
  print("YES")
else:
  print("NO")

n = int(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'    
print(ans)

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

C = collections.Counter(A)

V = C.values()
L = list(V)


for i in range(len(L)):
    if L[i] > 1:
        print('NO')
        return
        
print('YES')

N = int(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")

N = int(input())
A = list(map(int, input().split()))
A_ = set(A)
if len(A) == len(A_):
    print('YES')
    return
else:
    print('NO')
    return

n = int(input())
a = map(int, input().split())
c = set(a)

if len(c) == n:
    print('YES')
else:
    print('NO')

n = int(input())
s = list(map(int,input().split()))
temp = len(s)
ans = len(list(set(s)))
if temp == ans:
    print('YES')
else:
    print('NO')

n = int(input())
lst = [ int(i) for i in input().split()]
 
if len(set(lst)) == n:
  print("YES")
else:
  print("NO")

n=int(input())
a=list(map(int,input().split()))
b=set(a)
if len(a)==len(b):
    print('YES')
else:
    print('NO')

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

A_set = set(A)

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

n = int(input())
m = len(set(map(int, input().split())))
print(('YES' if n == m else 'NO'))


n = int(input())
A = list(map(int,input().split()))
UA = set(A)
print('YES' if len(A) == len(UA) else 'NO')

N = int(input())
A = list(map(int, input().split()))
A.sort()
print("YNEOS"[any(a==b for a, b in zip(A, A[1:]))::2])

n=int(input())
a=list(map(int,input().split()))
print(('YES' if len(a)==len(set(a)) else 'NO'))


n = int(input())
a = list(map(int,input().split()))
print("YES" if len(set(a))==len(a) else "NO")

N=int(input())
A=list(map(int,input().split()))
dic={}
for num in A:
    if num not in dic:
        dic[num]=1 
    else:
        dic[num]+=1
if max(dic.values())>1:
    print('NO')
else:
    print('YES')

n = int(input())
A = list(map(int, input().split()))
A.sort()
success = True
for i in range(n-1):
    if A[i] == A[i+1]:
        success = False
        break
if success:
    print("YES")
else:
    print("NO")

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

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

N = int(input())
A_ls = map(int, input().split(' '))
rst = set()
for i in A_ls:
    rst.add(i)
if len(rst) == N:
    print('YES')
else:
    print('NO')

n = int(input())
a = [int(x) for x in input().split()]
c = []
res = "YES"
for i in range(n):
  c.append(a[i])
c = set(c)
if len(c) != n:
  res = "NO"
print(res)

n = int(input())
a = list(map(int,input().split()))
a.sort()
before = a[0]
for i in range(1,n):
    if before == a[i]:
        print("NO")
        break
    before = a[i]
else:
    print("YES")

n=int(input())
a=list(map(int,input().split()))

b=set(a)

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

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

A.sort()

ans = 'YES'
for i in range(1, N):
	if A[i - 1] == A[i]:
		ans = 'NO'
		break

print(ans)

N = int(input())
Alist = list(map(int,input().split()))

temp = len(Alist)
ansnum = len(list(set(Alist)))

if ansnum == temp:
  print ("YES")
else :
  print ("NO")

N=int(input())
As=sorted(list(map(int,input().split())))
c=0
for i in range(N-1):
    c+=(As[i]==As[i+1])
print('YNEOS'[c>0::2])

n=int(input())
A=set(map(int, input().split()))
if len(A)==n:
  print('YES')
else:
  print('NO')

n = int(input())
lst = list(map(int,input().split()))
x = len(lst)
lst = list(set(lst))
y = len(lst)

if (x == y):
    print("YES")
else:
    print("NO")


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

dic = {}
for a in A:
  if a in dic:
    dic[a] += 1
  else:
    dic[a] = 1

M = max(dic.values())
print("YES" if M == 1 else "NO")

N = int(input())
A_ls = map(int, input().split(' '))
rst = { i for i in A_ls }
if len(rst) == N:
    print('YES')
else:
    print('NO')

n = int(input())
a = sorted([int(i) for i in input().split()])
ans = 'YES'
for i in range(1, n):
  if a[i-1] == a[i]:
    ans = 'NO'
    break
print(ans)

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

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

import sys
n = int(input())
lst = list(map(int,input().split()))

lst.sort()
for i in range(n-1):
  if lst[i] == lst[i+1]:
    print('NO')
    return
print('YES')  
    





n = int(input())
nums = input().split(' ')
nums = [int(x) for x in nums]
s = set()
b = False
for x in nums:
  if x in s:
    print("NO")
    b = True
    break
  s.add(x)
if not b:
  print("YES")
    





N = int(input())
A = list(map(int,input().split()))
A = sorted(A)
for i in range(N - 1):
    if A[i] == A[i + 1]:
        print('NO')
        return
print('YES')

n=int(input())
a=list(map(int,input().split()))
m=len(a)
a=set(a)
n=len(a)
if m==n:
  print("YES")
else:
  print("NO")

N = int(input())
A_ls = map(int, input().split(' '))
rst = { i for i in A_ls }
if len(rst) == N:
    print('YES')
else:
    print('NO')

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

for i in range(1,N):
    if A[i] == A[i-1]:
        print("NO")
        Flag = False
        break
    else:
        Flag = True

if Flag:
    print("YES")

N=int(input())
A=sorted(list(map(int,input().split())))
l=[]
for i in range(N-1):
  l.append(A[i+1]-A[i])

if 0 in l:
  print('NO')
else:print('YES')


N=int(input())
l=set(list(map(int, input().split())))

print("YES") if N==len(l) else print("NO")

n = int(input())
a = map(int,input().split())

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

def main():
	n = int(input())
	l = [int(v) for v in input().split()]
	if len(set(l)) == n:
		return "YES"
	return "NO"
	

def __starting_point():
    print((main()))

__starting_point()

n=int(input())
S=list(map(int,input().split()))

S_set=set(S)

if len(S)==len(S_set):
    print('YES')

else:
    print('NO')

import collections
n = int(input())
aa = list(map(int, input().split()))
c =collections.Counter(aa)
if len(c) == n:
  print('YES')
else:
  print('NO')

N = int(input())
ls = input().split(' ')
dic = { i for i in ls }
if len(dic) == N:
    print('YES')
else:
    print('NO')

m = int(input())
n = list(map(int,input().split()))
print("YES" if len(set(n)) == m else "NO")

n = int(input())
a_list = input().split()
if len(a_list) == len(set(a_list)) :
    print('YES')
else:
    print('NO')

n = int(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)

n = int(input())
a = set(map(int, input().split()))

print('YES') if n==len(a) else print('NO')

n = int(input())
alist = list(map(int,input().split()))
if len(set(alist))==n:
  print("YES")
else:
  print("NO")

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

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

n = int(input())
a = list(set(map(int, input().split())))

print('YES') if n==len(a) else print('NO')

n = int(input())

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


x = len(set(a))


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

n = int(input())

a = list(map(int, input().split()))
b = set(a)

print('YES' if len(a) == len(b) else 'NO')

import collections

n = int(input())
a = list(input().split())
c = collections.Counter(a)

if c.most_common()[0][1] != 1:
    print('NO')
    return

print('YES')

N = int(input())
A = input().split()
ans = 'YES' if len(A) - len(set(A)) == 0 else 'NO'
print(ans)

N = int(input())
A = [int(n) for n in input().split()]

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

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

N=input()
A=input().split()
print('NO' if DuplicateCheck(A) else 'YES')

n = int(input())
a = list(map(int,input().split()))
b = sorted(a)
memo = 0
for i in range(n-1):
  if(b[i]==b[i+1]):
    memo +=1
if(memo==0):
  print("YES")
else:
  print("NO")

n = int(input())
a = list(map(int,input().split()))
b = len(set(a))
if n == b:
    print("YES")
else:
    print("NO")

n=int(input());print('YNEOS'[len(set(map(int,input().split())))!=n::2])

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

n = int(input())
A = list(map(int,input().split()))
res = set()
ans = "YES"
for i in range(n):
    if(A[i] in res):
        ans = "NO"
        break
    res.add(A[i])
print(ans)

n = int(input())
s = set(map(int, input().split()))
print("YES" if n == len(s) else "NO")

N=int(input())
A=list(map(int,input().split()))
A.sort()
for i in range(N-1):
    if A[i]==A[i+1]:
        print("NO")
        break
    if i==N-2:
        print("YES")

#!/usr/bin/env python3
def main():
    N = int(input())
    print(('YES' if len(set(input().split())) == N else 'NO'))


def __starting_point():
    main()

__starting_point()

_ = input()
l = [ int(x) for x in input().split() ]
l.sort()

for i in range(len(l)-1):
    if l[i] == l[i+1]:
        print('NO')
        return

print('YES')


from collections import Counter

cnt = input()
num_list = Counter(map(int, input().split()))

for _ in num_list.values():
    if _ > 1:
        print("NO")
        break
else:
    print("YES")

from collections import Counter
N=int(input())
Alist=list(map(int,input().split()))
count=Counter(Alist)
flag=True
for value in count.values():
    if value>1:
        flag=False
print('YES' if flag else 'NO')

N = int(input())
A_ls = list(input().split(' '))
rst = { i for i in A_ls }
if len(rst) == N:
    print('YES')
else:
    print('NO')

N = int(input())
A = [int(x) for x in input().split()]

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

n = int(input())
a = [int(s) for s in input().split()]

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