program main
    implicit none
    integer(4):: n,i
    integer(8),allocatable:: a(:)
    logical,allocatable:: exist(:)
    read*, n
    allocate(a(n))
    read*, a(:)
    allocate(exist(maxval(a(:))))
    exist(:) = .false.

    do i=1, n
        if (exist(a(i)))then
            print'(a)', 'NO'
            stop
        else
            exist(a(i)) = .true.
        end if
    end do
    print'(a)', 'YES'
end program main