K = int(eval(input()))

A, B = list(map(int, input().split()))





ps = int(A / K)

pa = A % K

qs = int(B / K)

qa = B % K



if A==B:

	if pa==0:

		print("OK")

	else:

		print("NG")

else:

	if qs-ps>0:

		print("OK")

	else:

		if pa==0 or qa ==0:

			print("OK")

		else:

			print("NG")
import math

k=int(eval(input()))

a,b = list(map(int, input().split()))

ans="NG"



while a <= b:

	if a%k==0:

		ans ="OK"

		a=b+1

	else:

		a=a+1



print(ans)
K = int(eval(input()))
A, B = list(map(int, input().split()))
ps = int(A / K)
pa = A % K
qs = int(B / K)
qa = B % K
if A == B:
    if pa == 0:
        print("OK")
    else:
        print("NG")
else:
    if qs - ps > 0:
        print("OK")
    else:
        if pa == 0 or qa == 0:
            print("OK")
        else:
            print("NG")

import math

k = int(eval(input()))
a, b = list(map(int, input().split()))
ans = "NG"
while a <= b:
    if a % k == 0:
        ans = "OK"
        a = b + 1
    else:
        a = a + 1
print(ans)

-K = int(eval(input())) -A, B = list(map(int, input().split())) -ps = int(A / K) -pa = A % K -qs = int(B / K) -qa = B % K -if A == B: -    if pa == 0: -        print("OK") +import math + +k = int(eval(input())) +a, b = list(map(int, input().split())) +ans = "NG" +while a <= b: +    if a % k == 0: +        ans = "OK" +        a = b + 1 -        print("NG") -else: -    if qs - ps > 0: -        print("OK") -    else: -        if pa == 0 or qa == 0: -            print("OK") -        else: -            print("NG") +        a = a + 1 +print(ans)