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 (A==B) then
    if (mod(A,K)==0) then
      write(*,*) 'OK'
    else
      write(*,*) 'NG'
    end if 
  else
    if (int(A/K)==int(B/K)) then
      write(*,*) 'NG'
    else
      write(*,*) 'OK'
    end if
  end if
end if


stop
end program
