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

for i in range(a, b+1):
	print(i)
	if i % k == 0:
		print('OK')
		exit()
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 = map(int,input().split())
if a % k != 0 and b % k != 0 and a//k == b//k:
  print("No")
else:
  print("Yes")
k=input()
a,b=map(int,input().split())
result=0
while int(k)<b:
    if a<=int(k) and int(k)<=b:
        result=result+1

    k=k+k
if result>0:
    print('OK')
else :
    print('NG')
k = int(input())
a,b = map(int, input().split())

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

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

under = A//K
under = (under+1)*K
if(under<= B):
    print("OK")
else:
    print("NG")
k = int(input())

data = input().split()
a = int(data[0])
b = int(data[1])

largest = b //k * k
if largest >= a:
    print("OK")
else:
    print("NO")
tmp = input().split()
K = int(tmp[0])

tmp = input().split()
A = int(tmp[0])
B = int(tmp[1])

for i in range(B-A+1):
    T = A + i
    if T%K == 0:
        print('OK')
        break
    A = A + 1

if A > B:
    print('NG')
K=()
A=()
B=()

K=int(input(""))
A, B = map(int, input().split())
V=False
C=K
D=B+2

for i in range(0,D):
      K=C*i
      print(K)
      if K>=A and K<=B:
            V=True
            break
      else:
            V=False

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

n = int()
if a <= k * n <= b :
    print("OK")
else :
    print("NO")
k=int(input())
a,b=map(int,input().split())
c=abs(a-b)+1
flag=0
for i in range(c):
    if i%k==0:
        print("OK")
        flag=1
        exit
if flag==0:
    print("NG")
def main():
    K = int(input())
    A, B = list(map(int, input().split(' ')))
    
    
    
    for i in range(A, B):
        if i % K == 0:
            print('OK')
            return
            
    print('NG')
        
        
    
    
    
main()
K=int(input())
A,B=(int(x) for x in input().split())
if K-(A%K)<=B-A or K%A==0:print('OK')
else:print('NG')
p=int(input())
n, k = map(int, input().split())
k1=n//p
k2=k//p
if n==k:
  if k1==k2:
    print("OK")
else:
  if k1<k2:
    print("OK")
  else:
    print("NG")
a=int(input())
i=0
b=100
while b<a:
  b=int(b*1.01)
  i+=1
print(i)
k = int(input())
a, b = map(int,input().split())

if b//k - a//k > 0:
    print("OK")
else:
    print("NG")
k = int(input())
a , b = map(int,input().split())
if a//k != b//k:
  print('OK')
else:
  print('NG')
K = int(input())
A,B = map(int, input().split())
if K>(B-A):
	print('NG')
else:
	print('OK')
target = int(input())
range_d = [int(i) for i in input().split()]
min_d = range_d[0]
max_d = range_d[1]

flag = False
if max_d < target:
  print('NG')
else:
  for i in range(min_d,max_d+1):
    if i%target == 0:
      flag = True
      break
print('OK') if flag else print('NG')
k = int(input())
a, b = map(int, input().split())
if a < b:
    if b - a + 1 >= k:
        print('OK')
    else:
        print('NG')
else:
    if a % k == 0:
        print('OK')
    else:
        print('NG')
k=int(input())
a, b = map(int, input().split())

import math
if b >= math.ceil(a/k):
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())

a = A % K
b = B % K

if b <= a or B-A >= K or a == 0 or b == 0:
  print('OK')
  
else:
  print('NG')
K=int(input())
A,B =input().split()

