program golf
integer i,K,A,B
read(*,*) K
read(*,*) A, B
i=0
if(B-A>=K) then
	write(*,*) "OK"
else
	do i=0, B-A
	    if(mod(A+i,K)==0) then
        	write(*,*) "OK"
        else
        	write(*,*) "NG"
        end if
    end do
end if
program end