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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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())

# b,r = map(str, readline().split())
# A,B = map(int, readline().split())
N = I()
A = LI()

def main():
    judge=False
    if len(set(A))==N:
        judge=True
    if judge:
        return 'YES'
    else:
        return 'NO'
print(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 read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines 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())

# b,r = map(str, readline().split())
# A,B = map(int, readline().split()) LS N = I() N I() I A = LI() A LI() LI def main():
    judge=False
    if len(set(A))==N:
        judge=True
    if judge:
        return 'YES'
    else:
        return 'NO' main judge=False judge False if len(set(A))==N:
        judge=True
     len(set(A))==N len(set(A)) len set(A) set A N judge=True judge True if judge:
        return 'YES'
    else:
        return 'NO' judge return 'YES' 'YES' return 'NO' 'NO' print(main()) print main() main readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline read = sys.stdin.buffer.read sys.stdin.buffer.read read def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def _S(): return sys.stdin.readline().rstrip() def _S(): return sys.stdin.readline().rstrip() _S def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI A = LI() LI() A def main():
    judge=False
    if len(set(A))==N:
        judge=True
    if judge:
        return 'YES'
    else:
        return 'NO' def main():
    judge=False
    if len(set(A))==N:
        judge=True
    if judge:
        return 'YES'
    else:
        return 'NO' main readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines def LS(): return list(sys.stdin.readline().rstrip().split())

# b,r = map(str, readline().split())
# A,B = map(int, readline().split()) def LS(): return list(sys.stdin.readline().rstrip().split())

# b,r = map(str, readline().split())
# A,B = map(int, readline().split()) LS N = I() I() N
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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())

# b,r = map(str, readline().split())
# A,B = map(int, readline().split())
N = I()
A = LI()

def main():
    judge=False
    if len(set(A))==N:
        judge=True
    if judge:
        return 'YES'
    else:
        return 'NO'
print(main())
