k,a,b=list(map(int,open(0).read().split()))

print(("OK"if a<=b//k*k else"NG"))
k,a,b=list(map(int,open(0).read().split()))

print(("ONKG"[a>b//k*k::2]))
k, a, b = list(map(int, open(0).read().split()))
print(("OK" if a <= b // k * k else "NG"))

k, a, b = list(map(int, open(0).read().split()))
print(("ONKG"[a > b // k * k :: 2]))

-print(("OK" if a <= b // k * k else "NG")) +print(("ONKG"[a > b // k * k :: 2]))