Problem:
 Score : 300 points    Problem Statement 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 1 5
2 6 1 4 5      Sample Output 1 YES  The elements are pairwise distinct.       Sample Input 2 6
4 1 3 1 6 2      Sample Output 2 NO  The second and fourth elements are identical.       Sample Input 3 2
10000000 10000000      Sample Output 3 NO

Solution (Python):
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')
    exit()
print('YES')

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

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

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

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

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

Solution (Python):
N = int(input())
nums = set(map(int, input().split()))

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

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

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

Solution (Python):
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')
    sys.exit()
print('YES')

Solution (Python):
input()
a=list(map(int,input().split()))

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

Solution (Python):
import collections

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

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

print('YES')

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

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

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

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

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

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

Solution (Python):
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)

Solution (Python):
n = int(input())

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

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

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

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

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):
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')

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

Solution (Python):
n = int(input())

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


x = len(set(a))


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

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

Solution (Python):
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")

Solution (Python):
from collections import Counter
N=int(input())
A=list(map(int, input().split()))

cnt=Counter(A)
print("YES" if all([i==1 for i in cnt.values()]) else "NO")

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

Solution (Python):
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')

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

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

Solution (Python):
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)

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

Solution (Python):
N = int(input())
A = input().split()

A_set = set(A)

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

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

A_set = set(A)

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

Solution (Python):
n = int(input())
a = map(int,input().split())

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

Solution (Python):
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")

Solution (Python):
n = int(input())
a = map(int, input().split())
re = 0

from collections import Counter

c = Counter(a)

for i, v in c.items():
    if v >= 2:
        re += 1

if re >= 1:
    print("NO")
else:
    print("YES")

Solution (Python):
from collections import Counter

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

c = Counter(a)
new = c.values()

for i in new:
    if i > 1:
        re += 1

if re > 0:
    print("NO")
else:
    print("YES")

Solution (Python):
from collections import Counter

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

c = Counter(a)
new = c.values()

for i in new:
    if i > 1:
        re += 1

if re > 0:
    print("NO")
else:
    print("YES")

Solution (Python):
from collections import Counter

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

c = Counter(a)
new = c.values()

for i in new:
    if i != 1:
        re = "NO"
        break
    else:
        re = "YES"

print(re)

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

A = list(set(A))

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

Solution (Python):
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')

Solution (Python):
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')

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

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

Solution (Python):
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')

Solution (Python):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    A=LI()
    A.sort()
    flag=1
    for i in range(N-1):
        if A[i]==A[i+1]:
            flag=0
            break
        
    if flag:
        print("YES")
    else:
        print("NO")

main()

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):
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")

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

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

Solution (Python):
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')

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

from  collections import defaultdict
from collections import Counter
import bisect
def main():
     N = I()
     A = LI()
     c = Counter(A)
     if len(c.values()) == N:
         print('YES')
     else:
         print('NO')
if __name__ == "__main__":
    main()

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

Solution (Python):
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')

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

Solution (Python):
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")

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
if len(A) > len(set(A)):
  print("NO")
else:
  print("YES")

Solution (Python):
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")

Solution (Python):
import sys

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

  a[x] = 1

print('YES')

Solution (Python):
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")

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

Solution (Python):
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')
        exit()
        
print('YES')

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):

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


if __name__ == '__main__':
    main()

Solution (Python):
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)

Solution (Python):
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")

Solution (Python):
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')
        exit()
print('YES')

Solution (Python):
N = int(input())
A = {i for i in input().split()}
print("YES" if N==len(A) else "NO")

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

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

Solution (Python):
s=int(input())




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


c = {i for i in a}  

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

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

Solution (Python):
N = int(input())
A = {a for a in input().split()}
if len(A) == N:
    print("YES")
else:
    print("NO")

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a.sort()
pd = True
for i in range(n-1):
  if a[i] == a[i+1]:
    pd = False
if pd: print('YES')
else: print('NO')

Solution (Python):
from collections import defaultdict
def main():
    n = int(input())
    a = list(map(int, input().split(" ")))
    d = defaultdict(lambda:0)
    for i in range(n):
        d[a[i]] += 1
    if max(d.values()) >1:
        print("NO")
    else:
        print("YES")
        
if __name__ == "__main__":
    main()

Solution (Python):
from collections import Counter

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

c = Counter(a)
d = sorted(list(c.values()))
print('YES' if d[-1] == 1 else 'NO')

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
A.sort()
a = A[0]
for i in A[1:]:
    if i - a == 0:
        print("NO")
        break
    else:
        a = i
else:
    print("YES")

Solution (Python):
N = int(input())
As = [int(a) for a in input().split()]

a_uniq = set(As)

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

Solution (Python):
N = int(input())
nums = list(map(int, input().split()))
if len(nums) == len(set(nums)):
  print('YES')
else:
  print('NO')

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
B = set(A)
b = len(B)

