let main k a b =
  let rec loop i =
    if a <= i * k && i * k <= b then
      print_string "OK"
    else if b < i * k then
      print_string "NG"
    else
      loop (i + 1)
  in
  loop 1;;

Scanf.sscanf (read_line ()) "%d" (fun k ->
    Scanf.sscanf (read_line ()) "%d %d" (fun a b ->
	main k a b
));;