program DorN
    implicit none
    integer(8) n, i, j
    integer :: f = 0
    integer(8),allocatable :: a(:)
    read *, n
    allocate(a(n))
    read *, a(1:n)
    do i = 1, n-1
        do j = i + 1, n
            if(a(i) .eq. a(j))then
                f = f + 1
                exit
            end if
        end do
        if(f .ge. 1)exit
    end do
    if(f .ge. 1)then
        print *, 'NO'
    else
        print *, 'YES'
    end if
end program