import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    N = I()
    A = LI()
    print("YES" if len(list(set(A)))==len(A) else "NO")


main()
 import bisect,collections,copy,heapq,itertools,math,numpy,string bisect collections copy heapq itertools math numpy string import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 def S(): return sys.stdin.readline().rstrip() S def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS def main():
    N = I()
    A = LI()
    print("YES" if len(list(set(A)))==len(A) else "NO") main N = I() N I() I A = LI() A LI() LI print("YES" if len(list(set(A)))==len(A) else "NO") print "YES" if len(list(set(A)))==len(A) else "NO" len(list(set(A)))==len(A) len(list(set(A))) len list(set(A)) list set(A) set A len(A) len A "YES" "NO" main() main def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def main():
    N = I()
    A = LI()
    print("YES" if len(list(set(A)))==len(A) else "NO") def main():
    N = I()
    A = LI()
    print("YES" if len(list(set(A)))==len(A) else "NO") main def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    N = I()
    A = LI()
    print("YES" if len(list(set(A)))==len(A) else "NO")


main()

