peterverebics/CodeNet_Python_118 huggingface dataset:
K=int(input())
A,B=map(int,input().split())
i=0
ok=0
while i*K <= B:
    if A <= i*K <= B:
        print("OK")
        ok=1
    i=i+1
if ok!=1:
    print("NG")
K = int(input())
S = input().split()
A = int(S[0])
B = int(S[1])

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

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

#if k==1:
 #   print('Ok')      
#    sys.exit() 

wk = (a//k)
while wk*k <=b:
    print('Ok')  
    sys.exit()    
    wk+=1

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

a = int(A/K)
b = int(B/K)

if K == 1:
  print("Yes")
else:
  if a == b:
    print("NG")
  else:
    print("Yes")
K  = int(input())
A,B = map(int,input().split())

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

for i in range(B, C):
  if i % A == 0:
    flag = 0
    print("OK")
    break

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

min_num = A//K
max_num = B//K

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

print("NO")
import numpy as np
a = int(input())
b,c=map(int,input().split())
d = np.arange(7, 995, 7)
f = np.arange(b,c)
d_set=set(d)
f_set=set(f)
#dとfに共通するものを抽出
g_set=d_set&f_set 
#結果をlistに変換
g=list(g_set)
if len(g) == 0:
    print('NG')
else:
    print('OK')
K = int(input())
A,B = input().split()
if K == 1:
    print('OK')
else:
    for i in range(int(A),int(B)):
        if i%K==0 :
            print('OK')
            break
        elif i == int(B)-1:
            print('NG')
if __name__ == '__main__':
    k = input()
    k = int(k)
    ab = input()
    ab = ab.split()
    a = int(ab[0])
    b = int(ab[1])

    i = 1
    flag = False
    while k<b:
        k = k*i
        if a<=k and k<=b:
            flag = True
        i += 1
    if flag:
        print("OK")
    else:
        print("NG")
K = int(input())
A,B = map(int,input().split())

if B - A >= K:
    print("OK")
elif A == B and B == K:
    print("OK")
elif K == 1:
    print("OK")
else:
    print("NG")
from sys import setrecursionlimit, exit
setrecursionlimit(1000000000)

def main():
    k = int(input())
    a, b = map(int, input().split())
    if b - a + 1 >= k:
        print('OK')
    else:
        print('NG')

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

wk = (b//k)
if wk*k >=a:
    print('Ok')  
else:
    print('NG')
import math
#def getTotal(now_depo, now_year, goal):
#  if(now_depo >= goal):
#    return now_year
#  else:
#    return getTotal(math.floor(now_depo * 1.01), now_year + 1, goal)

goal = int(input())
depo = 100
#print(getTotal(depo, 0, goal))
now_year = 0
while (True):
  depo = math.floor(depo * 1.01)
  now_year += 1
  if(depo >= goal):
    print(now_year)
    break
k = int(input())
a,b = map(int, input().split())
c = b-a
for i in range(c, b+1):
    if i % k == 0:
      print('OK')
      break
    else:
      print("NG")
k = int(input())
a, b = map(int, input().split())

print('OK' if b - a >= k else 'NG')
k=int(input())
a,b=list(map(int,input().split()))
if b//k-a//k>=1:
  print("OK")
else:
  print("NG")
k = int(input())
a, b = [int(i) for i in input().split()]
ans = 'OK' if - a + b >= k else 'NG'
print(ans)
K = int(input())
A, B = [int(i) for i in input().split()]

if B - A >= K:
  print("Yes")
else:
  print("No")
K = int(input())
A,B = map(int,input().split())
a = A//K
b = B // K
c = b-a

if c==0:
  print("NG")
else:
  print("OK")
#Kの倍数を出したい、ただしB>= nK >= Aの範囲内とする
k = int(input())
a,b = map(int,input().split())

#if k == 1:
	#print("YES")
	
print("OK" if (b-a)//k > 0 or (b-a)/k == 0 and a%k == 0  else "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=2
        break
    else:
        K_temp+=K

if flag==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')
  else:
    print('NG')
K = int(input())
A,B = input().split()
A = int(A)
B = int(B)

if K > B:
    print("NG")

if A <= K and K <=B:
    print("OK")

if K < B-A+1:
    print("OK")
else:
    print("NG")
import math
K = int(input())
A,B = map(int,input().split())

if K == 1:
    print("OK")
    exit()

x = math.floor(A/K)
y = math.floor(B/K)

if y-x >= 0:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int,input().split())
n = 1
m = 1
for i in range(1100):
  if A <= K * i:
    n = i
for i in range(n, 1100):
  if B >= K * i:
    m = i - 1
if m - n >= 0:
  print("OK")
else:
  print("NG")
import sys
k=int(input())
a,b=map(int,input().split())
for i in range(a+1,b+1):
  if (i % k)==0:
    print("OK")
    sys.exit()
print("NG")
k = int(input())
a, b = map(int, input().split())

if k <= b:
  if a <= k:
    print("OK")
else:
  print("NG")
k = int(input())
a,b = list(map(int,input().split()))

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


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

if A % K == 0:
  print('OK')
elif B % K == 0:
  print('OK')
elif A <= K and K <= B:
  print('OK')
elif K * ((A % K) + 1) <= B:
  print('OK')
else:
  print('No')
K = int(input())

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

if (B-A) // K !=0:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int,input().split())
if k <= b-a+1:
  print('OK')
else:
  print('NG')
k = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if k % i == 0:
    print("OK")
  else:
    print("NG")
n = int(input())
b,c=map(int, input().split())
if   (c//n) - (b//n)>=1  :
    print('OK')
else    : 
    print('NG')
K = int(input())
A, B = [int(i) for i in input().split()]

if B // K - A // K >= 1:
  print("Yes")
else:
  print("No")
n = int(input())
a,b=map(int,input().split())

if a == b:
    if a % n == 0:
        print("OK")
    else:
        print("NG")
else:
    while a <= b:
        a += 1
        if a % n == 0:
            print('OK')
            break
        elif a == b:
            print("NG")
a = int(input())
b, c = map(int, input().split())

if (c-b)/a>=1:
    print("OK")
elif c-b==0 and c%a==0:
    print("OK")
else:
    print("NG")
inp = [input() for i in range(2)]
K = int(inp[0])
A,B = inp[1].split()
A,B = int(A),int(B)
c,bbb = 0,0
if 1<= A <= B <= 1000 and 1<= K <= 1000:
  for h in range(A,B,1):
    c = h % K
    if c == 0:
      bbb += 1
  if bbb > 0:
    print('OK')
  else:
    print('NG')
K = int(input())
A, B = map(int, input().split())

p = A % K
q = B % K

if A==B:
	if p==0:
		print("OK")
	else:
		print("NG")
  
else:
	if p+q >K:
		print("OK")
	else:
		print("NG")
k = int(input())
n = 0
a,b = map(int,input().split())
while True:
    n += k
    if n >= a and n >= b:
        print("OK")
        break
    if n > b:
        print("NG")
        break
k = int(input())
a,b = map(int,input().split())

if k <= b-a+1 or (a<=k and k<=b) or (b % k >= b-a+1):
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())
if k - 1 <= b - a:
    print("OK")
else:
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            break
    else:
        print("NO")
n = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if(n%i==0):
    print("OK")
    exit(0)
print("NG")
k=int(input())
a,b=map(int,input().split())

import math

if math.floor(b/k)-math.ceil(a/k)>=1:
  print('OK')
else:
  print('NG')
N = int(input())
A=list(map(int, input().split()))

if A[1]-A[0]+1>=N:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())

flag = False
for i in range(1000):
    if A <= i*K and i*K <= B:
        flag = True

if flag:
    print("Yes")
else:
    print("No")
K = int(input())
A, B = list(map(int, input().split()))

# A =< K =< Bの場合
if K >= A and K <= B:
    print('OK')
elif K < (B - A):
    print('OK')
elif (K * 2) >= A and (K * 2) <= B:
    print('OK')
elif K == 1:
    print('OK')
else:
    print('NG')
K = int(input())
a,b = map(int,input().split())
 
ka = a/K
kb = b/K
kaama = a%K
kbama = b%K
 
 
 
if kaama == 0 or kbama == 0:
  print("OK")
  
elif (kb-ka)>=1:
  print("OK")
  
else:
  print("NG")
# 整数の入力
K = int(input())
# スペース区切りの整数の入力
A, B = map(int, input().split())


#出力　#自力
if B/K-(A-1)/K >= 1:
  print("OK")
else:
  print("NG")
import sys

lines = sys.stdin.readlines()
K = int(lines[0])
X = lines[1].split(' ')
print(X)
A = X[0]
B = X[1]

n = int(int(A)/int(K))
m = int(int(B)/int(K))

if m-n >0:
    print('OK')
else:
    print('NG')
N = int(input())
A, B = map(int, input().split())

if B - A >= N - 1:
    print('OK')
else:
    print('NG')
K = int(input())
A, B = map(int, input().split())
print('OK' if B-A>=K-1 else 'NG')
k=int(input())
a,b =map(int,input().split())

adiv =a//k


if k*(adiv+1)<=b:
   print('OK')
elif b%k==0 : 
    print('OK')
else:
    print('NG')
k=int(input())
l=list(map(int, input().split(' ')))
a=l[0]
b=l[1]

if (b-a)+1>=k:
    print('OK')
else:
    maybe=(a//k)*k
    ans=False
    while maybe<b:
        if maybe>=a:
            ans=True
            break
        else:
            maybe+=k
    if ans:
        print('OK')
    else:
        print('NG')
import sys
# input
k = int(input())
a, b = map(int, input().split())
#print(f"k >>{k}, a >>{a}, b >>{b}")


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

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

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

if a <= b/k*k:
  print('OK')
else:
  print('NG')
k = int(input())
a, b = list(map(int, input().split()))
s = [i for i in range(a, b) if i % k == 0]
if len(s) == 0:
  print('NG')
else:
  print('YES')
K = int(input())
A, B = map(int, input().split())

a = int(A/K)
b = int(B/K)

if a == b:
  print("NG")
else:
  print("Yes")
K = int(input())
AB = input()
l = AB.split()
A = int(l[0])
B = int(l[1])
li = []
for i in range(A, B+1) : 
  if i % K == 0 :
    li.append(i)
  else :
    continue
if len(li) >=1 :
  print("YES")
else : 
  print("NO")
K = int(input())
A,B = map(int,input().split())

if B - A + 1 >= K:
    print("OK")
elif K >= A:
    print("OK")
else:
    print("NG")
k = int(input())
a, b = list(map(int, input().split()))
x = 0
f = False
while x < b:
    if a <= x <= b:
        f = True
        break
    else:
        x += k

print('OK') if f else print('NG')
K = int(input())

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

for x in range(A, B+1):
  if x % 7 == 0:
    print("OK")
  else: 
    print("NG")
def main():
    K = int(input())
    A, B = map(int, input().split())

    if B-A+1 >= K:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
k = int(input())
a, b = map(int,input().split())
c = b//k
ans=0

for i in range(c):
    i += 1
    ans = i*k
    if a<= ans <=b:
        print("OK")
        break
    else:
        ans = -1

if ans == -1:
    print("NG")
k = int(input())
a,b = map(int,input().split())
i = 1
c = 0
while k <= b:
    if a <= k*i<= b:
        print("OK")
        break
    elif k*i >b:
        c = 1
        break
    else:
        i += 1
if c == 1:
    print('NG')
K = int(input())
a,b = map(int,input().split())
c = 'NG'
for i in range(a,b+1):
  if i % K == 0:
    c = 'OK'
  break
print(c)
if __name__ == '__main__':
    k = input()
    k = int(k)
    ab = input()
    ab = ab.split()
    a = int(ab[0])
    b = int(ab[1])
    flag = False
    sum = k
    while k<b:
        if a<=k and k<=b:
            flag = True
        k += sum
    if flag:
        print("OK")
    else:
        print("NG")
K = int(input())
A, B = map(int, input().split())
s = A % B
if s + A > B:
  print('NG')
else:
  print('OK')
k = int(input())
a, b = map(int, input().split())
print('OK' if b - a + 1 >= k else 'NG')
k = int(input())
a,b = map(int,input().split())
if k < b-a+1:
  print("NG")
else:
  print("OK")
K=int(input())
[A,B]=list(map(int,input().split()))
flg=0
for n in range(A,B+1):
  if n%K==0:
    print("OK")
    flg==1
    break
if flg==0:print("NG")
K = int(input())
A, B = map(int,input().split())
C = A % K
if B - A >= K - 1:
  print('OK')
elif C + B - A >= K:
  print('OK')
else:
  print('NG')
import sys

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

if k==1:
    print('Ok')      
    sys.exit() 

wk = (a//k)+1
while wk <=b:
    if wk*k<=b:
        print('Ok')      
        sys.exit()   
    else:
        wk+=1
print('NG')
k = int(input())
a, b = map(int, input().split())
if k <= b - a or a % k  == 0 or b % k == 0:
  print('OK')
else:
  print('NG')
k = int(input())
l, m = map(int, input().split())

if (l-l%k == m):
    print("OK")
elif ((l/k+k)*k <= m):
    print("OK")
else:
    print("NG")
import random
import math
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("Yes")
no = lambda: print("No")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()
#---khan17---template
t = II()
a,b = MI()
boo = False
for i in range(a,b+1):
	if a%t == 0:
		boo = True
		break
print("OK" if boo else "NG")
K = int(input())
A, B = map(int, input().split())
for i in range(A+1,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(0)

print('NO')
import math as M
k = int(input())
a, b = map(int, input().split())

a_1 = M.floor(a % k)
b_1 =  M.floor(b % k)

if a % k == 0 :
    print('OK')
elif b_1 - a_1 > 1 :
    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')
str1 = int(input())
str2 = input().split()

num = int(str2[1] ) - int(str2[0])
if num == 0:
    num = 1

use = int(str2[1])

ok_count = 0

for i in range(num):
    if use % str1 == 0:
        ok_count = 1
    use = use - 1

if ok_count == 1 :
    print("OK")
else:
    print("NG")
k = int(input())
a, b = list(map(int, input().split()))

for i in range(a, b):
    if i % k == 0:
        print('OK')
        exit()
print('NG')
from inspect import k

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

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

if A % K == 0 or B//K != A//K:
    print("OK")
else:
    print("NO")
import sys
K = int(input())
A, B = map(int, input().split())

#print(K)
#print(A)
#print(B)

for num in range(A, B):
  print(num)
  if num % K == 0:
    print("OK")
    sys.exit()


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

a1 = a//k
b1 = b//k
if (b1>a1 and b1 != 0):
    print("OK")
elif (a == b and a%k == 0):
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())
 
l = 0
result = 'NG'
while l <= B:
  l+=K
  if l >= A:
    result = 'OK'
  
print(result)
k=int(input())
a,b = list(map(int,input().split()))
v1 = (a+k-1)//k
v2 = (b+k-1)//k
if(v1<=v2):
  print("OK")
else:
  print("NG")
import sys
input = sys.stdin.readline


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


K = readint()
A, B = readnums()

if B - A < K and A % K < B % K:
    print('NG')
else:
    print('OK')
K = int(input())
A, B = map(int, input().split())

result = 'OK'
if (A%K != 0)&(B%K != 0):
    A = A//K + 1
    B = B//K
    if B-A<=0:
        result = 'NG'
        
print(result)
k = int(input())
a, b = list(map(int, input().split()))

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

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

if int(B) - int(A) + 1 >= int(K):
  print('OK')
else:
  i = int(A)
  while i < int(B) + 1:
    if i % int(K) == 0:
      print('OK')
      break
    else:
      i = i+1
  print('NG')
k = int(input())
a,b = map(int, input().split())
if b-a >= (k - 1) or a%k > b%k:
    print('OK')
else:
    print('NG')
k=int(input())
a=list(map(int,input().split()))
b=k*(a[0]//k)+k
if b<=a[1]:
    print('OK')
else:
    print('NG')
K = int(input())
A,B = map(int,input().split())
result = "NG"
for i in range(A,B):
    if i %K ==0:
        result = "OK"
        break
print(result)
k = int(input())
a,b = map(int, input().split())

num = a//k + 1

if a%k == 0 or b%k ==0:
    print('OK')
elif b/k - a/k >= 1:
    print('OK')
else:
    print('NG')
k = int(input())
a,b = map(int,input().split())

if k%a - k%b >= 0:
    print("OK")
else:
    print("NG")
K = int(input())
A, B = (int(x) for x in input().split())
k = False
for i in range(A, B + 1):
    if i % 7 == 0:
        k = True

if k:
    print("OK")
else:
    print("NG")
k = int(input())
a,b = map(int, input().split())
s = 0
z = b - a

for i in range(0, z):
  
  if (a + i) % k == 0:
    s = 1
    

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

if check:
    print('OK')
else:
    print('NG')
def doable(multiples, A, B):
	return any([m in range(A, B) for m in multiples])

k = int(input())
A, B = input().split()
A, B = int(A), int(B)
multiples = [k * i for i in range(1, B)]
print('OK') if(doable(multiples, A, B)) else print('NG')
K=int(input())
A,B=map(int, input().split())  

if B-A+1>=K:
  print('OK')
else:
  print('NG')
# -*- coding: utf-8 -*-

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:
    print("OK")
else:
    print("NG")
k= int(input())
a,b =map(int,input().split())
if k==1:
    print("OK")
elif k >b-a:
    print("NG")
else:
    print("OK")
K=int(input())
AB=input().split()
A=int(AB[0])
B=int(AB[1])
for i in range(A,B+1):
    i=567
    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")
        break
    else:
        print("NG")
        break
K= int(input())
A, B = map(int, input().split())

if K==1:
    print('OK')
elif B/K-A/K>=1:
    print('OK')
elif B%K==0:
    print('OK')
elif A%K==0:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())
flag = 0

if b < k:
    flag = 0
elif b % k > 0:
  if (int(b / k) - 1) * k >= a:
    flag = 1
elif b % k == 0:
  flag = 1
  
if flag:
  print("OK")
else:
  print("NG")
n = int(input())
a,b = map(int,input().split())

aa=a/n
bb=b/n
nn=bb-aa

if nn > 1 or n==1:
    print('OK')
else:
    print('NG')
K = int(input())
A,B = map(int, input().split())
N = int(1000 / K) + 1

OK = False

a = int(A/K)
b = int(B/K)

if a < b or K == 1:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())

if k == 1:
    print('OK')
else:
    qa = a // k
    qb = b // k
    if qa < qb:
        print('OK')
    else:
        print('NG')
k = int(input())

data = input().split()
a = int(data[0])
b = int(data[1])
if b - a >= k-1:
    print("OK")
else:
    print("NO")
K = int(input())

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

b = B % K

x = A - b

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

if count != 0:
  print('Yes')
else:
  print('No')
k = int(input())
a,b=(int(x) for x in input().split())
x = a / k
y = b / k
z = int(y) - int(x)
sum = 0
for i in range(z):
    sum = sum + 1
if k == 1:
    print("OK")
elif sum == 0:
    print("NG")
else:
    print("OK")
n=int(input())
a,b=map(int,input().split())

if b-a+1>=n:
  print('OK')
else:
  print('NG')
K=int(input())
A,B=map(int,input().split())
if A%K==0 or B%K==0:
    print("OK")
else:
    print("NG")
k=int(input())
a,b=map(int,input().split())

if a%k==0 or b%k==0:
  print("OK")
elif (a-b)==0 and k==1:
  print("OK")
elif (a-b)>=k:
  print("OK")
else:
  print("NG")
k=int(input())
a,b=map(int,input().split())
a_=a%k
b_=b%k
if a_<b_:print("OK")
elif b-a>k:print("OK")
elif a_==0 or b_==0:print("OK")
else:print("NG")
a = int(input())
b, c = list(map(int, input().split()))
if int(c/a)>=int(b/a):
  print("OK")
else:
  print("NG")
k = int(input())
a,b = map(int, input().split())
c = b-a
for i in range(c, b+1):
    if i % k == 0:
      print('OK')
      exit()
print('NG')
a1 = int(input())
a2,a3 =(int(x) for x in input().split())
if int (a2//a1) ==int(a3//a1):
    print("NG")
else:
    print("OK")
n=int(input())
a,b=map(int,input().split())
xs=[0]
for i in range(a,b+1):
    if i%n==0:
        xs.append(i)
if a<=min(xs)<=b:
    print("OK")
else:
    print("NG")
k=int(input())
a,b=map(int,input().split())
d=0
v=0
for i in range(1001):
    d=k*i
    if d>=a and d<=b:
        v+=1

if v>=1:
    print("OK")
else:
    print("NO")
K = int(input())
A, B = map(int, input().split())

if B//K - A//K:
    print('OK')

elif A == B:
    if A%K:
        print('NG')
    else:
        print('OK')

else:
    print('NG')
k = int(input())
a, b = map(int, input().split())

if (a//k+1)*k < b:
    print('OK')
else:
    print('NG')
K = int(input())
A, B = map(int, input().split())
print('OK') if (B / K) - (A / K) >= 1 else print('NG')
# -*- coding: utf-8 -*-

K = int(input())
A, B = (int(x) for x in input().split())

a = A // K
b = B // K

if b-a >= 1:
    print("OK")
elif K==1:
    print("OK")
else:
    print("NG")
K = int(input())
AB = input()
ABB = AB.split(' ')
A = int(ABB[0])
B = int(ABB[1])

if B//K - A//K >=1:
	print('OK')
elif B == A:
	print('OK')
else:
	print('NG')
K = int(input())
A, B = list(map(int, input().split()))
if B - A >= K :
    print("OK")
else:
    print("NG")
k = int(input()) 
a, b = map(int,input().split())
low = a/k
high = b/k
if k == 1:
    print("OK")
elif high - low >= 1:
    print("OK")
else:
    print("NG")
k=int(input())
a,b=map(int,input().split())

for i in range(a,b):
    if i%k==0:
        print("OK")
        exit()
print("NG")
k = int(input())
a, b = map(int, input().split())
if a == b and a % k == 0:
    print("OK")
elif a != b and (a//k) != (b//k):
    print("OK")
else:
    print("NG")
k = int(input())

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

if b - a >= k-1:
  print("OK")
else:
  print("NG")
N = int(input())
A, B = list(map(int, input().split()))

vala = A//N
valb = B//N
if vala != valb:
    print('OK')
elif A == B:
    print('OK')
else:
    print('NG')
k = int(input())
l, u = map(int, input().split())

if k==1:
  print('OK')
  
else:
  tmp1 = (l-1)/k
  tmp2 = (u+1)/k
  print('OK' if tmp2-tmp1>=1 else '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('NO')
k = int(input())
a,b = map(int,input().split())
if a == b and a % k == 0:
    print("OK")
elif b// k - a // k > 0:
    print("OK")
else:
    print("NG")
k = int(input())
l = input().split()
A, B = int(l[0]), int(l[1])

i = 0
while i * k <= B:
  print(i*k)
  if A <= i*k <= B:
    print('OK')
    break
  i += 1
else:
  print('NG')
K = int(input())
A, B = map(int, input().split())

if A % K == 0:
  print("OK")
elif B - A >= K:
  print("OK")
else:
  print("NG")
k = int(input())
a, b = map(int, input().split())

for i in range(b):
    if a <= k * i <= b:
        print('OK')
        exit()
print('NG')