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())
l=list(map(int,input().split()))
l.sort()
distinct = True
for idx in range(n)[:n-1]:
   if (l[idx] == l[idx+1]):
        distinct = False
if (distinct == True):
    print('YES')
else:
    print('NO')

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

b = set(a)

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

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

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

if duplication(a) == True:
    print('NO')
else:
    print('YES')

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
a.sort()
ch=a.pop()
ans='YES'
for i in a:
  if ch == i:
    ans='NO'
    break
  else:
    ch=i
print(ans)

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

Solution (Python):
from collections import Counter

N = input().strip()
nums = map(int, input().strip().split())
cnts = Counter(nums)

flag = "YES"
for k, v in cnts.items():
  if v>1:
    flag = "NO"
    break
print(flag)

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

a_l = len(a)
test_l = len(set(a))

if (a_l == test_l):
    print('YES')
else:
    print('NO')

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

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

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

Solution (Python):
n = input()

s = input().split()

target = {}
flag = 0


for i in s:
    if i in target:
        flag = 1
        break
    else:
        target[i] = 1

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

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

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

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

a_count = len(A)
a_uni_count = len(list(set(A)))

result = 'YES' if (a_count == a_uni_count) else 'NO'
print(result)

Solution (Python):
import sys

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

newList = list(dict.fromkeys(d))

if len(d) == len(newList):
  print('YES')
else:
  print("NO")

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

N_set = set(N_list)

list_num = len(N_list)
set_num = len(N_set)

if list_num==set_num:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
A = map(int, input().split())
A = sorted(A)
b = 0

for a in A:
    if b == a:
        print('NO')
        exit()
    else:
        b = a
print('YES')

Solution (Python):
import numpy as np
N = int(input())
x = [int(x) for x in input().split()]
if N <= 1:
  print('YES')
elif 0 in np.diff(sorted(x)):
    print('NO')
else:
    print('YES')

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

A.sort()
flag=0
for i in range(1,n):
    if A[i] == A[i-1]:
        flag=1
if flag==1:
  print("NO")
else:
  print("YES")

Solution (Python):
i1 = input()
i2 = input()

i_sp = i2.split(' ')
len_i = len(i_sp)
set_i = set(i_sp)

if(len_i == len(set_i)):
    print('YES')
else:
    print('NO')

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

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

alist = input().split()

checklist = {}

for ite in alist:
    if checklist.get(ite) == '1':
        print('NO')
        exit(0)
    else:
        checklist[ite] = '1'

print('YES')

Solution (Python):

nl = int(input())
lst = list(map(int, input().split()))
st = set(lst)
ns = len(st)
if nl == ns:
  print("YES")
else:
  print("NO")

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

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

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

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

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

if i-len(set(W))==0:
    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())
s = list(map(int,input().split()))
s.sort()
k = 0
for i in range(N - 1):
    if s[i] == s[i + 1]:
        k = k + 1
if k == 0:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
A = input().split()
d = {}
for i in range(N):
    d.setdefault(A[i], i+1)
if len(d) == N:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
n = int(input())
a_list = sorted(input().split(" "))

result = "YES"
prev = ""
for a in a_list:
    if a == prev:
        result = "NO"
        break
    prev = a

print(result)

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

xi.sort()
yesno="YES"
for i in range(n-1):
    if xi[i]==xi[i+1]:
        print("NO")
        yesno="NO"
        break    
if yesno=="YES":
    print("YES")

Solution (Python):
n = int(input())
li = [int(i) for i in input().split()]

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

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

a1 = sorted(a)

for i in range(1, n):
  if a1[i] == a1[i-1]:
    print("NO")
    break
  elif i == n-1:
    print("YES")

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

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

Solution (Python):
import sys
from io import StringIO
import unittest

def resolve():
    n=int(input())
    an = list(map(str,input().split()))

    d = {}

    for a in an:
        if a in d:
            print("NO")
            return
        d[a]  = 1

    print("YES")

    return

resolve()

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

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

Solution (Python):
def resolve_C():
    n = input()
    s = input().split()
    if len(s) == len(set(s)):
        print("YES")
    else:
        print("NO")
resolve_C()

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

import collections
counter = collections.Counter(A)

for i in list(counter.values()):
    if not i == 1:
        print("NO")
        exit()
print("YES")

Solution (Python):
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
for i in range(n-1):
    if arr[i] == arr[i+1]:
        print('NO')
        break
    if i == n-2:
        print('YES')

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

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

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

B = sorted(A, reverse=True)
C = []
d = len(B)


