peterverebics/CodeNet_Python_118 huggingface dataset:
a = int(input())
b, c = map(int, input().split())

m = b // a
n = m * a
if (b % a == 0):
    print("OK")
elif (n + a <= c):
    print("OK")
else:
    print("NG")
K = int(input())
A,B = map(int,input().split())
if (B-A) >=(B%K):
    print("OK")
else:
    print("NG")
K = int(input())
a, b = map(int, input().split())
 
for num in range(a, b+1):
  if num % K == 0:
    print('OK')
    break
else:
  print('NG')
import math
k = int(input())
a,b = map(int,input().split())
if math.ceil(a/k)*k<=b:
    print('OK')
else:
    print('NG')
K = int(input())
A, B = list(map(int, input().split()))
check = False

for k in range(A, B+1):
    if k % K == 0:
        check = True
    else:
        continue
if check:
    print("OK")
else:
    print("NG")
k=int(input())
a,b=map(int,input().split())
x=b//k
if ((x*k) >= a) and ((x*k) <= b):
    print('OK')
else:
    print('NG')
n = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i % n == 0:
    print("OK")
    exit()
print("NG")
K=int(input())
A,B=map(int,input().split())
flag=0
for i in range(A,B+1):
    if i%K==0:
        flag=1

if flag==0:
    print("NG")
else:
    print("OK")
a = int(input())
b, c = map(int, input().split())
d = 0
for i in range(b,c+1):
    if i % a == 0:
        print("OK")
        d = 1
        break
if d == 0:
    print("NG")
a=int(input())
b=input().split()
c = int(b[0]) % a
if c ==0:
    c = a
d = int(b[1]) - int(b[0])
if c + d >= a :
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())

for num in range(a, b+1):
    if num % k == 0:
        print('OK')
        exit()

print('NG')
K = int(input())
A, B = map(int, input().split())

for i in range(A, B+1):
  if i % K == 0:
    print('OK')
    break
else:
  print('NG')
k = int(input())
a,b = list(map(int, input().split()))

for i in range(a,b+1):
    if i%k==0:
        print("OK")
        exit()

print("NG")
#A
k = int(input())
a,b = map(int,input().split())
flg = False
for i in range(a,b+1):
    if i % k == 0:
        flg = True
    
if flg:
    print('OK')
else:
    print('NG')
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%k==0:
    print("OK")
    break
else:
  print("NG")
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
    if i%k==0:
        print('OK')
        break
else:
    print('NG')
import sys
k = int(input())
a,b = map(int, input().split())
for i in range(a, b+1):
    if (i % k == 0):
        print('OK')
        sys.exit()
print('NG')
k = int(input())
a, b = map(int, input().split())
if a%k == 0:
  print("OK")
elif a//k == b//k:
  print("NG")
else:
  print("OK")
N = int(input())
sh, lg = map(int, input().split())
ans = 'NG'
for i in range(sh, lg+1):
    if i % N == 0:
        ans = 'OK'
        break
print(ans)
k = int(input())
a,b = map(int, input().split())
c = 0
for i in range(a,b+1):
  if i%k==0:
    c+=1
if c>=1:
  print("OK")
else:
  print("NG")
K = int(input())
A, B = map(int, input().split())
for i in range(A,B+1):
    if i % K == 0:
        print('OK')
        exit()
print('NG')
import numpy as np
import math
k=int(input())
a,b=map(int,input().split())

#print((a%k*b%k))

