import sys
n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for i in range(n):
  if(i == n-1):
    continue
  elif(l[i] == l[i + 1]):
    print('NO')
    sys.exit()
print('YES')     import sys sys n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x l = [int(x) for x in input().split()] l [int(x) for x in input().split()] l.sort() l.sort l sort for i in range(n):
  if(i == n-1):
    continue
  elif(l[i] == l[i + 1]):
    print('NO')
    sys.exit() i range(n) range n if(i == n-1):
    continue
  elif(l[i] == l[i + 1]):
    print('NO')
    sys.exit() i == n-1 i n-1 n 1 continue elif(l[i] == l[i + 1]):
    print('NO')
    sys.exit() l[i] == l[i + 1] l[i] l i l[i + 1] l i + 1 i 1 print('NO') print 'NO' sys.exit() sys.exit sys exit print('YES') print 'YES' l = [int(x) for x in input().split()] [int(x) for x in input().split()] l n = int(input()) int(input()) n
import sys
n = int(input())
l = [int(x) for x in input().split()]
l.sort()
for i in range(n):
  if(i == n-1):
    continue
  elif(l[i] == l[i + 1]):
    print('NO')
    sys.exit()
print('YES')    
