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() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def I(): return int(input()) I def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) LI 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 mod=10**9+7 mod 10**9+7 10**9 10 9 7 N=I() N I() I A=LI() A LI() LI A.sort() A.sort A sort flag=1 flag 1 for i in range(N-1):
        if A[i]==A[i+1]:
            flag=0
            break
        
     i range(N-1) range N-1 N 1 if A[i]==A[i+1]:
            flag=0
            break
        
     A[i]==A[i+1] A[i] A i A[i+1] A i+1 i 1 flag=0 flag 0 break if flag:
        print("YES")
    else:
        print("NO") flag print("YES") print "YES" print("NO") print "NO" main() main input = sys.stdin.readline sys.stdin.readline input 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") 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 def I(): return int(input()) def I(): return int(input()) I def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI
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()
