program main

  implicit none
  integer :: i, k, a, b
  integer :: itr, c, iflag = 0

  read *, k
  read *, a, b
  if( a > b .or. &
      a < 1 .or. &
      b < 1 .or. &
      a > 1000 .or. &
      b > 1000  ) stop "Invalid input."

  itr = b - a
  c = a
  do i = 1, itr
    if( mod( c, k ) == 0 ) then
      iflag = 1
    end if
    c = c + 1
  end do

  if( iflag /= 0 ) then
    write( 6, * ) "OK"
  else
    write( 6, * ) "NG"
  end if

end program
