program golf
 implicit none
 character s*3
 integer a,b,k,c,d
 read *, k
 read (*,*) a,b
 c = a/k
 d = b/k
 if ((c.NE.d) .or. ( k*c == a) ) then
 print *,'OK'
 else
 print *,'NG'
 end if
end program golf
 
