import sys

 

 

def solve():

    readline = sys.stdin.buffer.readline

    mod = 10 ** 9 + 7

    n = int(readline())

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

    a.sort()

    for i in range(1, n):

        if a[i] == a[i-1]:

            print("NO")

            exit()

    print("YES")

 

 

if __name__ == '__main__':

    solve()

N=int(eval(input()))

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

flg=0

if len(set(A))==N:

    flg=1

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

        
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10**9 + 7
    n = int(readline())
    a = list(map(int, readline().split()))
    a.sort()
    for i in range(1, n):
        if a[i] == a[i - 1]:
            print("NO")
            exit()
    print("YES")


if __name__ == "__main__":
    solve()

N = int(eval(input()))
A = list(map(int, input().split()))
flg = 0
if len(set(A)) == N:
    flg = 1
print(("YES" if flg else "NO"))

-import sys - - -def solve(): -    readline = sys.stdin.buffer.readline -    mod = 10**9 + 7 -    n = int(readline()) -    a = list(map(int, readline().split())) -    a.sort() -    for i in range(1, n): -        if a[i] == a[i - 1]: -            print("NO") -            exit() -    print("YES") - - -if __name__ == "__main__": -    solve() +N = int(eval(input())) +A = list(map(int, input().split())) +flg = 0 +if len(set(A)) == N: +    flg = 1 +print(("YES" if flg else "NO"))