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

uniq_array = list(set(a))

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

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

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)
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")

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()))
set_a=set(a)
if n==len(set_a):
    print("YES")
else:
    print("NO")

Solution (Python):
from collections import defaultdict
inpl = lambda: list(map(int,input().split()))
N = int(input())
A = inpl()
d = defaultdict(int)
for a in A:
    if d[a] == 0:
        d[a] = 1
    else:
        print('NO')
        exit()
print('YES')

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

Solution (Python):
import math
import sys

m=10**9 + 7 
sys.setrecursionlimit(1000010)
N=int(input())
A  = list(map(int,input().split()))


dictA={}

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

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

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

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

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

Solution (Python):
'''
.append(要素) リストに要素を追加 
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
import itertools
from functools import reduce
from operator import mul

N = int(stdin.readline().rstrip())
nums = [int(s) for s in stdin.readline().rstrip().split()]
nums.sort()
check = True
for el in range(N):
    if el == N - 1:
        break
    if nums[el] == nums[el + 1]:
        print('NO')
        check = False
        break
if check:
    print('YES')

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())
a=list(map(int,input().split()))
a.sort()
for i in range(n):
  if i==n-1:
    print("YES")
    break
  elif a[i]==a[i+1]:
    print("NO")
    break

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

c=Counter(A)

v=list(c.values())



def map_all(es):
    return all([e == es[0] for e in es[1:]]) if es else False
ans=map_all(v)

if v[0]==1 and ans==True:
    print('YES')
else:
    print('NO')

Solution (Python):
import sys
from pprint import pprint

def solve(n, a):
    exists = set()
    for a_i in a:
        if a_i in exists:
            return "NO"
        exists.add(a_i)
    return "YES"

if __name__ == '__main__':
    n = sys.stdin.readline().strip()
    a = list(map(int,sys.stdin.readline().strip().split(" ")))
    
    print(solve(n, a))

Solution (Python):

import sys

YES = "YES"  
NO = "NO"  


def solve(N: int, A: "List[int]"):
    if len(set(A))==len(A):
        print(YES)
    else:
        print(NO)
    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()))
A.sort()
for i in range(1,N):
  if A[i] == A[i-1]:
    print("NO")
    break;
else:
  print("YES")

Solution (Python):
n=int(input())
A=sorted(list(map(int,input().split())))
 
bef=A[0]
for i in range(1,n):
       if A[i]==bef:
              print("NO")
              exit()
       bef=A[i]
print("YES")

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

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
is_yes = True
a_m = {}
for a_i in a:
  if a_i in a_m:
    is_yes = False
    break
  a_m[a_i]=True
if is_yes:
  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())
arr = map(int,input().split())
if len(set(arr)) == n:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):

"""
Created on Sun Feb  9 20:52:55 2020

@author: H_Hoshigi
"""

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

A_list.sort()
A_now = 0
answer = "YES"
for i in A_list:
    if i == A_now:
        answer = "NO"
        break
    else:
        A_now = i

print(answer)

Solution (Python):

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

a = len(set(l))


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

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

Solution (Python):

n = int(input())

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

a.sort()

now = a[0]
for i in range(1, n):
	if now == a[i]:
		print("NO")
		exit(0)
	else:
		now = a[i]
print("YES")

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"
    break
print(ans)

Solution (Python):
n,*a=map(int,open(0).read().split());print('YNEOS'[len(a)!=len(set(a))::2])

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

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

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

print('YES')

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

a_s = set(a)

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

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

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

Solution (Python):
import collections

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

b = set(a)

if len(a) == len(b):
  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):


def main():
    N = int(input())
    As = map(int, input().split())

    seen = set()
    for A in As:
        if A in seen:
            print("NO")
            return
        seen.add(A)

    print("YES")


if __name__ == '__main__':
    main()

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

A.sort()
for n in range(N-1):
    if A[n]==A[n+1]:
        print('NO')
        exit()
print('YES')

Solution (Python):


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


def main():
    already = set([])

    for a in A:
        if a not in already:
            already.add(a)
        else:
            return "NO"

    return "YES"


print(main())

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

if len(list(set(A_list))) != len(A_list):
	print('NO')
else:
	print("YES")

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

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

Solution (Python):
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


def fetch_ints_inputs(times):
    return [fetch_int_input() for _ in range(times)]



fetch_one_line()
nums = fetch_int_input()

set_nums = set(nums)

answer = ["NO", "YES"]

print(answer[int(len(nums) == len(set_nums))])

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


def main():
    n = int(input())
    if has_duplicates(list(map(int, input().split(' ')))):
        print('NO')
    else:
        print('YES')


if __name__ == '__main__':
    main()

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

is_ok = True
for i in range(len(a)):
    num = a[i]
    if num in num_hash:
        print('NO')
        is_ok = False
        break
    num_hash[num] = True
if is_ok:
    print('YES')

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):
import sys

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

used_dict = {}
for i,a in enumerate(a_list):
    if a in used_dict:
        print('NO')
        sys.exit()
    else:
        used_dict[a] = True

print('YES')

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

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

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
answer="YES"
a.sort()
for i in range(n-1):
  if a[i]==a[i+1]:
    answer="NO"
    break
print(answer)

Solution (Python):
def main():
    N = int(input())
    As = input().split(" ")
    len_As = len(As)
    len_setAs = len(set(As))
    if len_As == len_setAs:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n = input()
a = list(map(int, input().split()))
d = {}
for i in a:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
ans = "YES"
for i in d.values():
    if i > 1:
        ans = "NO"

print(ans)

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
else:
    print("YES")

Solution (Python):

import sys

YES = "YES"  
NO = "NO"  


def solve(N: int, A: "List[int]"):
    if N == len(set(A)):
        print("YES")
    else:
        print("NO")
    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())
numlist = list(map(int, input().split()))

setlist = len(set(numlist))

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

Solution (Python):
from sys import stdin

N = int(stdin.readline())
A = list(map(int,stdin.readline().split()))
K = {}
ans = "YES"
for i in A:
	if i in K:
		ans = "NO"
		break
	else:
		K[i] = 1
print(ans)

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

Solution (Python):
n=int(input())
a=[]
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)

Solution (Python):
n = int(input())
m = len(set(input().split()))
print(["NO","YES"][n==m])

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):
def main():
    N = int(input())
    A = list(map(int, input().split(" ")))
    A.sort()
    answer = "YES"
    for i in range(N - 1):
        if A[i] == A[i + 1]:
            answer = "NO"
            break
    print(answer)


if __name__ == '__main__':
    main()

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

A.sort()

flag = 0
for i in range(len(A)-1):
    if A[i] == A[i+1]:
        flag = 1
        break

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

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

Solution (Python):
n, *D  = [list(map(int, s.split())) for s in open(0)]
n, D =  n[0], D[0]
if n == len(set(D)):
    print("YES")
else:
    print("NO")

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

A_uniq = len(set(A))

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

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

c = collections.Counter(A)
c = c.most_common()
if c[0][1] == 1:
  print("YES")
else:
  print("NO")

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
flag = True
a.sort()
for i,j in zip(a[0:len(a)-1],a[1:len(a)]):
    if i == j:
        flag = False
        break
if flag == True:
    print('YES')
else:
    print('NO')

Solution (Python):
n = int(input().rstrip())
As = map(int, input().rstrip().split(" "))

history = {}

result = True

for a in As:
    if history.get(a) is not None:
        result = False
        break
    history[a] = True

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

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

A_sort = sorted(A)


for i in range(len(A)-1) :
    if A_sort[i] == A_sort[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('YES')
else:
    print('NO')

Solution (Python):
import sys

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

for i in range(1, N):
    if AList[i - 1] == AList[i]:
        print('NO')
        sys.exit()
        
print('YES')

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

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

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

print(res)

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

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

Solution (Python):

import sys
import numpy as np
from collections import deque
from itertools import combinations
sys.setrecursionlimit(10**9)


def main():
    N = input()
    A_sorted = sorted(list(map(int, input().split())))

    result = True
    previous = -1
    for a in A_sorted:
        if previous == a:
            result = False
            break
        previous = a

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


if __name__ == "__main__":
  main()

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

al = len(a)
asl = len(set(a))

if al == asl:
  print('YES')
else:
  print('NO')

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

l = list(A)
s = set(l)

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

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

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

set_list = set(a_list)

if len(a_list) == len(set_list):
    print("YES")
else:
    print("NO")

Solution (Python):

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

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

Solution (Python):
num = int(input())
arr = [int(i) for i in input().split()]
l = len(set(arr))
if num == l :
  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):
def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A

def solve(N, A):
    A = sorted(A)
    is_different = True
    for i in range(1, N):
        if A[i-1] == A[i]:
            is_different = False
    return 'YES' if is_different else 'NO'


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

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

Solution (Python):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    A = sorted(A)
    prev = A[0]
    for i in range(1, N):
        if prev == A[i]:
            print("NO")
            return 0
        else:
            prev = A[i]
    print("YES")

    return 0

if __name__ == '__main__':
    main()

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

Solution (Python):
def solve(n, a_list):
    if len(set(a_list)) == n:
        return "YES"
    else:
        return "NO"


def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    res = solve(n, a_list)
    print(res)


def test():
    assert solve(5, [2, 6, 1, 4, 5]) == "YES"
    assert solve(6, [4, 1, 3, 1, 6, 2]) == "NO"
    assert solve(2, [10000000, 10000000]) == "NO"


if __name__ == "__main__":
    test()
    main()

Solution (Python):
n = 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()))
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(int(len(a))==int(len(s))):
    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(0)
print('YES')

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

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

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

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

c = Counter(A)
print('NO' if c.most_common()[0][1] > 1 else 'YES')

Solution (Python):
n=int(input())
a=[int(i) for i in 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 = sorted(list(map(int, input().split())))

res = 'YES'
for i, a in enumerate(A):
    if i < N - 1 and a == A[i + 1]:
        res = 'NO'

print(res)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
a = sorted(a)
tmp = 0
ans = 'YES'
for aa in a:
    if tmp == aa:
        ans = 'NO'
        break
    tmp = aa
print(ans)

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

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

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

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

st = set(ls)

if len(ls) == len(st):
    print("YES")
elif len(ls) != len(st):
    print("NO")

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

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

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

Solution (Python):
from collections import defaultdict
d = defaultdict(int)

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

for i in li:
  d[i] += 1

ans = 'YES'

for i in d:
  if d[i] != 1:
    ans = 'NO'

print(ans)

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

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

Solution (Python):
key = {}
input()
for i in input().split(" "):
  if i not in key:
    key[i] = True
  else:
    print("NO")
    break
else:
  print("YES")

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

f = False
for i in range(l-1):
    if A[i] == A[i+1]:
        f = True
        break

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

Solution (Python):
from sys import exit

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 = input().split()

from collections import Counter

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

Solution (Python):

import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

N = int(readline().strip())
A = list(map(int, readline().split()))

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

Solution (Python):
N = int(input())
r = set()
for a in  map(int, input().split()):
    if a in r:
        print("NO")
        exit()
    r.add(a)
print("YES")

Solution (Python):
import sys

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

r.sort()

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

print('YES')

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()
arr=limii()

b=list(set(arr))
if len(arr)==len(b):
    print("YES")
else:
    print("NO")

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

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

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

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''


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

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


if __name__ == '__main__':
    main()

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    a = set(LI())
    if len(a) == n:
        print("YES")
    else:
        print("NO")
    return


if __name__ == "__main__":
    solve()

Solution (Python):

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

new_a = list(set(a))

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

Solution (Python):


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

temp=A[:]
temp=list(set(temp))

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

Solution (Python):
def main():
	import sys
	input = sys.stdin.readline
	N = int(input())
	A = list(map(int, input().split()))
	B = list(set(A))
	if len(A) == len(B):
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
    main()

Solution (Python):
n, *a = map(int, open(0).read().split())

set_a = set(a)

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

Solution (Python):


n = int(input())
A = [int(i) for i in input().split()]
As = set(A)

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

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

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

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

B=sorted(A)

for i in range(N-1):
    if B[i]==B[i+1]:
        print("NO")
        break
    else:
        if i==N-2:
            print("YES")

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

if len(a) != len(set(a)):
    print("NO")
else:
    print("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 = int(input())

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

l_set = set(l)

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

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

def solution(N, A):
    for i in range(N - 1):
        if A[i] == A[i + 1]:
            return "NO"
    return "YES"

print(solution(N, A))

Solution (Python):


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

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

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

a.sort()

for i in range(n-1):
    if a[i]==a[i+1]:
        onazi = True
        break

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

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

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

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

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

sort_list = set(Input)

if len(Input)==len(sort_list):
  print("YES")
else:
  print("NO")

Solution (Python):
n = int(input())
a_i = input().split()
list = []
for x in range(n):
    list.append(a_i[x])
list.sort()
answer = 'YES'
for id in range(n - 1):
    if list[id] == list[id + 1]: answer = 'NO'
print(answer)

Solution (Python):

import sys
import math
import numpy as np
import itertools



n = int(input())

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

t.sort()

for i in range(1,n):
    if t[i]==t[i-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 = int(input())
A = list(map(int,input().split()))
B = sorted(A)
judge = 1
for i in range(N-1):
    if B[i] == B[i+1]:
        judge =  0

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

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

h = {}
for i in a:
    if i in h:
        print('NO')
        exit(0)
    else:
        h[i] = 0
print('YES')

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

A = 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 = set(a)
if len(a) == n:
    print("YES")
else:
    print("NO")

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

S = {i for i in A}
print('YES' if len(S) == N else 'NO')

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

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

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

l = A
if has_duplicates(l):
    print("NO")
else:
    print("YES")

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

A_setted = set(A)

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

Solution (Python):
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]



def A():
    s, t = input().split()
    a, b = LI()
    u = input()
    if u == s:
        print("{} {}".format(a - 1, b))
    elif u == t:
        print("{} {}".format(a, b - 1))
    return



def B():
    s = input()
    print('x' * len(s))
    return



def C():
    n = I()
    a = LI()
    s = set()
    for i in a:
        s.add(i)
    if len(s) == n:
        print('YES')
    else:
        print('NO')
    return



def D():
    return



def E():
    return



def F():
    return



if __name__ == "__main__":
    C()

Solution (Python):
import sys


def solve():
    N, *A = map(int, sys.stdin.read().split())
    return 'YES' if len(set(A)) == N else 'NO'


if __name__ == "__main__":
    answer = solve()
    print(answer)

Solution (Python):
n=int(input())
nums=input().split()
appeared={}
for num in nums:
  if num in appeared:
    print('NO')
    break
  appeared[num]=0
else:
  print('YES')