import heapq
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
bef = a[0]
for i in range(1,n):
    if bef == a[i]:
        print("NO")
        break
    bef = a[i]
    if i == n-1:
        print("YES") import heapq heapq 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 = [int(x) for x in input().split()] a [int(x) for x in input().split()] a.sort() a.sort a sort bef = a[0] bef a[0] a 0 for i in range(1,n):
    if bef == a[i]:
        print("NO")
        break
    bef = a[i]
    if i == n-1:
        print("YES") i range(1,n) range 1 n if bef == a[i]:
        print("NO")
        break
     bef == a[i] bef a[i] a i print("NO") print "NO" break bef = a[i] bef a[i] a i if i == n-1:
        print("YES") i == n-1 i n-1 n 1 print("YES") print "YES" a = [int(x) for x in input().split()] [int(x) for x in input().split()] a bef = a[0] a[0] bef bef = a[i] a[i] bef n = int(input()) int(input()) n
import heapq
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
bef = a[0]
for i in range(1,n):
    if bef == a[i]:
        print("NO")
        break
    bef = a[i]
    if i == n-1:
        print("YES")