from collections import defaultdict
dic = defaultdict(int)

N = int(input())
for a in list(map(int, input().split())):
  dic[a] += 1
  if dic[a] >= 2:
    print('NO')
    exit()
print('YES') from collections import defaultdict dic = defaultdict(int) dic defaultdict(int) defaultdict int N = int(input()) N int(input()) int input() input for a in list(map(int, input().split())):
  dic[a] += 1
  if dic[a] >= 2:
    print('NO')
    exit() a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split dic[a] += 1 dic[a] dic a 1 if dic[a] >= 2:
    print('NO')
    exit() dic[a] >= 2 dic[a] dic a 2 print('NO') print 'NO' exit() exit print('YES') print 'YES' dic = defaultdict(int) defaultdict(int) dic N = int(input()) int(input()) N
from collections import defaultdict
dic = defaultdict(int)

N = int(input())
for a in list(map(int, input().split())):
  dic[a] += 1
  if dic[a] >= 2:
    print('NO')
    exit()
print('YES')