program main
  implicit none
  integer :: k, a, b
  read *, k
  read *, a, b
  if (possible(k, a, b)) then
    print "(a)", "OK"
  else
    print "(a)", "NG"
  end if
  contains
  logical function possible(k, a, b)
    integer, intent(in) :: k, a, b
    integer :: i
    possible = .false.
    do i = a, b
      if (modulo(i, k) == 0) possible = .true.
    end do
  end function possible
end program main
