from collections import Counter
from sys import exit

N = int(input())
A = list(map(int,input().split()))

cnt = Counter(A)

for i in cnt.values():
    if i != 1:
        print("NO")
        exit(0)

print("YES") from collections import Counter from sys import exit 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 cnt = Counter(A) cnt Counter(A) Counter A for i in cnt.values():
    if i != 1:
        print("NO")
        exit(0) i cnt.values() cnt.values cnt values if i != 1:
        print("NO")
        exit(0) i != 1 i 1 print("NO") print "NO" exit(0) exit 0 print("YES") print "YES" A = list(map(int,input().split())) list(map(int,input().split())) A N = int(input()) int(input()) N cnt = Counter(A) Counter(A) cnt
from collections import Counter
from sys import exit

N = int(input())
A = list(map(int,input().split()))

cnt = Counter(A)

for i in cnt.values():
    if i != 1:
        print("NO")
        exit(0)

print("YES")