program main
implicit none
integer :: i, j, k
integer :: n
integer , allocatable :: a(:)

read(*,*) n
allocate( a(n) )
read(*,*) a

do i = 1, n-1
   do j = i+1, n
      if( a(i) == a(j) ) then
         write(*,*) 'NO'
         stop
      end if
   end do
end do
write(*,*) 'YES'

stop
end program main