for i in range(d-1):
  C.append(B[i]-B[i+1])
  
E = sorted(C)

if E[0] == 0:
  print("NO")
  
else:
  print("YES")

Solution (Python):
import collections

_ = input()
_list = input()
 
num_list = _list.split(' ')
 
c = collections.Counter(num_list)
if c.most_common()[0][1] > 1:
  print('NO')
else:
  print('YES')

Solution (Python):
def Main(N, A):
    A.sort()
    for i in range(N):
        if(A[i] == A[i-1]):
            return "NO"
    return "YES"

def main():
    N = int(input())
    A = list(map(int, input().split()))
    print(Main(N, A))

if __name__ == '__main__':
    main()

Solution (Python):
import collections

N = int(input())
def search():
  arr = list(map(int, input().split()))
  count = collections.Counter(arr)
  for item in count.values():
    if item > 1:
      return 'NO'
  return 'YES'

res = search()
print(res)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
res = set()
ans = False
for i in a:
    if i in res:
        ans = True
    else:        
        res.add(i)
if ans ==True:
    print('NO')
else:
    print('YES')

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

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

print('NO' if has_duplicates(A) else 'YES')

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

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

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

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

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

num_len = len(num_list)
dict_len = len(list(set(num_list)))

if num_len == dict_len:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys
import math
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")
    sys.exit()

print("YES")

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

s = set()
flag = 0
for i in range(N):
    if num[i] in s:
        flag = 1
        break
    s.add(num[i])

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

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

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

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

done = {}
flag = 0
for i in range(n):
  try:
    if done[a[i]] > 0:
      flag = 1
    done[a[i]] = 1
  except:
    done[a[i]] = 1

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

Solution (Python):
n = int(input())
a = list(map(int,input().strip().split()))
ans = "YES"
dic = {}
for i in range(n):
    temp = str(a[i])
    if temp in dic:
        ans = "NO"
    else:
        dic[temp] = 1
print(ans)

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

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
a = {}
for i in range(N):
  if A[i] in a:
    print('NO')
    exit()
  if not A[i] in a:
    a[A[i]] = True
print('YES')

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

Solution (Python):
def has_duplicates(arr):
    if len(arr) != len(set(arr)):
        return "NO"
    else:
        return "YES"


if __name__ == "__main__":
    n = int(input())
    arr = input().split()
    print(has_duplicates(arr))

Solution (Python):

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

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

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

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

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

a = set(A)

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

Solution (Python):
N = int(input())
len_a = len(set(input().split()))

if N == len_a:
    print("YES")
else:
    print("NO")

Solution (Python):
N = int(input())
x = list(map(int, input().split()))
x_unique = list(set(x))

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
cnt=0
for i in range(len(l)):
    if i == 0:
        continue
    elif l[i]==l[i-1]:
        cnt+=1

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

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

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

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

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

x = len(a)
y = len(set(a))

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

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


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

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

Solution (Python):
a = int(input())
b = list(map(int, input().split(" ")))
t = set(b)
bb = list(t)

if (len(b) == len(bb)):
  print("YES")
else:
  print("NO")

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

l = [int(i) for i in input().split()]
del l[n:]

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

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

Solution (Python):
s = input().split()
n=int(s[0])
s = input().split()
dic={}
for i in s:
    dic[i]=1
if len(dic)==n:
    print('YES')
else:
    print("NO")

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

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

    else:
        print('NO')

resolve()

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

answer = "YES"
memo = {}
for a in A:
    if memo.get(a) is None:
        memo[a] = 1
    else:
        memo[a] += 1
        answer = "NO"
        break

print(answer)

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 = input().split()
b = set(a)
if len(b)<len(a):
    print("NO")
else:
    print("YES")

Solution (Python):
N, *A = map(int, open(0).read().split())

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

Solution (Python):
n=input().split()
li=[]
a=list(map(int,input().split()))

p=set(a)

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

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

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

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

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

A = sorted(A)
sign = 0
for i in range(1,len(A)-1):
    if A[i-1] == A[i] or A[i] == A[i+1]:
        sign = 1

if N == 2 and A[0] == A[1]:
    sign = 1

if sign == 1:
    print("NO")
else:
    print("YES")

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

num_set = set(int(i) for i in input().split())

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

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

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

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

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

def has_duplicated(seq):
    return len(seq) == len(set(seq))
if has_duplicated(A):
    print('YES')
else:
    print('NO')

Solution (Python):

def MergeSort(arr):
    if len(arr) <= 1:
        return arr
    mid = len(arr) // 2
    left = arr[:mid]
    right = arr[mid:]
    left = MergeSort(left)
    right = MergeSort(right)
    return MergeArray(left, right)

