import collections
N = int(input())
lsA = list(map(int,input().split()))

cout = collections.Counter(lsA)
ans = 'YES'
for i in cout.values():
    if i > 1:
        ans = 'NO'
        break

print(ans) import collections collections N = int(input()) N int(input()) int input() input lsA = list(map(int,input().split())) lsA list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split cout = collections.Counter(lsA) cout collections.Counter(lsA) collections.Counter collections Counter lsA ans = 'YES' ans 'YES' for i in cout.values():
    if i > 1:
        ans = 'NO'
        break i cout.values() cout.values cout values if i > 1:
        ans = 'NO'
        break i > 1 i 1 ans = 'NO' ans 'NO' break print(ans) print ans cout = collections.Counter(lsA) collections.Counter(lsA) cout ans = 'YES' 'YES' ans ans = 'NO' 'NO' ans N = int(input()) int(input()) N lsA = list(map(int,input().split())) list(map(int,input().split())) lsA
import collections
N = int(input())
lsA = list(map(int,input().split()))

cout = collections.Counter(lsA)
ans = 'YES'
for i in cout.values():
    if i > 1:
        ans = 'NO'
        break

print(ans)