#from statistics import median

#import collections

#aa = collections.Counter(a) # list to list

#from itertools import combinations # (string,3) 3回

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#



mod = 10**9 + 7



def readInts():

  return list(map(int,input().split()))

def main():

    n = int(eval(input()))

    A = sorted(readInts())

    dic = {}

    for a in A:

        if a in dic:

            print('NO')

            exit()

        else:

            dic[a] = 1

    print('YES')

if __name__ == '__main__':

  main()

#from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations,permutations,accumulate # (string,3) 3回

#from collections import deque

from collections import deque,defaultdict,Counter

import decimal

import re

#import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#

# my_round_int = lambda x:np.round((x*2 + 1)//2)

# 四捨五入

import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7

#mod = 9982443453

def readInts():

  return list(map(int,input().split()))

def I():

  return int(eval(input()))

n = I()

A = list(set(readInts()))

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

# from statistics import median
# import collections
# aa = collections.Counter(a) # list to list
# from itertools import combinations # (string,3) 3回
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
mod = 10**9 + 7


def readInts():
    return list(map(int, input().split()))


def main():
    n = int(eval(input()))
    A = sorted(readInts())
    dic = {}
    for a in A:
        if a in dic:
            print("NO")
            exit()
        else:
            dic[a] = 1
    print("YES")


if __name__ == "__main__":
    main()

# from statistics import median
# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations, permutations, accumulate  # (string,3) 3回

# from collections import deque
from collections import deque, defaultdict, Counter
import decimal
import re

# import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7
# mod = 9982443453
def readInts():
    return list(map(int, input().split()))


def I():
    return int(eval(input()))


n = I()
A = list(set(readInts()))
print(("YES" if n == len(A) else "NO"))

-# aa = collections.Counter(a) # list to list -# from itertools import combinations # (string,3) 3回 +# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] +from fractions import gcd +from itertools import combinations, permutations, accumulate  # (string,3) 3回 + +# from collections import deque +from collections import deque, defaultdict, Counter +import decimal +import re + +# import bisect +# +#    d = m - k[i] - k[j] +#    if kk[bisect.bisect_right(kk,d) - 1] == d: +# +# my_round_int = lambda x:np.round((x*2 + 1)//2) +# 四捨五入 +import sys + +sys.setrecursionlimit(10000000) - - +# mod = 9982443453 -def main(): -    n = int(eval(input())) -    A = sorted(readInts()) -    dic = {} -    for a in A: -        if a in dic: -            print("NO") -            exit() -        else: -            dic[a] = 1 -    print("YES") +def I(): +    return int(eval(input())) -if __name__ == "__main__": -    main() +n = I() +A = list(set(readInts())) +print(("YES" if n == len(A) else "NO"))