def MergeArray(left, right):
    merged = []
    li, ri = 0, 0
    while li < len(left) and ri < len(right):
        if left[li] > right[ri]:
            merged.append(left[li])
            li += 1
        else:
            merged.append(right[ri])
            ri += 1
    if li < len(left):
        merged.extend(left[li:])
    elif ri < len(right):
        merged.extend(right[ri:])
    return merged

def solve():
    N = int(raw_input())
    A = [int(_) for _ in raw_input().split()]
    sortA = MergeSort(A)
    flag = True
    for i in range(N - 1):
        if sortA[i] == sortA[i+1]:
            flag = False
            break
    if flag:
        print 'YES'
    else:
        print 'NO'

if __name__ == '__main__':
    solve()

Solution (Python):
def has_duplicates(seq):
  if len(seq) != len(set(seq)):
    return "NO"
  else:
    return "YES"

N = int(input())

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

print(has_duplicates(seq))

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

A = sorted(A)
flag = True

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())
a=list(map(int,input().split()))
l=set(a)
if len(l)==len(a):
  print("YES")
else:
  print("NO")

Solution (Python):
N = int(input())
A = map(int, input().split())
cnt = {}
for a in A:
  if cnt.get(a):
    cnt[a] = cnt[a] + 1
  else:
    cnt[a] = 1
for v in cnt.values():
  if v != 1:
    print('NO')
    exit()
print('YES')

Solution (Python):

import sys

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

dp = {}

for a in A:
    if a-2 in dp:
        print('NO')
        break
    dp[a-2] = 1
else:
    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=set(list(map(int, input().split())))
if N==len(A):
    print("YES")
else:
    print("NO")

Solution (Python):
import numpy as np

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

for i in range(1,len(A)):
    if a[i-1]==a[i]:
        print('NO')
        exit()

print('YES')

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

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

print('YES')

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

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

if has_duplicates(A) == False:
    print('YES')
else:
    print('NO')

Solution (Python):
import sys
import numpy as np

n = input()

a = input().split()

a_n = np.array(a)

if (len(a) == np.unique(a_n).size):
    print("YES")
else:
    print("NO")

Solution (Python):
from collections import defaultdict
n = int(input())
an = map(int, input().split())

count = defaultdict(int)
for a in an:
    count[a] += 1
    if count[a] > 1:
        print('NO')
        exit()
print('YES')

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

Solution (Python):
n = int(input())
a = sorted(map(int,input().split()))
ans = "YES"
for i in range(n-1):
    if a[i] == a[i + 1]:
        ans = "NO"
print(ans)

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

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

a.sort()

p = 0
for i in range(n-1):
    if a[i] == a[i+1]:
        p += 1


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

Solution (Python):
import numpy as np
N=input()
A=list(map(int,input().split()))
A.sort()
D = np.array(A[1:len(A)]) - np.array(A[0:len(A)-1])
if sum(D == 0) >= 1:
    print("NO")
else:
    print("YES")

Solution (Python):
def solve():
    N, *A = map(int, open(0).read().split())
    
    A_set = set(A)
    if len(A_set) == N:
        print('YES')
    else:
        print('NO')


if __name__ == '__main__':
    solve()

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 = input()
l = list(map(int,input().split()))
l.sort()

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

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

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

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

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

len_a = len(a)
set_a = len(set(a))

if len_a == set_a:
    print('YES')
else:
    print('NO')

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])
    a = [int(e) for e in lines[1].split(' ')]

    return (n, a)


def solve(n, a):
    
    b = set()
    for e in a:
        b.add(e)

    result = 'NO'
    if len(a) == len(b):
        result = 'YES'

    return result
    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

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

a.sort();

ans = 1;

for i in range(1,n) :
	if a[i] == a[i-1] :
		ans = 0;

if ans :
	print('YES');
else :
	print('NO');

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

b=set(a)

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

Solution (Python):
N = int(input())
A = input().split(" ")
l1 = len(A)
Ax = set(A)
l2 = len(Ax)

if l1 == l2:
    print("YES")
else:
    print("NO")

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

A_set = list(set(A))

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

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

B = sorted(A)
s = 0
for i in range(0,N-1):
    if B[i] == B[i+1]:
        s = s +1
if s > 0:
    print("NO")
else:
    print("YES")

Solution (Python):

import sys

YES = "YES"  
NO = "NO"  
    

