from collections import Counter

n = int(input())
a = list(map(int, input().split()))

c = Counter(a)
new = c.values()

for i in new:
    if i != 1:
        re = "NO"
        break
    else:
        re = "YES"

print(re) from collections import Counter n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split c = Counter(a) c Counter(a) Counter a new = c.values() new c.values() c.values c values for i in new:
    if i != 1:
        re = "NO"
        break
    else:
        re = "YES" i new if i != 1:
        re = "NO"
        break
    else:
        re = "YES" i != 1 i 1 re = "NO" re "NO" break re = "YES" re "YES" print(re) print re new = c.values() c.values() new c = Counter(a) Counter(a) c re = "NO" "NO" re n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a re = "YES" "YES" re
from collections import Counter

n = int(input())
a = list(map(int, input().split()))

c = Counter(a)
new = c.values()

for i in new:
    if i != 1:
        re = "NO"
        break
    else:
        re = "YES"

print(re)
