program sample
implicit none
integer K,A,B,C,count1,count2
read(*,*)K
read(*,*)A,B
C=A/K
count1=(C+1)*K
count2=C*K
If (count1>=A.and.count1<=B) then
   write(*,*) "OK"
else if (count2==A) then
   write(*,*) "OK"
else
   write(*,*) "NG"
end if
stop
end program sample