if N == b:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):

import sys,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7
    N = II()
    A = LMIIS()
    print('YES' if len(A) == len(set(A)) else 'NO')

    

if __name__ == '__main__':
    main()

Solution (Python):
import heapq
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
bef = a[0]
for i in range(1,n):
    if bef == a[i]:
        print("NO")
        break
    bef = a[i]
    if i == n-1:
        print("YES")

Solution (Python):
def check(seq):
    return len(seq) != len(set(seq))

def main():
  N = int(input())
  A = list(map(int, input().split()))
  ans = check(A)
  if ans:
    print("NO")
  else:
    print("YES")
main()

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
d = {}

for i in A:
    if i in d:
        print("NO")
        exit(0)
    else:
        d[i] = 1

print("YES")

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

else:
    print('NO')

Solution (Python):
m = input()
N = list(map(int, input().split(' ')))


c = 0
N.sort()
for i in range(len(N)-1):
    if N[i] == N[i+1]:
        print('NO')
        exit()

print('YES')

Solution (Python):
if int(input()) == len(list(set(list(map(int, input().split()))))):
    print('YES')
else:
    print('NO')

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
A.sort()

check = True
for i in range(N-1):
  if A[i] == A[i+1]:
    check = False
    
print("YES" if check else "NO")

Solution (Python):
import collections
N=int(input())
A=list(map(int,input().split()))
li=list(collections.Counter(A).values())
for i in range(len(li)):
  if li[i]>1:
    print('NO')
    exit()
print('YES')

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

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

Solution (Python):
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)

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

Solution (Python):
N = int(input())
A = [int(s) for s in input().split(' ')]

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

Solution (Python):
n = int(input())
s = sorted([int(i) for i in input().split()])
for i, v in enumerate(s[0:-1]):
	if v == s[i+1]:
		print('NO')
		exit()
print('YES')

Solution (Python):
N = int(input())
A = [int(s) - 1 for s in input().split()]

M = {}
result = 'YES'
for a in A:
    if a in M.keys():
        result = 'NO'
    M[a] = a

print(result)

Solution (Python):
import os, sys, re, math

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

A = sorted(A)
answer = 'YES'
for i in range(1, len(A)):
    if A[i - 1] == A[i]:
        answer = 'NO'
        break

print(answer)

Solution (Python):
d = {}
n = input()
aaa = list(map(int, input().split(' ')))
ans = 'YES'
for a in aaa:
  d[a] = d.get(a, 0) + 1
  if d[a] >= 2:
    ans = 'NO'
print(ans)

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

Solution (Python):
n=int(input())
data=list(map(int,input().split()))
data=sorted(data)
flag=0
for i in range(len(data)-1):
    if data[i]==data[i+1]:
        flag=1
        break
if flag==1:
    print("NO")
else:
    print("YES")

Solution (Python):
st = set()
n = int(input())
ls = [int(x) for x in input().split()]
for i in ls:
  st.add(i)
  
if len(st) == n:
  print("YES")
else:
  print("NO")

Solution (Python):
n=int(input())
a=[int(x) for x in input().split()]
if len(a) == len(set(a)):
    print("YES")
else:
    print("NO")

Solution (Python):
from collections import Counter as c
N = int(input())
A = list(input().split())
if c(A).most_common()[0][1] == 1: print("YES")
else: print("NO")

Solution (Python):
N = int(input())

A_list = list(map(int, input().split()))
A_list_min = sorted(A_list)

for i in range(len(A_list)-1):
    if A_list_min[i] == A_list_min[i+1]:
        print("NO")
        exit()
print("YES")

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

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

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

Solution (Python):
n = int(input())
a = set(input().split())
if len(a) == n:
  print("YES")
else:
  print("NO")

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    A = list(map(int, readline().split()))
    S = set(A)

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


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    N = int(input())
    A = [ int(a) for a in input().split()]
    A_ = set(A)
    if len(A)==len(A_):
        print("YES")
    else:
        print("NO")
if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
n=int(input())
x=list(map(int,input().split()))
x.sort()

for i in range(n-1):
    if x[i]==x[i+1]:
        print('NO')
        sys.exit()
        
print('YES')

Solution (Python):


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

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

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

Solution (Python):
def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_list.sort()
    flag = True

    for i in range(n - 1):
        if a_list[i] == a_list[i + 1]:
            flag = False
            break

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


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    a_set = set(a_list)

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


if __name__ == "__main__":
    main()

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

N=int(input())
A=list(map(int,input().split()))
if has_duplicates(A):
    print('NO')
else:
    print('YES')

Solution (Python):
import collections 
n = int(input())
a = map(int,input().split())
c = collections.Counter(a)
c = c.values()
for i in c:
  if i!=1:
    print("NO")
    exit()
print("YES")

Solution (Python):
n= int(input())
che={}
ans='YES'
a = list(map(int, input().split()))
for i in a:
  if i in che.keys():
    ans='NO'
  else:
    che[i]=0
