import sys

n=int(input())
a=sorted([int(x) for x in input().split()])
for i in range(n-1):
  if a[i]==a[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 a=sorted([int(x) for x in input().split()]) a sorted([int(x) for x in input().split()]) sorted [int(x) for x in input().split()] for i in range(n-1):
  if a[i]==a[i+1]:
    print("NO")
    sys.exit() i range(n-1) range n-1 n 1 if a[i]==a[i+1]:
    print("NO")
    sys.exit() a[i]==a[i+1] a[i] a i a[i+1] a i+1 i 1 print("NO") print "NO" sys.exit() sys.exit sys exit print("YES") print "YES" a=sorted([int(x) for x in input().split()]) sorted([int(x) for x in input().split()]) a n=int(input()) int(input()) n
import sys

n=int(input())
a=sorted([int(x) for x in input().split()])
for i in range(n-1):
  if a[i]==a[i+1]:
    print("NO")
    sys.exit()
print("YES")