def distinct(a):
  d = {}
  for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
  for key in d:
    if d[key] > 1: return False
  return True
n = int(input())
a = list(map(int, input().split()))
print('YES' if distinct(a) else 'NO') def distinct(a):
  d = {}
  for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
  for key in d:
    if d[key] > 1: return False
  return True distinct d = {} d {} for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
   num a try: d[num] += 1
    except KeyError: d[num] = 1
   except KeyError: d[num] = 1
   for key in d:
    if d[key] > 1: return False
   key d if d[key] > 1: return False
   d[key] > 1 d[key] d key 1 return True True a a 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 print('YES' if distinct(a) else 'NO') print 'YES' if distinct(a) else 'NO' distinct(a) distinct a 'YES' 'NO' def distinct(a):
  d = {}
  for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
  for key in d:
    if d[key] > 1: return False
  return True def distinct(a):
  d = {}
  for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
  for key in d:
    if d[key] > 1: return False
  return True distinct a = list(map(int, input().split())) list(map(int, input().split())) a n = int(input()) int(input()) n
def distinct(a):
  d = {}
  for num in a:
    try: d[num] += 1
    except KeyError: d[num] = 1
  for key in d:
    if d[key] > 1: return False
  return True
n = int(input())
a = list(map(int, input().split()))
print('YES' if distinct(a) else 'NO')