import collections

n = int(input())
a = list(input().split())
c = collections.Counter(a)

if c.most_common()[0][1] != 1:
    print('NO')
    exit()

print('YES') import collections collections n = int(input()) n int(input()) int input() input a = list(input().split()) a list(input().split()) list input().split() ().split () input split c = collections.Counter(a) c collections.Counter(a) collections.Counter collections Counter a if c.most_common()[0][1] != 1:
    print('NO')
    exit() c.most_common()[0][1] != 1 c.most_common()[0][1] [0] c.most_common() c.most_common c most_common 0 1 1 print('NO') print 'NO' exit() exit print('YES') print 'YES' c = collections.Counter(a) collections.Counter(a) c a = list(input().split()) list(input().split()) a n = int(input()) int(input()) n
import collections

n = int(input())
a = list(input().split())
c = collections.Counter(a)

if c.most_common()[0][1] != 1:
    print('NO')
    exit()

print('YES')