program ABC165_A
  integer::A,B,K
  read(*,*)K
  read(*,*)A,B
  N=0
  do i=1,1000
     if(A<=K*i .and. K*i<=B) then
        N=1
        go to 10
     end if
     if(K*i>1000) go to 10
  end do
 10 if(N==1) then
     write(*,*)'OK'
  else
     write(*,*)'NG'
  end if
end program ABC165_A