from collections import Counter
n=int(input())
a=list(map(int,input().split()))
dic=Counter(a)
for val in dic.values():
    if val>=2:
        print("NO")
        exit()
print("YES") 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 dic=Counter(a) dic Counter(a) Counter a for val in dic.values():
    if val>=2:
        print("NO")
        exit() val dic.values() dic.values dic values if val>=2:
        print("NO")
        exit() val>=2 val 2 print("NO") print "NO" exit() exit print("YES") print "YES" n=int(input()) int(input()) n a=list(map(int,input().split())) list(map(int,input().split())) a dic=Counter(a) Counter(a) dic
from collections import Counter
n=int(input())
a=list(map(int,input().split()))
dic=Counter(a)
for val in dic.values():
    if val>=2:
        print("NO")
        exit()
print("YES")