with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Solve is
   K : Integer;
   A : Integer;
   B : Integer;
   flag : Integer;
begin
   Get (K);
   Get (A);
   Get (B);
   flag := 0;
   for I in A .. B loop
      if I/K*K = I then
         if flag = 0 then
            Put_Line ("OK");
         end if;
         flag := 1;
      end if;
   end loop;
   if flag = 0 then
      Put_Line ("NG");
   end if;
end Solve;