import math
import collections

def main():
  N = int(input())
  A = map(int, input().split())
  
  l = collections.Counter(A)
  
  for key,value in l.items():
    if value >= 2:
      print('NO')
      return
  print('YES')
    
    
  
main() import math math import collections collections def main():
  N = int(input())
  A = map(int, input().split())
  
  l = collections.Counter(A)
  
  for key,value in l.items():
    if value >= 2:
      print('NO')
      return
  print('YES')
    
    
   main N = int(input()) N int(input()) int input() input A = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split l = collections.Counter(A) l collections.Counter(A) collections.Counter collections Counter A for key,value in l.items():
    if value >= 2:
      print('NO')
      return
   key value l.items() l.items l items if value >= 2:
      print('NO')
      return
   value >= 2 value 2 print('NO') print 'NO' return print('YES') print 'YES' main() main def main():
  N = int(input())
  A = map(int, input().split())
  
  l = collections.Counter(A)
  
  for key,value in l.items():
    if value >= 2:
      print('NO')
      return
  print('YES')
    
    
   def main():
  N = int(input())
  A = map(int, input().split())
  
  l = collections.Counter(A)
  
  for key,value in l.items():
    if value >= 2:
      print('NO')
      return
  print('YES')
    
    
   main
import math
import collections

def main():
  N = int(input())
  A = map(int, input().split())
  
  l = collections.Counter(A)
  
  for key,value in l.items():
    if value >= 2:
      print('NO')
      return
  print('YES')
    
    
  
main()