def solve(N: int, A: "List[int]"):
    ans = True
    prev_a = -1
    A.sort()
    for a in A:
        if a == prev_a:
            ans = False
        prev_a = a

    ans = YES if ans else NO
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [int(next(tokens)) for _ in range(N)]  
    solve(N, A)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
from collections import defaultdict

IA = lambda: map(int,input().split())
IAS= lambda: map(str,input().split())

n=int(input())
mp=defaultdict(int)
a=list(IA())
flag=1
for it in a:
    if mp[it]==1:
        flag=0
    mp[it]=1
if flag==1:
    print("YES")
else:
    print("NO")

N=int(100005)
a=[int(0) for i in range(N)]

Solution (Python):

import heapq
n = int(input())
nums = sorted([int(x) for x in input().split()])
flag = "YES"
for i in range(n-1):
    if nums[i] == nums[i+1]:
        flag = "NO"
        break
print(flag)

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(0)

print("YES")

Solution (Python):
N = int(input())
*h,= map(int, input().split())

h=sorted(h)
flag=False
for i in range(len(h)-1):
    if (h[i]==h[i+1]):
        flag=True
print('NO' if flag else 'YES')

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

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

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

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

if moto == len(unique):
    print("YES")
else :
    print("NO")

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

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

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

s = input().split()

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

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

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

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

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a.sort()
c = 'YES'

for i in range(n-1) :
    if a[i] == a[i+1] :
        c = 'NO'
        break
print(c)

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

d = {}
for x in As:
    if x not in d.keys():
        d[x] = 1
    else:
        d[x] += 1
if len(As) == len(d):
    print('YES')
else:
    print('NO')

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

A = list(map(int,input().split()))
A.sort()
hantei = 0
for i in range(len(A)-1):
    if A[i] == A[i+1]:
        hantei = 1
        break
    
if hantei == 0:
    print("YES")
elif hantei == 1:
    print("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())
ilist = list(map(int,input().split()))
iset = set(ilist)
if len(ilist) == len(iset):
    print("YES")
else:
    print("NO")

Solution (Python):
n=int(input())
p=list(map(int,input().split()))
p.sort()
ans=True
for i in range(0,n-1):
    if(p[i]==p[i+1]):
        ans=False

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

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

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

def has_duplicates(seq):
    return len(seq) != len(set(seq))
if has_duplicates(A):
    print("NO")
else:
    print("YES")

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

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

Solution (Python):
N = int(input())
A = [int(n) for n in input().split()]
print('YES' if len(set(A))==len(A) else 'NO')

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

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

A.sort()

for i in range(0, N - 1):
    if A[i] == A[i + 1]:
        count += 1
        break
    else:
        pass

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

else:
    print('NO')

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

a.sort()

def solve():
    for i in range(n-1):
        if a[i] == a[i + 1]:
            return "NO"
    return "YES"

print(solve())

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

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

ans = len(seta)

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

Solution (Python):
N = int(input())
l = sorted([int(x) for x in input().split()])
ans = 'YES'
for i in range(N-1):
  if l[i] == l[i+1]:
    ans = 'NO'
print(ans)

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

Solution (Python):
a=input()
List=list(map(int,input().split()))
if len(List) == len(set(List)):
	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())
a = list(map(int, input().split()))
s = set(a)

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

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

List.sort()
result = 'YES'

for i in range(N-1):
    if List[i] == List[i+1]:
        result = 'NO'
        break
        
print(result)

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

A.sort()

error = 0

for i in range(N-1):
    if A[i] == A[i+1]:
        error = 1

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

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

bA = len(A)
aA = len(set(A))

if bA == aA:
    print("YES")
else:
    print("NO")

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

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

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

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

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

Solution (Python):
def prime_factorize(a, n):
    now = len(a) - 1
    while n % 2 == 0:
        if now == -1:
            a.append(2)
            now += 1
        elif a[now] != 2:
            a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            if now == -1:
                a.append(f)
                now += 1
            elif a[now] != f:
                a.append(f)
                now += 1
            n //= f
        else:
            f += 2

    if n != 1:
        if now == -1:

            a.append(f)
        elif a[now] != n:

            a.append(n)
    return a

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

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

Solution (Python):
import numpy as np

n = int(input())

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

dic = {}

for i in range(n):
    if a[i] in dic:
        dic[a[i]] += 1
    else:
        dic[a[i]] = 1

if max(dic.values()) >= 2:
    print("NO")
else:
    print("YES")

Solution (Python):

n=int(input())
arr=list(map(int,input().split()))
di={}
for i in arr:
  if i in di:
    print("NO")
    break
  else:
    di[i]=1
else:
  print("YES")