import collections
n = int(input())
a = list(map(int,input().split()))

li = collections.Counter(a)

li2 = [i for i in li.values()]

if max(li2)==1:
    print("YES")
else:
    print("NO")
     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 = collections.Counter(a) li collections.Counter(a) collections.Counter collections Counter a i for i in li.values() for i in li.values() i li.values() li.values li values for i in li.values() i li2 = [i for i in li.values()] li2 [i for i in li.values()] if max(li2)==1:
    print("YES")
else:
    print("NO")
     max(li2)==1 max(li2) max li2 1 print("YES") print "YES" print("NO") print "NO" a = list(map(int,input().split())) list(map(int,input().split())) a li = collections.Counter(a) collections.Counter(a) li li2 = [i for i in li.values()] [i for i in li.values()] li2 n = int(input()) int(input()) n
import collections
n = int(input())
a = list(map(int,input().split()))

li = collections.Counter(a)

li2 = [i for i in li.values()]

if max(li2)==1:
    print("YES")
else:
    print("NO")
    
