Program main
  implicit none
  integer :: K , A,B, i

  read (*,*) K
  read(*,*) A,B
  do i = A,B
     if (mod(i,K) == 0 ) then
        write(*,'(a)') 'OK'
        stop
     end if
  end do
  write(*,'(a)') 'NG'

  stop
end program main
