program problemA
  implicit none

integer :: K,A,B
integer :: N, m, yr


read(*,*) K
read(*,*) A,B

if (K==1) then
  write(*,*) 'OK'
else

  if (int(A/K)==int(B/K)) then
    write(*,*) 'NG'
  else
    write(*,*) 'OK'
  end if

end if 


stop
end program
