program main
      implicit none
      integer(4) :: k, a, b, i

      read *, k
      read *, a, b

      do i = a, b
        if ( mod(i,k) == 0 ) then
          print *, 'OK'
          stop
        end if
      end do
          print *, 'NG'
end program main
