program ABC154C
    implicit none
    integer(8)::N,i
    integer(8)::flg=0
    integer(8),allocatable,dimension(:)::A
    read(5,*)N
    allocate(A(N))
    read(5,*)(A(i),i=1,N)
    A=iqsort(A)

    do i=1,N-1
        if(A(i)==A(i+1))then
            flg=1
            exit
        end if
    end do

    if(flg==0)then
        print'(A)',"YES"
    else
        print'(A)',"NO"
    end if

contains
    recursive function iqsort(ix) result(ires)
      integer(8), allocatable :: ires(:)
      integer(8), intent(in)  :: ix(:)
      integer :: k
      if (size(ix) <= 1) then 
        ires = ix
      else  
        k = ix(size(ix) / 2)
        ires = [iqsort(pack(ix, ix < k)), pack(ix, ix == k), iqsort(pack(ix, ix > k))] 
      end if
    end function iqsort
end program ABC154C