import collections
N=int(input())
A=list(map(int,input().split()))
li=list(collections.Counter(A).values())
for i in range(len(li)):
  if li[i]>1:
    print('NO')
    exit()
print('YES') import collections collections N=int(input()) N int(input()) int input() input A=list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split li=list(collections.Counter(A).values()) li list(collections.Counter(A).values()) list collections.Counter(A).values() collections.Counter(A).values collections.Counter(A) collections.Counter collections Counter A values for i in range(len(li)):
  if li[i]>1:
    print('NO')
    exit() i range(len(li)) range len(li) len li if li[i]>1:
    print('NO')
    exit() li[i]>1 li[i] li i 1 print('NO') print 'NO' exit() exit print('YES') print 'YES' A=list(map(int,input().split())) list(map(int,input().split())) A li=list(collections.Counter(A).values()) list(collections.Counter(A).values()) li N=int(input()) int(input()) N
import collections
N=int(input())
A=list(map(int,input().split()))
li=list(collections.Counter(A).values())
for i in range(len(li)):
  if li[i]>1:
    print('NO')
    exit()
print('YES')