print(ans)

Solution (Python):
from collections import Counter
n=int(input())
a=list(map(int,input().split()))
dic=Counter(a)
for val in dic.values():
    if val>=2:
        print("NO")
        exit()
print("YES")

Solution (Python):
N = int(input())
H = list(map(int, input().split()))

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

Solution (Python):
x = int(input())
p = list(map(int, input().split()))

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

Solution (Python):
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)

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

Solution (Python):
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")
        exit()
print("YES")

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
N_MAX = 200000
A_MAX = 10 ** 9

temp = dict()

for i in A:
  if i in temp:
    print("NO")
    exit()
  else:
    temp[i] = 0
print("YES")

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

m = set(A)
M = len(m)

if N == M:
  print("YES")
  
else:
  print('NO')

Solution (Python):
N=int(input())
A=input().split()
S={}
for a in A:
  if a in S.keys():
    print('NO')
    break
  S[a]=1
else:
  print('YES')

Solution (Python):
import sys

N = int(input())
A = sorted(list(map(int, input().split())))
pre = None
for a in A:
    if a == pre:
        print('NO')
        sys.exit()
    pre = a

print('YES')

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

abc154c_distinct_or_not()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
sort_A = sorted(A)
str_A = list(map(str, sort_A))
o = 'YES'
for i in range(1, len(A)):
	if str_A[i-1] == str_A[i]:
		o = 'NO'
		break
print(o)

Solution (Python):

import collections


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

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

Solution (Python):
N=int(input())

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

S=set()
for i in A:
    S.add(i)

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

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

A = set(A)

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

Solution (Python):
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))

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

Solution (Python):
n = int(input())
alst = list(map(int, input().split()))
alst.sort()
bef = -1
for a in alst:
    if bef == a:
        print("NO")
        break
    bef = a
else:
    print("YES")

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
d = set()
for x in a:
  if x in d:
    print("NO")
    quit()
  d.add(x)
print("YES")

Solution (Python):
n=int(input())
a=[int(x) for x in input().split()]
b=set(a)
l=len(b)
if l==n:
  print("YES")
else:
  print("NO")

Solution (Python):
n = int(input())
ans = set()
puzzle = list(map(int,input().split()))
for x in puzzle:
    ans.add(x)
l = len(ans)
p = len(puzzle)
if l==p:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
B=list(dict.fromkeys(A))
if A==B:
    print('YES')
else:
    print('NO')

Solution (Python):

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

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

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

Solution (Python):
import sys

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

Solution (Python):
import sys
N = int(input())
cc = list(map(int,input().split()))
dic = set()
for i in cc:
  if i in dic:
    print('NO')
    sys.exit()
  else:
    dic.add(i)
print('YES')

Solution (Python):
n = int(input())
num_list = list(map(int, input().split()))

sets = set(num_list)

if len(num_list) == len(sets):
    ans = 'YES'
else:
    ans = 'NO'

print(ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
A1=set(A)
ans="NO"
if len(A)==len(A1):
    ans="YES"
print(ans)

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
A=list(map(int, input().split()))
A.sort()
if N==1:
  print('YES')
  exit()
for i in range(N-1):
  if A[i]==A[i+1]:
    print('NO')
    exit()
else:
  print('YES')

Solution (Python):
n,*a=map(int,open(0).read().split());print("YES"if len(set(a))==n else "NO")

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



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

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
a.sort()

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

print("YES")

Solution (Python):
n = int(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 dic.values():
  if x != 1:
    print("NO")
    exit()

print("YES")

Solution (Python):








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

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

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

print(['YES', 'NO'][len(A) != len(set(A))])

Solution (Python):
def main():
    N = int(input())
    List = list(map(int,input().split()))
    Set = set()
    for i in List:
        if i in Set:
        	print('NO')
        	return
        Set.add(i)
    print('YES')
    return
main()

Solution (Python):
N = int(input())
A = sorted(list(map(int,input().split())))
ans = "YES"

for i in range(1,N,2):
    boollist = [ A[i-1] == A[i] ]
    if i < N-1 :
        boollist.append(A[i] == A[i+1])
    if any(boollist):
        ans = "NO"
        break
print(ans)

Solution (Python):
import numpy as np
N = int(input())
if N != len(set(list(map(int,input().split())))):
    print("NO")
else:
    print("YES")

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

Solution (Python):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a = Counter(a).most_common()
if len(a) == n:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
print("YES" if(len(A) == len(set(A))) else "NO")

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

Solution (Python):
N=int(input())
A=set(map(int,input().split()))

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

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

main()

Solution (Python):
number = int(input())
score = list(map(int,input().split()))
score.sort()
cancel = 0
for i in range(number-1):
    if score[i] == score[i+1]:
        cancel = 1
        break
if cancel == 1:
    print('NO')
else:
    print('YES')