program main
	implicit none
    integer i,j,n,flag
    integer,allocatable :: a(:)
    
    flag=1 !distinct
    
    read(*,*) n
    allocate(a(n))
    read(*,*) (a(i),i=1,n)
    do i=1,n-1
       if (flag==0) then
          exit
       else
          do j=i+1,n
             if (a(i)==a(j)) then
                flag=0
                exit
             end if
          end do
       end if
    end do
    if (flag==1) then
       write(*,'(a)') 'YES'
    else
       write(*,'(a)') 'NO'
    end if
end program main