if (((int(A)//K)+1) <= (int(B)//K)):
    print("OK")
elif(K==1):
    print("OK")
elif(int(A)//K==0):
    print("OK")
else:
    print("NG")
K = int(input())
A,B = map(int,input().split())

if B-A+1>=K:
    print("OK")
else:
    print("NG")
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 == 1:
  print("OK")
  quit()

if (A // K) == (B // K):
  print("NG")
else:
  print("OK")
k = int(input())

a,b = map(int,input().split())
count = "NG"
if a == b:
    if a % k == 0:
        count = "OK"
for i in range(a,b):
    print(i)
    if i % k == 0:
        count = "OK"
        break
print(count)
k = int(input())
a, b = map(int, input().split())

a_div_k = a // k
b_div_k = b // k

if k == 1:
    print("OK")
elif k == b:
    print("OK")
elif a_div_k == b_div_k:
    print("NG")
else:
    print("OK")
K = int(input())
A , B = (map(int , input().split()))
kk = K
while True:
    if kk >= A and kk <= 600:
        ans = 'OK'
        break
    elif  kk > 600:
        ans = 'NG'
        break
    else:
        kk = kk+K
print(ans)
k = int(input())
a,b = map(int,input().split())

for i in range(b):
    if (a <= i*k):
        if(i*k <=b):
            print('OK')
            break
        else:
            print('NG')
            break
    else:
        i += 1
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("NO")
k = input()
a, b = input().split()

if int(b) >= int(k) or int(a) == int(k):
    if int(k) == 1:
        print ("OK")
    elif int(a) == int(b):
        if int(a)%int(k) == 0:
            print ("OK")
        else:
            print("NG")

    elif int(b)-int(a) == 1 and int(a) != int(k) and int(k)%2 != 0:
        print("NG")
    else:
        print("OK")
else:
    print("NG")
k = int(input())
a, b = map(int, input().split())
if a == b and a%k == 0:
    print("OK")
    exit()
a //= k
b //= k
if b > a:
    print("OK")
else:
    print("NG")
#!/usr/bin/env python


def main():

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

    for i in range(a, b):
        if i % k == 0:
            return print('OK')

    return print('NG')


if __name__ == '__main__':
    main()
K=int(input())
A,B=list(map(int,input().split()))
n=int(A/K)
m=int(B/K)
if K==1:
  print("OK")
elif A/K-n==0.0 or B/K-m==0.0:
  print("OK")
elif n-m>=1:
  print("OK")
else:
  print("NG")
import sys
K = int(input())
if K == 1:
  print("OK")
  sys.exit()
A, B = map(int, input().split(" "))
ret = int(B / K - A / K)
if ret > 0:
  print("OK")
else:
  print("NG")
k=int(input())
a,b=map(int,input().split())
if (b-a+1)<k:
   print("NG")
else:
   print("OK")
k = int(input())
a,b = map(int,input().split())
count = ''
for c in  range(a,b) :
    if c % k == 0 :
        count = 'OK'
        break
    else :
        count = 'NG'
if (b - a)==0 and k == 1 :
    count = 'OK'        
print(count)
n = int(input())
a,b = map(int, input().split())
ans = "NG"
if a==b:
    ans = "OK"
if (b-a)//n>=1:
    ans = "OK"
print(ans)
a=int(input())

b=input()
b=b.split()

A=int(b[0])
B=int(b[1])

c=1

b_list=list(range(A,B,1))

for x in b_list:
  if x%a==0:
    c=c+1
if a==1:
  print("OK")
elif c==1:
  print("NG")
else:
  print("OK")
# A
K = int(input())
A, B = map(int,input().split())

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

for num in range(1,1000):
  if A <= K*num <= B:
    print('OK')
    break

print('NG')
x = int(input())
money = 100
n = 0
while True:
    n = n + 1
    money = int(money * 1.01)
    if money >= x:
        print(n)
        break
k = int(input())
a, b = map(int,input().split())
ka = []
jl = []


for j in range(b):
  j+=1
  jl.append(j)
  

for i in range(b):
  i+=1
  ks = k * i 
  ka.append(ks)

  
if jl in ka:
  print("OK")
elif jl not in ka:
  print("OK")
k = int(input())
a, b = map(int, input().split())

if b - a >= k-1:
  print("OK")
elif  k == 1:
  print("OK")
elif b == k or a == k:
  print("OK")
elif b % k == 0 or a % k == 0:
  print("OK")
elif b < k < a:
  print("OK")
elif a != b and k == 2:
  print("OK")
elif b % k + a % k <= k:
  print("OK")
else:
  print("NG")
a=int(input())
x,y = map(int,input().split())
count = 0
if x == y:
    if x % a == 0:
        count += 1
for i in range(x, y):
    if i % a == 0:
        count += 1

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

if B-A >= K or K == 1:
  print("OK")
else:
  print("NG")
import sys

K = int(input())
A,B = map(int, sys.stdin.readline().strip().split())

if K == 1:
     print('OK')
     sys.exit()

if A == B and (A % K == 0):
     print('OK')
     sys.exit()
else:
     print('NG')
     sys.exit()

if (A // K) < (B // K):
     print('OK')
else:
     print('NG')
N = int(input())
A = list(map(int, input().split())) 
sum = 0

for i in range(A[0],A[1]):
    if i % N ==0:
        sum +=1
if A[0] == A[1]:
    if A[0] % N ==0:
        print("OK")
    else:
        print("NG")
else:
    if sum == 0:
        print("NG")
    else:
        print("OK")
# -*- coding: utf-8 -*-
K = int(input())
A, B = map(int, input().split())

print("OK" if A // K != B // K or K == 1 else "NG")
K = int(input())
A,B = map(int,input().split())
c = 0
if A == B:
  if B % K == 0:
    c += 1
else:
  for x in range(A,B):
    if (x+1) % K == 0:
      c += 1
      break

if c == 1:
  print("OK")
else:
  print("NG")
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("Yes")
      return 0
  print("No") 
  return 0

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

a = (B//K) - (A//K)

if A%K == 0:
    print("OK")

elif B%K == 0:
    print("OK")

else:
    if A==B:
        if A%K == 0:
            print("OK")

        else:
            print("NG")
    if a==0:
        print("NG")
        
    else:
        print("OK")
K=int(input())
A,B=map(int, input().split())  
import math
x=math.ceil(A/K) 
y=math.ceil(B/K)

if K==1:
  print('OK')
elif y-x>1:
  print('OK')
else:
  print('NG')
k=int(input())

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

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


if all(N%K!=0 for N in range(A, B)):
  print("NG")
    
else:
  print("OK")
K = int(input())
A,B = map(int,input().split())

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

i = a // k
j = b // k

res = j - i

if res == 0 and a == b:
  print('OK')
elif res == 0 and a != b:
  print('NG')
else:
  print('OK')
K = int(input())
A, B = map(int, input().split())

a = 0

for i in range(A, B+1):
  if i%K == 0:
    a+=1
  else:
    pass
if a != 0:
  print("Yes")
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 and N == 1:
    print('OK')
else:
    print('NG')
k=int(input())
a,b=map(int,input().split())
if b-a==0:
	print('NG')
if b-a>=k:
	print('OK')
else:
	if a%k+b-a>=k:
		print('OK')
	else:
		print('NG')
k=int(input())
a,b=map(int,input().split())
print('OK' if b-a>=k or b%k==0 or a%k==0 else 'NG')
N = int(input())
a,b=map(int,input().split())

print("OK" if b-a+1 >= N else "NG")
import sys
input = sys.stdin.readline


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

c = b//k

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

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

if tmp == 0:
    print("NG")
k=int(input())
a,b=map(int,input().split())

if k==1:
    print("OK")
elif a>k and (b-a)<k:
    print("NG")
else:
    print("OK")
K = input()
li = input().split()
A = int(li[0])
B = int(li[1])

if B - A + 1 >= int(K):
  print('OK')
else:
  i = A
  while i < 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())

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

q = A//K

if K*(q+1) <= B or K==1:
  print("OK")
else:
  print("NG")
k=int(input())
a,b=map(int, input().split())
t=b-a
if k<=t:
  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')
  else:
    print('NG')
k=int(input())
a,b=map(int,input().split())
if k!=1:
	x=a//k
	y=b//k
	if x!=y:
		print("OK",end="")
	elif x==y and a!=b and a%k!=0 and b%k!=0:
		print("NG",end="")
	else:
		print("OK",end="")
else:
	print("OK",end="")
K = int(input())
A, B = list(map(int, input().split()))

if A%K==0 or B%K == 0:
    print("OK")
else:
    if B-A >= K:
        print("OK")
    else:
        print("NG")
Z=int(input())
A,B=map(int,input().split())
if Z==1:
  print('OK')
elif B-A-Z>=2:
  print('OK')
else:
  print('NG')
K=int(input())
A,B=map(int,input().split())

m=A//K*K

if m<A:
  m+=K
if m>=A and m<=B:
  print("OK")
else:
  print("NO")
K=int(input())
A,B = map(int, input("").split())
for i in range(A,B):
    if i%K==0:
        print("OK")
        break
    else:sum=1
if sum==1:
    print("NG")
from sys import stdin

def main():

    input = stdin.readline

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

    
    for i in range(1,1001):
        if A <= i * K & B >= i * K:
            print("OK")
            return 0
    else:
        print("NG")

    
if __name__ == "__main__":
    main()
import math

k = int(input())
a, b = (int(x) for x in input().split())
outa = math.floor(a / k)
outb = math.floor(b / k)
if outa == outb and a != b and outa != a / k:
    print("NG")
else:
    print("OK")
K = input()
A,B = input().split()
if A == B:
    ans = int(A)
    if ans % int(K) == 0:
        print('OK')
        exit()
    print('NG')
    exit()
for i in range(int(A), int(B)):
    if i % int(K) == 0:
        print('OK')
        exit()
    
print('NG')
k=int(input())

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

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


if len(set(range(0,1000,k)) & set(range(a,b+1))) >= 1:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())
c = b - a
d = a % k
e = b % k
if(c >= k or (d == 0) or (e == 0)):
  print("OK")
else:
  print("NG")
K = int(input())
A,B = map(int, input().split())
 
if A%K == 0 or B%K == 0 or (B-A)/K >= 1:
  print('OK')
else:
  print('NG')
k = int(input())
a,b = map(int,input().split())
if a//k != b//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*k <=b:
    if wk*k<=b:
        print('Ok')      
        sys.exit()   
    else:
        wk+=1
print('NG')
K = int(input())
A,B = map(int, input().split())

if B-A >= K:
	print("OK")
elif B-A < K and B/K - A/K >= 1:
	print("OK")
else:
	print("NG")
K = int(input())
A, B = map(int, input().split())

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

if (A % K == 0 or B % K == 0 or B - A) >= (K-1):
    print("OK")

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

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

print(
    "OK" 
    if K in (A, B) 
        or B - A >= K 
        or (A == B and A % K == 0)
    else "NG"
)
s   = ['MG', 'OK']
k   = int(input())
a,b = map(int,input().split())
f   = 0
t   = a

if (a // k >= 1 and a % k == 0) or (b // k >= 1 and b % k == 0):
    f = 1
else:
    while t < b:
        if not (t // k >= 1 and t % k == 0):
            t += 1
        else:
            f = 1
            break
print(s[f])
K = int(input())
A, B = map(int,input().split())

if A%K == 0 or B%K == 0:
    print("OK")
elif abs(A/K - B/K) >= 1: 
    print("OK")
else:
    print("NG")
n = int(input())
A, B = map(int, input().split())

n_1 = int(A / n)
n_2 = int(B / n)
nn_1 = A%n
nn_2 = B%n

print(n_1,n_2)
if n == 1: print('OK')
else:
    if nn_1 ==0 or nn_2 == 0:print('OK')
    elif n_2 != n_1: print('OK')
    else: print('NG')
k=input()
i=int(k)
k=int(k)
a,b=map(int,input().split())
result=0
while k<=b:
    if a<=k and k<=b:
        result=result+1
        k=k+k
    else:
        k=i+k
    print(k)
if result>0:
    print('OK')
else :
    print('NG')
K = int(input())
A, B = map(int, input().split())

a, mod_a = divmod(A, K)
b, mod_b = divmod(B, K)

if mod_a == 0 or mod_b == 0:
    print('OK')
    exit()

if mod_a == mod_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('Yes')
        break
else:
    print('No')
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")
a = int(input())
b, c= map(int, input().split())
ans = 'NG'
for i in range(b, c+1):
    if i%a == 0:
        ans = 'yes'
        break
print(ans)
k = int(input())
a,b = map(int,input().split())
m = a%k
h = m + b-a +1
if(h>=k):
  print("OK")
else:
  print("NG")
target = int(input())
potential = input().split(" ")
min = int(potential[0])
max = int(potential[1])

can = []
for i in range(min,max+1):
  result = str(i/target)
  if not "." in result:
    can.append(i)
if len(can) != 0:
  print("OK")
else:
  print("NG")
K = int(input())
A, B = map(int, input().split())

if A//K < B//K:
  print("OK")
elif A//K == B//K and A%K <= A%K:
  print("OK")
else:
  print("NG")
a = int(input())

low, hi = map(int, input().split())

start = a * low//a

boolean = False

while not (start > hi):
  if low <= start <= hi: 
    boolean = True
    break
  start *= a

if boolean: 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:
        print("OK")
        count+=1
        break
if count==0:
    print("No")
k = int(input())
a,b = map(int,input().split())
for i in range(a-1,b+1):
  if i % k == 0:
    ans = 'OK'
    break
  else:
    ans = 'NG'
print(ans)
n = int(input())
t,a = map(int,input().split())
i=0
j=0
if (t == a):
    if (t%n == 0):
        print("OK")
        j=j+1
    else:
        i=i+1
for x in range(t,a):
    if (x%n == 0):
        print("OK")
        j=j+1
        break
    else:
        i = i+1
if(i>=1 and j==0):
    print("NG")
K = int(input())
in1 = input().split(" ")
A = int(in1[0])
B = int(in1[1])
if B-A>=K-1:
    print("OK")
else:
    print("NG")
K = list(map(int,input().split()))[0]
A,B = list(map(int,input().split()))


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


print(is_ok(K, A, B))
k = int(input())
a, b = map(int, input().split())
print('OK' if a <= b // k * b else 'NG')
k = int(input())
a, b = map(int,input().split())

if k==1:
    print("OK")
elif b - a >= k:
    print("OK")
else:
    print("NG")
# Kの入力
K = int(input())
# A Bの入力
A, B = map(int, input().split())

if(B - A >= K or (B == A and K == 1)):
  print("OK")
else:
  print("NG")
X = input()
a, b = input().split()

c = int(a) / int(X)
d = int(b) / int(X)

if X=="1" or int(c) != int(d) or int(a)==X or int(b)==X:
  print("OK")
else:
  print("NG")
K = int(input())

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

if A // K <= B // K and B % K == 0:
    print("OK")
else:
    print("NG")
ｋ=int(input())
a,b=map(int,input().split())
if b-a>a%k:
    print('OK')
else:
    print('NG')
k=int(input())
a,b=map(int,input().split())
if a%k==0:
    print("OK")
elif k*(a//k+1)<=b:
    print("OK")
else:
    print("NO")
k = int(input())
l, u = map(int, input().split())

if (l%k==0) or (u%k==0):
  print("OK")
else:
  tmp1 = l / k
  tmp2 = u/k
  print('OK' if tmp2-tmp1>=1 else 'NG')
K=int(input())
A, B=map(int, input().split())

k = (B - A) / K 

if K == 1:
	print("OK")
elif k >= 1:
	print("OK")
else:
	print("NG")
k=int(input())
a,b=map(int,input().split())
if b < k:
  print("NG")
elif a+k <= b+1:
  print("OK")
elif a <= k <= b:
  print("OK")
else:
  print("NG")
K = int(input())
A, B = map(int, input().split())
print("OK" if len([1] if A == B and not A % K else [q for q in range(A, B) if q % K == 0]) else "NG")
K = int(input())
A, B = map(int, input().split())

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

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

if A % n == 0 or B % n == 0:
    print("OK")
elif (B - A) // n > 0:
    print("OK")
else:
    print("NG")
X = int(input())
count = 0
money = 100

while True:
  money = int(money * 1.01)
  count += 1
  if money >= X:
    print(count)
    break
K = int(input())	
A,B = map(int,input().split())

res_A = A // K
res_B = B // K

if (2 <= abs(res_A - res_B) ):
    print("OK")
elif(A % K ==0 or B % K ==0 ):
    print("OK")
else:
    print("NG")
K = int(input())
A,B = map(int,input().split())

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

if a//k == a//k:
    if a%k == 0:
        print("OK")
    else:
        print("NG")
else:
    print("OK")
N = int(input())
a, b = map(int, input().split())
c = b-a
if c>=N-1 or N == 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:
  print('OK')
  break
 else:
   print('NG')
k = int(input())
a, b = [int(i) for i in input().split()]

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

if count >= 0:
    print('OK')
else:
    print('NG')
import math

def resolve():
    K = int(input())
    A, B= map(int, input().split()) 

    if A <= B/K * K:
        print("OK")
    else:
        print("NG")


if __name__ == "__main__":
    resolve()
k=int(input())
lit=str(input()).split(" ")
a=int(lit[0])
b=int(lit[1])

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

if a // k == b // k:
    print("NG")
else:
    print("OK")
K = int(input())
A, B = map(int, input().split())
s = A // B
if s + A > B:
  print('NG')
else:
  print('OK')
X = int(input())
A,B = map(int, input().split())
F = 0

for i in range(A, B, 1):
  if i % X == 0:
    print("OK")
    F =+ 1
    break
if F == 0:
    print("NG")
K = input()
NUM = list(map(int,input().split()))
count = 0
for num in range(NUM[1]-NUM[0]+1):
  if (NUM[1]+num % 7 == 0):
    print("OK")
    count = 1
    break

if (count == 0):
  print("NG")
K = int(input())
A, B = map(int, input().split())
if A//K != B//K:
  print('OK')
else:
  print('NG')
K = int(input())
A, B = map(int, input().split())

if (A // K != B // K):
	print('OK')
else:
	print('NG')
K=int(input())
a,b=map(int,input().split())
print("OK" if b-a+1/K>=1 else "NG")
#! python3
def main():
    k = int(input())
    a, b = map(int, input().split())
    ans = [i for i in range(a, b+1) if i%k == 0]
    if len(ans) == 0:
        print('NG')
    else:
        print('YES')

main()
k=int(input())
a,b=map(int,input().split())
if a==b:
    print("OK")

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

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

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

    if i >= k and i % a == 0:
        flg = "OK"
        break

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

for i in range(1,B//K+1):
  if A<=i*K and i*K<=B:
    ans="YES"
    break

print(ans)