from collections import Counter as Ct
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def do():
    n=INT()
    a=LIST()
    a=set(a)
    if n==len(a):
        print('YES')
    else:
        print('NO')
if __name__=='__main__':
    do() from collections import Counter as Ct INT = lambda: int(input()) INT lambda: int(input()) int(input()) int input() input INTM = lambda: map(int,input().split()) INTM lambda: map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split STRM = lambda: map(str,input().split()) STRM lambda: map(str,input().split()) map(str,input().split()) map str input().split() ().split () input split STR = lambda: str(input()) STR lambda: str(input()) str(input()) str input() input LIST = lambda: list(map(int,input().split())) LIST lambda: list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split LISTS = lambda: list(map(str,input().split())) LISTS lambda: list(map(str,input().split())) list(map(str,input().split())) list map(str,input().split()) map str input().split() ().split () input split def do():
    n=INT()
    a=LIST()
    a=set(a)
    if n==len(a):
        print('YES')
    else:
        print('NO') do n=INT() n INT() INT a=LIST() a LIST() LIST a=set(a) a set(a) set a if n==len(a):
        print('YES')
    else:
        print('NO') n==len(a) n len(a) len a print('YES') print 'YES' print('NO') print 'NO' if __name__=='__main__':
    do() __name__=='__main__' __name__ '__main__' do() do STR = lambda: str(input()) lambda: str(input()) STR LISTS = lambda: list(map(str,input().split())) lambda: list(map(str,input().split())) LISTS INT = lambda: int(input()) lambda: int(input()) INT STRM = lambda: map(str,input().split()) lambda: map(str,input().split()) STRM def do():
    n=INT()
    a=LIST()
    a=set(a)
    if n==len(a):
        print('YES')
    else:
        print('NO') def do():
    n=INT()
    a=LIST()
    a=set(a)
    if n==len(a):
        print('YES')
    else:
        print('NO') do INTM = lambda: map(int,input().split()) lambda: map(int,input().split()) INTM LIST = lambda: list(map(int,input().split())) lambda: list(map(int,input().split())) LIST
from collections import Counter as Ct
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def do():
    n=INT()
    a=LIST()
    a=set(a)
    if n==len(a):
        print('YES')
    else:
        print('NO')
if __name__=='__main__':
    do()