if((b//k-a//k)>=1 or (b%k*a%k)==0):
  print("OK")
else:
  print("NG")
k = int(input())
a,b = map(int, input().split())
i=a
while i<=b:
    if i%k==0:
        print("OK")
        exit()
    i+=1
print("NG")
K = int(input())
A, B = list(map(int, input().split()))

while True:
    if A == B + 1:
        print('NG')
        break
    if A % K == 0:
        print('OK')
        break
    A += 1
K = int(input())
A, B = map(int, input().split())

l = [i for i in range(A, B+1)]

for i in l:
  if i%K == 0:
    print('OK')
    break
  if i == l[-1] and i%K != 0:
    print('NG')
k = int(input())
a, b = map(int, input().split())

ans = False
tmp = k

while tmp <= b:
    if (tmp >= a) and (tmp <= b):
        ans = True
        break
    else:
        tmp += k

if ans:
    print('OK')
else:
    print('NG')
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
    if i % k ==0:
        print("OK")
        exit(0)
print("NG")
k = int(input())
a,b = map(int,input().split())
d = 0
while d<=b:
  if a <=d:
    print('OK')
    break
  d+= k
else:
  print('NG')
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    k = int(input())
    a, b = map(int, input().split())
    for i in range(a, b + 1):
        if i % k == 0:
            print('OK')
            exit()
    print('NG')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
K = int(input())
A, B = map(int, input().split())
for i in range(A, B + 1):
  if i % K == 0:
    print('OK')
    break
else:
  print('NG')
K = int(input())
A, B = map(int, input().split())
ans = 'NG'
for i in range(A, B+1):
    if i % K == 0:
        print('OK')
        break
else:
    print(ans)
K=int(input())
A,B=map(int,input().split())
flag=True
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        flag=False
        break
if flag:
    print("NG")
import math

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

largest = math.floor((b/k)) * k
if (a <= largest):
  print("OK")
else:
  print("NG")
k=int(input())

a,b=map(int,input().split())
count=0
for i in range(a,b+1):
  if i%k==0:
    count=count+1
  else:
    count=count
    
if count>0:
  print('OK')
else:
  print('NG')
K = int(input())
A,B = map(int,input().split())

if A % K == 0:
    print('OK')
else:
    m = A // K
    if (m + 1) * K <= B:
        print('OK')
    else:
        print('NG')
k = int(input())
a, b = map(int, input().split())

for i in range(a, b + 1):
    if i%k == 0:
        print("OK")
        exit()

print("NG")
k = int(input())
a,b = map(int,input().split())

for i in range(1000):
  if a <= k*i <= b:
    print("OK")
    exit()
  elif b < k*i:
    print("NG")
    exit()
k = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
    if i % k == 0:
        print('OK')
        quit()

print('NG')
import math
K = int(input())
A, B = map(int, input().split())
para = math.floor(B/K) - math.floor(A/K)
if para > 0 or B%K == 0 or A%K == 0:
    print('OK')


else:
    print('NG')
K = int(input())
A,B = map(int,input().split())


for n in range(A,B+1):
    if n%K == 0:
        print('OK')
        exit()
        
print('NG')
K = int(input())
A, B = map(int, input().split())


for i in range(A, B + 1):
    if i % K == 0:
        print('OK')
        exit()

print('NG')
K = int(input())
A, B = map(int,input().split())
 
 
if A // K == B // K:
    if A % K ==0:
        print('OK')
    else:
        print('NG')  
else:
    print('OK')
def main():
  k=int(input())
  a,b = map(int,input().split())
  for i in range(1000):
    if(a<=i*k and i*k <= b):
      print("OK")
      return 0
  print("NG") 
  return 0

main()
K = int(input())
A, B = map(int, input().split())

for i in range(A, B+1):
    if i % K == 0:
        print('OK')
        exit()

print('NG')
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
    if i%k==0:
        print('OK')
        exit()
print('NG')
# 165 A
K = int(input())
A,B = list(map(int, input().split()))
m = B%K
print('OK') if B-m >= A else print('NG')
from sys import stdin

K = int(stdin.readline().rstrip())
[A, B] = [int(x) for x in input().rstrip().split()]


flag=0
K_temp=K
while(True):
    if(K_temp>B):
        break
    if(K_temp>=A and K_temp<=B):
        flag=1
        break
    else:
        K_temp+=K

if flag==1:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())

print("NG" if A%K != 0 and (A//K+1)*K >B else "OK")
n = int(input())
a, b = map(int, input().split())
if (a <= b//n*n)and(b//n*n <= b):
    print('OK')
else:
    print('NG')
import math
K = int(input())
A, B = map(int, input().split())
ans=''

if K>B:
    ans='NG'
elif K>=A:
    ans='OK'
else:
    K=K*(math.ceil(A/K))
    if K>B:
        ans='NG'
    else:
        ans='OK'

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

for i in range(A, B+1):
    if i % K == 0:
        print('OK')
        exit()

print('NG')
#A
K = int(input())
A,B = map(int,input().split())
a = A//K
b = B//K
if 1 <= b and a != b or A%K == 0:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = (int(x) for x in input().split())

#倍数が何個含まれるかで考える場合
# a = A // K
# b = B // K
# 
# if b-a >= 1 or K == 1:
#     print("OK")
# elif B%K==0 or A%K==0:
#     print("OK")
# else:
#     print("NG")

#B以下の最大のKの倍数がAを超えるかどうかで考える場合
#B以下の最大のkの倍数
maxbk = (B//K)*K

if maxbk >= A:
    print("OK")
else:
    print("NG")
k = int(input())
a, b = map(int, input().split())
 
if ((a // k) + 1) * k <= b or a % k == 0:
  print("OK")
else:
  print("NG")
def golf(k, a, b):
  for i in range(a, b+1):
    if(i%k==0):
      return "OK"
  return "NG"

k = int(input())
a, b = map(int, input().split())
print(golf(k, a, b))
k = int(input())
a, b = map(int, input().split())
tmp = 0
for i in range(a, b+1):
    if i % k == 0:
        tmp = 1
if tmp:
    print("OK")
else:
    print("NG")
k=int(input())
a,b=map(int,input().split())
ok=False
for i in range(a,b+1):
    if i%k==0:
        ok=True
        break
if ok:
    print("OK")
else:
    print("NG")
k=int(input())
a,b=map(int,input().split())
print("NG" if b-a<k and b%k>=a%k and a%k!=0 else "OK")
k=int(input())
a,b=map(int,input().split())
 
for i in range(10000):
 if a<=k*i<=b:
  print("OK")
  exit()
 else:
  pass
print("NG")
K = int(input())
A, B= map(int ,input().split())

check = False
for i in range(A, B+1):
    if i % K == 0:
        check = True

if check:
    print('OK')
else:
    print('NG')
K = int(input())
A, B = map(int, (input().split()))
lst = []
for i in range(A, B+1):
    if i % K == 0:
        result = "OK"
        lst.append(result)
        break
    else:
        result = "NG"
        lst.append(result)
print(lst[-1])
K = int(input())
a,b = map(int,input().split())
flag = 0
for i in range(a,b+1):
    if i%K == 0:
        flag += 1
        print("OK")
        break
if flag == 0:
    print("NG")
k = int(input())
a, b = map(int, input().split())

if a <= a//k*k or (a//k+1)*k <= b:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())
if a % k == 0:
  print("OK")
  exit()
nex = k * ((a // k) + 1)
if nex <= b:
  print("OK")
else:
  print("NG")
k = int(input())
a,b = map(int,input().split())
c = "NG"
for n in range(a,b+1):
    if n%k ==0:
        c = "OK"
        break
print(c)
k = int(input())
a, b = list(map(int, input().split()))
d = k - a % k
if (a % k != 0 and a + d > b):
  print("NG")
else:
  print("OK")
k= int(input())
a,b = map(int, input().split())

for i in range(a,b+1):
    if i % k ==0:
        print('OK')
        break
else:
    print('NG')
K = int(input())
 
A,B=map(int,input().split())
 
if (int(B/K) - int((A-1)/K) ) >=1 :
    print('OK')
else :
    print('NG')
k = int(input())
flag=0
s, w = map(int, input().split())
for i in range(s, w+1):
  if(i % k == 0):
    print('OK')
    flag=1
    break
    
if flag==0:
   print('NG')
k = int(input())
a, b = map(int, input().split())

t = (b//k)*k

if t <= b and a <= t:
    print("OK")
else:
    print("NG")
n = int(input())
a, b = map(int, input().split())
if a <= b//n*n:
    print('OK')
else:
    print('NG')
def main():
    K = int(input())
    A, B = map(int,input().split(' '))

    i = A
    while i <= B:
        if i % K ==0:
            print('OK')
            exit(0)
        i+=1
    print('NG')
        

if __name__ == "__main__":
    main()
def resolve():
    k=int(input())
    a,b=map(int,input().split())
    c=a%k
    d=b-a
    e=k-c
    if c==0 or d>=e:
        print('OK')
    else:
        print('NG')
        
resolve()
import sys

from numba import njit, void, i8
input = sys.stdin.buffer.readline
K = int(input())
A, B = map(int, input().split())


@njit(i8(i8, i8, i8), cache=True)
def main(K, A, B):

    for i in range(A, B + 1):
        if i % K == 0:
            print('OK')
            return 0
    print('NG')
    return 0


if __name__ == '__main__':
    main(K, A, B)
k = int(input())
a,b = map(int,input().split())

for i in range(a,b+1):
    if i % k == 0:
        print('OK')
        exit()
print('NG')
a = int(input())
b, c = map(int, input().split())

flag = 0
while(True):
  if b % a == 0:
    flag=1
    break
  if b == c:
    break
  b += 1

if flag == 1:
  print('OK')
else:
  print('NG')
from sys import stdin


def input():
    return stdin.readline().strip()


def main():
    k = int(input())
    a, b = map(int, input().split())
    
    for n in range(a, b+1):
        if n % k == 0:
            print('OK')
            return
    
    print('NG')


if __name__ == "__main__":
    main()
k=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
    if i%k==0:
        print("OK")
        exit()

print("NG")
#import collections
# c = collections.Counter()
#import itertools as it
#import math
#import numpy as np
#import sys 
#sys.exit()
 
#  = input()
k  = int(input())
a, b  = map(int, input().split())
'''
#  = list(map(int, input().split()))
'''
'''
n = input()
a = [int(input()) for i in range(n)]
'''
'''
n,m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]
'''

#-------------------------------#

if a%k==0 or b%k==0 or a//k!=b//k:
	print('OK')
else:
  	print('NG')
K = int(input())
A, B = map(int, input().split())

for i in range(A, B+1):
    if i%K == 0:
        print("OK")
        exit()
print("NG")
K = int(input())
A, B = map(int, input().split())
for m in range(1, 1001):
  if A<=m*K and m*K<=B:
    print('OK')
    exit()
print('NG')
K = int(input())
A, B = map(int, input().split())

ans = "NG"
a = A//K * K
while a <= B:
    if a >= A:
        ans = "OK"
    a += K
print(ans)
K = int(input())
A, B = map(int, input().split())

for i in range(A, B + 1):
    if i % K == 0:
        print("OK")
        quit(0)
print("NG")
K = int(input())
A, B = [int(_) for _ in input().split()]

a = B // K

if a*K >= A:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())

nK = K
n = 1
ans = "NG"
while(nK<=B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

K = int(input())
A, B = LI()

ans = "NG"
for i in range(A, B+1):
    # print(i)
    if i % K == 0:
        ans = "OK"
print(ans)
K = int(input())
A,B = map(int,input().split())

tmp = B//K * K

if A <= tmp:
    print('OK')
else:
    print('NG')
import numpy as np
import math
k = int(input())
a, b = map(int,input().split())
ans = False
for i in range(a,b+1):
    if i%k == 0:
        ans = True
        break

if ans:
    print("OK")
else:
    print("NG")
import math

K = int(input())
A, B = input().split()

A = int(A)
B = int(B)

if A % K == 0 or B % K == 0:
	print('OK')
elif math.floor(B / K) - math.floor(A / K) >= 1:
	print('OK')
else:
	print('NG')
def main():
    K = int(input())
    A, B = list(map(int, input().split()))

    for i in range(A, B + 1):
        if i % K == 0:
            print("OK")
            return
    print("NG")
    return


main()
k, a, b = map(int, open(0).read().split())
print("NOGK"[a//k < b//k or a//k == a/k::2])
K = int(input())
A, B = map(int,input().split())
C = A % K
if B - A >= K - 1:
  print('OK')
elif C == 0:
  print('OK')
elif C + B - A >= K:
  print('OK')
else:
  print('NG')
k = int(input())
a,b = map(int,input().split())
ans = 'NG'
for i in range(a,b+1):
  if i % k == 0:
    ans = 'OK'
    
print(ans)
K = int(input())
A,B = map(int, input().split())

for i in range(A,B+1):
  if i%K == 0:
    print("OK")
    break
else:
  print("NG")
K = int(input())
a, b = map(int, input().split())

if a <= b // K * K:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())
ans = False
for i in range(a, b+1):
    if i % k == 0:
        ans = True

if ans:
    print("OK")
else:
    print("NG")
n = int(input())
a, b = map(int, input().split())
rangeint = a // n
if a == rangeint * n or a <= (rangeint + 1) * n <= b:
    print('OK')
else:
    print('NG')
K = int(input())

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

while A<=B:
  if A%K == 0:
    print('OK')
    exit()
  A += 1

print('NG')
k=int(input())
a,b=map(int,input().split())
flag=0
for i in range(a,b+1):
    if i%k == 0:
        flag=1
print('OK' if flag == 1 else 'NG')
a=int(input())
b,c=map(int,input().split())
d=c//a*a
if d>=b:
  print('OK')
else:
  print('NG')
k = int(input())
a, b = map(int, input().split())

for i in range(a, b+1):
    if i % k == 0:
        print("OK")
        break
    if i == b:
        print("NG")
K=int(input())
A,B=map(int,input().split())
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        exit()
print("NG")
n=int(input())

x,y = map(int,input().split())

for i in range(x,y+1):
    if i%n == 0:
        print('OK')
        exit()
print('NG')
import sys
import time
import math
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

K = int(input())
A, B = map(int, input().split())
for i in range(A, B+1):
	if i % K == 0:
		print('OK')
		sys.exit()
print('NG')

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)
k = int(input())
a, b = map(int, input().split())

for i in range(b+1):
    s = k*i
    if a <= s and s <= b:
        print('OK')
        break
    elif s > b:
        print('NG')
        break
import sys

k = int(input())

a,b= (int(i) for i in input().split())

for i in range(a,b+1):
    if i%k==0:
        print("OK")
        sys.exit()

print("NG")
k = int(input())
a,b = input().split()
a,b = int(a),int(b)
for i in range(a,b+1):
    if i%k == 0:
        print("OK")
        break
else:
    print("NG")
k = int(input())
a, b = map(int, input().split())
x = a // k
y = b // k
if a % k == 0:
    if y >= x:
        print("OK")
    else:
        print("NG")
else:
    if y >= x + 1:
        print("OK")
    else:
        print("NG")
K = int(input())
A,B = map(int,input().split())
a = 0
while a < A:
    a += K
if a <= B:
    print("OK")
else:
    print("NG")
k = int(input())
score = list(map(int,input().split()))

answer = k - (score[0] % k)
if score[0]%k == 0:
    print('OK')
elif answer + score[0] <= score[1]:
    print('OK')
else:
    print('NG')
K =int(input())
A,B = input().split()

i = 1
flag = 0
while i <=1000:
    if int(A)<= K*i <= int(B):
        print("OK")
        flag = 1
        break
    
    i +=1
    

if flag != 1:
    print("NG")
K=int(input())
A,B=map(int,input().split())
flg=False
for i in range(A,B+1):
    if i%K==0:
        flg=True
        break
print('OK' if flg else 'NG')
k = int(input())
a,b = map(int,input().split())
flag = False


for x in range(a,b+1):
    if x % k == 0:
        flag = True
        break

if flag:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())
judge = False;
count = 1
num = K * count
while num <= B:
  if A <= num and num <= B:
    judge = True
    break
  count += 1
  num = K * count
if judge:
  print('OK')
else:
  print('NG')
k = int(input())
a, b = map(int, input().split())
flag = 0

for i in range(a, b+1):
    #print(i)
    if i % k == 0:
        flag = 1

if flag == 1:
    print("OK")
else:
    print("NG")
K=int(input())
A,B=[int(s) for s in input().split()]
i=A
while(i<=B):
  if i%K==0:
    print('OK')
    break
  i+=1
else:
  print('NG')
k = int(input())
a,b = map(int, input().split())
m = int(b/k)

for i in range(m):
  if a<=k*(i+1) and b>=k*(i+1):
    print('OK')
    exit()
  else:
    i += 1

print('NG')
K = int(input())
A,B = [int(v) for v in input().split()]
flag = False

for i in range(A,B+1):
    if i % K == 0:
        flag = True
        break
print("OK" if flag else "NG")
import sys

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

for i in range(a,b+1):
    if i % k == 0:
        print('OK')
        sys.exit()

print('NG')
def read_int():
    return int(input())

def read_int_map():
    return map(int,input().split(' '))

def read_int_list():
    return list(map(int,input().split(' ')))

def read_s_list_loop(n):
    return [input() for _ in range(n)]


K = read_int()
A,B = read_int_map()
for i in range(A,B+1):
    if i%K == 0:
        print('OK')
        exit(0)
print('NG')
k = input()
K = int(k)
t = input().split()
T =[int(s) for s in t]
a1 = T[0] // K
b1 = T[1] // K
a2 = T[0] % K
if a1 == b1 and a2 != 0:
    print('NG')
else:
    print('OK')
K = int(input())
A,B = map(int,input().split())
a = A//K
b= B//K
if A%K == 0 or B %K == 0:
  print('OK')
elif b-a > 0:
  print('OK')
else:
  print('NG')
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    K = input_number()
    A, B = input_number_list()
    a = -(-A // K)
    b = B // K
    isOK = A <= a*K <= b*K <= B
    print(['NG', 'OK'][isOK])


if __name__ == '__main__':
    main()
import sys
N=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%N==0:
    print("OK")
    sys.exit()
print("NG")
def main():
    K = int(input())
    A, B = map(int, input().split())

    for i in range(A, B+1):
        if i % K == 0:
            print('OK')
            return
    print('NG')


if __name__=="__main__":
    main()
k = int(input())
a, b = map(int,input().split())
i = a
ans = 0
while (i <= b):
  if(i%k == 0):
    ans = 1
  i = i + 1
if (ans == 0):
  print("NG")
else:
  print("OK")
k = int(input().strip())
a, b = map(int, input().split())
for i in range(a, b + 1):
    if i % k == 0:
        print('OK')
        exit()
print('NG')
K = int(input())
A, B = map(int, input().split())
result = False
if A % K == 0:
    result = True
if B % K == 0:
    result = True
if (A // K) != (B // K):
    result = True

if result:
    print("OK")
else:
    print("NG")
K = int(input())
A,B = map(int,input().split())
i=1
while i<=B:
  if K*i>=A and K*i<=B:
    print("OK")
    break
  else:
    i += 1
if i == B+1:
  print("NG")
K = int(input())
A, B = map(int, input().split())

count =0

for i in range (A, B+1):
	if i%K==0:
		count=1

if count == 1:
	print('OK')
else:
	print('NG')
import sys
k = input()
k  = int(k)
(a, b) = input().split()
a = int(a)
b = int(b)

for n in range(a, b + 1):
	if n % k == 0:
		print("OK")
		sys.exit()
print("NG")
K = int(input())
A, B = map(int, input().split())

if (A % K == 0) | (B % K == 0):
    print('OK')
elif (K - (A % K)) < (B - A):
    print('OK')
else:
    print('NG')
n = int(input())
a, b = map(int, input().split())
sucess = False
for i in range(a, b + 1):
    if i % n == 0:
        sucess = True
print(("NG", "OK")[sucess])
K=int(input())
A,B=map(int,input().split())
print("OK" if A<=B//K*K<=B else "NG")
N=int(input())
a,b=map(int,input().split())

count=0
for i in range(a,b+1):
  if i%N==0:
    count+=1
if count>=1:
  print("OK")
else:
  print("NG")
K = int(input())
A, B = map(int, input().split(' '))
result = False

for i in range(A, B+1):
    if i % K == 0:
        result = True
        break

if result:
    print('OK')
else:
    print('NG')
K = int(input())
A, B = map(int, input().split())

for i in range(A, B + 1):
    if i % K == 0:
        print("OK")
        exit(0)

print("NG")
K = int(input())
A, B = list(map(int, input().split()))

has_baisu = "NG"
for i in range(A, B+1):
    if i%K==0:
        has_baisu = "OK"
        
print(has_baisu)
K = int(input())
A, B = map(int, input().split())
 
ans = 'NO'
for i in range(A, B+1):
  print(i)
  if i % K == 0:
    ans = 'OK'
    break
    
print(ans)
k=int(input())
a,b=map(int,input().split())

for i in range(a,b+1):
    if i%k==0:
        print("NG")
        break
else:
    print("OK")
K=int(input())
A,B=map(int,input().split())
c=B-A
d=c-K
if d>-2:
  print('OK')
else:
  print('NG')
import sys
from pprint import pprint

K = int(sys.stdin.readline().strip())
A, B = map(int, sys.stdin.readline().strip().split())
if K == 1:
    print("OK")
else:
    if B - A >= K:
        print("OK")
    else:
        print("NG")
k = int(input())
a, b = map(int, input().split())
if b - a >= k or k == 1:
    print('OK')
else:
    print('NG')