program Beg3                                                                                               
  implicit none
  integer :: N, i, j
  integer, allocatable :: A(:)


  read(*,*) N
  allocate(A(N))
  read(*,*) (A(i), i=1,N)

  do i=1,N-1
     do j=i+1,N
        if(A(i).eq.A(j)) goto 500
     enddo
  enddo

  print*, 'YES'
  stop

  500 print *, 'NO'



end program Beg3

