peterverebics/CodeNet_Python_118 huggingface dataset:
def Sol(n,a,b):
    
    if n == 1:
        print("OK")
        return
    m = a%n
    if (a+n-m) <= b:
        print("OK")
    else:
        print("NG")
    
    return

    
n = int(input())

#for t in range(int(input())):
a,b = map(int,input().split())
#    arr = []
#    for i in range(c):
#        arr.append(list(map(int,input().split())))
#arr = list(map(int,input().split()))
#k = input()
#n = int(input())
Sol(n,a,b)
k = int(input())
n = list(map(int,input().split()))
a = n[0]
b = n[1]

for i in range(a,b+1):
    if i % k == 0:
        print("OK")
        break
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

k = int(readline())
a, b = map(int, readline().split())
for i in range(a, b + 1):
    if i % a == 0:
        print('OK')
        exit()
print('NG')
K = int(input())
a,b = map(int,input().split())
for n in range(a,b):
  if n%K == 0:
    print("OK")
  else:
    print("NG")
K = int(input("multiple of: "))
A, B = map(int, input().split())
word = "NG"
for i in range(1, 1000):
    M = K * i
    if M in range(A, B+1):
        word = "OK"
        break
    else: 
        continue
print(word)
K = int(input())
A, B = map(int, input().split())
if B == 0:
    print('NG')

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

elif B//K == A//K:
    print('NG')

else:
    print('OK')
K=int(input())
A,B=map(int,input().split())
L=int((B/K)*K)
if A<=L:
    print("ok")
else:
    print("no")
from sys import stdin

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

if ((B-A) < K) and (A%K > (K + (B-A))) or (B%K < (K - (B-A))):
  print("NG")

else:
  print("OK")
k = int(input())
arr = input().split(" ")
m, n = int(arr[0]), int(arr[1])
if n//k>=2 and n-k>=m:
  print('OK')
else:
  print('NG')
K=int(input())
A,B=map(int,input().split())
i=0
for i in range(B-A):
    if (i+A)%K==0:
        print('OK')
        break
if i ==B-A:
    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 <= B%K:
  print("OK")
else:
  print("NG")
K = int(input())
a, b = map(int, input().split())
c = b-a
if c+1>=K or (K>=a and K<=b):
    print("OK")
else:
    print("NG")
K = int(input())
score = input().split()
if int(int(score[0])/K) < int(int(score[1])/K):
	print('OK')
else:
	if int(score[0]) % K == int(score[1]) % K:
		print('OK')
	else:
		print('NG')
k=float(input())

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

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

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

a = A//K
# b = B//K
C = K * (a+1)

# if K > B:
    # print ("NG")


if C <= B:
    print ("OK")
else:
    print ("NG")
# 165 A

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

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

if k == 1:
    print('OK')
if k > b:
    print('NG')

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

print('NG')
X = int(input())
Y, Z = map(int, input().split())
a = Y%X
if a != 0 and Z >= Y-a+X:
    print('OK')
elif a == 0:
    print('OK')
else:
    print('No')
k=int(input())

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

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

ans = 'NO'

if a % k == 0 and b % k == 0:
  ans = 'OK'
if a // k != b // k:
  ans = 'OK'

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

if((b-a >= k and b >= k) or k == 1 or (a >= k and a % k ==0) or (b >= k and b%k==0) ):
    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('NO')
import math
K = int(input())
A, B = map(int, input().split())

if math.ceil(A/K)*4 <= B:
  print("OK")
else:
  print("NG")
k = int(input())
a,b = (map(int,input().split()))
new_list = []
for i in range(1,1000):
    if  a < k*i < b:
        new_list.append('Yes')
    else:
        new_list.append('No')
if len(set(new_list)) == 1:
    print('NG')
else:
    print('Ok')
K=int(input())
A,B=map(int,input().split())
print("OK" if B-A <= B%K else "NG")
k=int(input())
a,b=map(int,input().split())
c=b-a
if(c>k-1):
    print("OK")
elif(a%k+c>=k):
    print("OK")
else:
    print("NG")
K = int(input())
A, B = map(int, input().split())
if abs(A-B) >= K:
  print("OK")
else:
  print("NG")
K = int(input())
A,B = map(int, input().split())

under = A%K
under = under*(K+1)
if(under<= B):
    print("OK")
else:
    print("NG")
def main():
  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('OK')
  else:
      print('NO')

main()
K = int(input())

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

if (A % K == 0) or (B % K == 0):
  print("OK")
  
elif (B - A + 1) >= K:
  print("OK")
  
else:
  print("NG")
K=input()
A,B=input().split()
B=int(B)
A=int(A)
K=int(K)
t=B//K
s=A//K
if t>s:
  print('OK')
else:
  print('NG')
import math

a=int(input())
li = list(map(int,input().split()))
if li[1]<=math.ceil(li[0]/a)*a:
    print("NG")
else:
    print("OK")
from sys import stdin

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

if (K>B):
    print("NG")
if (A%K==0 or B%K==0):
    print("OK")
elif(B-(B%K)>=A) :
    print("OK")
else:
    print("NG")
k = int(input())
a, b = map(int, input().split())
if a < b:
    if b - a + 2 >= 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())
print('NOGK'[b//k>a//k::2])
K=int(input())
A,B=map(int,input().split())
print('OK' if A%K==B%K==0 or A//K-B//K!=0 else 'NG')
k = int(input())
a, b = map(int, input().split())

if b - a >= k:
  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")
else:
  print("NG")
k = int(input())
a, b = map(int, input().split())
if b - a >= k-1:
    print('OK')
else:
    print('NG')
k = int(input())
a, b = map(int, input().split())

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

if count > 0:
  print('OK')
else:
  print('NG')
k= int(input())
a,b = [int(x) for x in input().split()]


if (a // k != b // k) or k==1:
    print('OK')
else:
    print('NG')
k = int(input())
import math
a,b = map(int,input().split())

k = math.ceil(a//k)*k
print("OK" if a<=k and k<=b else "NG")
K=int(input())
A,B=list(map(int,input().split()))

a=A/K
b=B/K
if 1<=a-b or a-b<=-1 or a-b==0:
    print('OK')
else:
    print('NG')
import math

X = int(input())
year = 0
amount = 100
while True:
  if amount >= X:
    break
  amount = math.floor(amount * 1.01)
  year += 1
print(year)
K=int(input())
A, B=map(int, input().split())

if K==1:
    print('OK')
elif (B-A) > K:
    print('OK')
elif (B-A) + (A%K) >=K:
    print('OK')
else:
    print('NG')
import sys

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


K = a[0]
B = x[1]
A = x[0]

for i in range(A-1,B):
    if i%K == 0:
        print("OK")
        sys.exit()
print("NG")
import numpy as np
import fractions
 
K = int(input())
A,B = [int(i) for i in (input()).split(" ")]
 
if((B//K-A//K)>0 and K<=B):
  print("OK")
else:
  print("NG")
k = int(input())
a,b = list(map(int, input().split()))

res = "OK" if (a!=b and a//k < b//k) or (k==1) else "NG"
print(res)
k=int(input());
a,b=map(int,input().split())
print("OK" if ((b-a+a%k)>=k or (b-a+a%k)==0) and k<=b  else "NG")
k = int(input())
a, b = map(int, input().split())

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

if k==1 or (a%k==0 and b%k==0) or (a//k < b//k):
    print('OK')    
else:
    print('NG')
K = input()
A,B = input().split()
if A == B:
    ans = int(A)
    if ans % int(K) == 0:
        print('OK')
        exit()
    print('NG')

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

if k<=b-a+1:
  print("OK")
else:
  print("NG")
a = int(input())
b,c = map(int, input().split())
if b%a==0:
  print('OK')
elif c%a==0:
  print("OK")
elif b==c:
  print("OK")
else:
  if c-b>=a-1:
    print("OK")
  else:
    print("NG")
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")
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())
a_=a%k
b_=b%k
if a_<b_:print("OK")
elif b-a>k: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 = 'ok'
        break
print(ans)
K=int(input())
A,B=map(int,input().split())
for i in range(B-A):
    if (i+1)%K==0:
        print('OK')
        exit()
print('NG')
K = int(input())
A, B = map(int, input().split())
print('OK' if B-A >= K else 'NG')
n=int(input())
a,b=map(int,input().split())
c=a/n
d=b/n
if abs(c-d)>=1:
  print('OK')
else :
  print('NG')
num = int(input())
a,b = map(int, input().split())
if (a//num+1)*num <= b:
  print('OK')
elif num==1:
  print('OK')
else:
  print('NG')
import sys
K=int(input())

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

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

print("No")
K = int(input())
A , B = [int(x) for x in input().split()]

if A >= K:
    tmp = A // K
    if A % K == 0 or B <= ( tmp + 1 ) * K:
        print('OK')
    else:
        print('NG')
else:
    if B // K > 0:
        print('OK')
    else:
        print('NG')
import sys
K = int(input())
A,B = map(int, input().split())
if A == B:
    if A%K ==0:
        print('OK')
        sys.exit()
    else:
        print('NG')
        sys.exit()
      
cnt = A//K
if (cnt+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('Yes')
print('No')
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, b = map(int, input().split())

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

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

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

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

print("NG")
# -*- coding: utf-8 -*-

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

     ans = k
     while(True):
          # print(ans)
          if ans >= a and ans <= b:
               print('Yes')
               break
          elif ans > b:
               print('No')
               break
          else:
               ans = ans + k

if __name__ == "__main__":
    main()
K = int(input())
A,B= map(int,input().split())
if (B - A)/ K >= 1:
    print('OK')
if A == B and A%K ==0:
    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")
        break
K = int(input())
A,B=map(int,input().split())


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

print('OK' if (a // k >= 1) and (b // k >= 1) else 'NG')
if __name__ == '__main__':
  K = int(input())
  AB = input().split()
  A, B = int(AB[0]), int(AB[1])
  
  if (B - A) >= K:
    print("OK")
  else:
    print("NG")
K = int(input())
A, B = (int(x) for x in input().split())
if A == B:
  if A%K == 0:
    print("OK")
  else:
    print("NG")
else:
  for i in range(A, B):
    if i%K == 0:
      print("OK")
      quit()
  print("NG")
k = int(input())
a, b = map(int, input().split())

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

a_mod_k = a % k
b_mod_k = b % k

if b < k:
    print("NG")
elif k == 1:
    print("OK")
elif k == b:
    print("OK")
elif (a_mod_k == 0) and (b_mod_k == 0) and (a_div_k == b_div_k):
    print("OK")
elif (k < a) and (a_div_k == b_div_k):
    print("NG")
else:
    print("OK")
K = int(input())
A,B = map(int,input().split())
a = A// K
b = B // K
if a != b:
    print('OK')
else:
    print('NG')
from collections import defaultdict

import sys
sys.setrecursionlimit(10**6)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    k=ii()
    a,b=mis()
    x=b//k-a//k
    print('OK' if x>0 else 'NG')

if __name__ == "__main__":
    main()
K = input()
A,B = input().split()

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

x = a // k
z = b // k

for i in range(z-x + 1):
  if a <= k*(x+i) and k*i <= b:
        print("OK")
        exit()
  print("NO")
K = int(input())
a, b = map(int, input().split())

for num in range(a, b):
  if num % K == 0:
    print('OK')
    break
else:
  print('NO')
# coding: utf-8
# Your code here!
K = int (input())
line= list(map(int,input().split()))
a,b = line[0],line[1]
if b>K:
    print("NG")
elif (b-a+1)>=K:
    print("OK")

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

ans = "NG"

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

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


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

f = 0
for i in range(b-a+1):
    if ((i+1)%K ==0):
        f = 1

if f:
    print("OK")
else:
    print("NG")
K = int (input ())
A,B = map (int, input ().split ())
X = 'No'
while A <= B:
  if A%K == 0:
    X = 'Yes'
    break
  A += 1
print (X)
k = int(input())
a,b = map(int,input().split())
print('OK' if (a==b and a%k==0) or (b-a)/k >= 1 else 'NG')
K=int(input())
A,B=list(map(int, input().split()))
ans='No'
for i in range (A,B+1):
    if i%K:
        ans='OK'
        break
print(ans)
k = int(input())
a, b = map(int, input().split())

if b - a + 2 >= k:
    print("OK")
else:
    print("NG")
K=int(input())
A,B=map(int,input().split())
result=0
for i in range(1000):
  tmp=K*i
  if A<=K<=B:
    result=1
    break
  if K>B:
    break
if result==1:
  print("OK")
else:
  print("NG")
k = int(input())
a, b = map(int, input().split())

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

c = K//B
if c * K >= A:
  print('OK')
else:    
  print('NG')
K = int(input())
A, B = (int(x) for x in input().split())
if (B-A)//K >=1 or (B-A)%K == 0:
  print("OK")
else:
  print("NG")
K=int(input())
A, B = map(int, input().split())
for i in range(1000):
    if i*K>=A and i*K<=B:
        print('OK')
        break
for i in range(1000):
    if K==1:
        break
    if i*K<A or i*K>B:
            print('NG')
            break
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 (int(B)-int(A)) // int(K) >= 0:
  print("OK")
elif int(K) == int(A) or int(K) == int(B):
  print("OK")
else:
  print("NG")
K = int(input())
A, B = map(int, input().split())

r = A // K
d = A % K

if d == 0 or K * r + d + K <= B or B % K == 0 :
    print('OK')
else:
    print('NG')
k = int(input())
A,B = map(int,input().split())

x = B // k
y = A // k

if x - y >0:
    print('OK')
elif A == 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('NO')
k = int(input())
a,b = map(int, input().split())
n=k

while k >= a:
    k += n

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

x=A%K
w=int(A/K)
y=int(B/K)
z=y-w
#print(z)
if B%K==0:
   print('OK')
elif z>=1:
    print('OK')
else:
    print('NG')
k = int(input())
a,b = (map(int,input().split()))
new_list = []
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 % k == 0: print('OK')
elif (a / k + 1) <= b: print('OK')
print('NG')
k = int(input())
a, b = map(int,input().split())

ans = 0

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

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

OK = False

for n in range(1,N):
    print('{} {}'.format(int(A/n)+1, int(B/n)+1))
    if int(A/n) <= K and K <= int(B/n):
        OK = True
        
if OK == True:
    print('OK')
else:
    print('NG')
#a
M = int(input())
N,K=map(int,input().split())
if K-N>=M:
    print('OK')
elif M==1:
    print('OK')
else:
    print('NG')
import math

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

if math.ceil(b/k - a/k) >= 1 :
    print("OK")
elif a%k == 0 or b%k == 0 :
    print("OK")
elif a<=k and k<=b:
    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())
if b//k-a//k==0:
   print("OK")
else:
   print("NG")
K = int(input())
A, B = map(int, input().split())
d = A // K
r = A % K

if K*d + r >= A and K*d + r <= B:
  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")
n=int(input())
a,b=map(int,input().split())
c=a/n
d=b/n
if abs(c-d)>=1 or abs(c-d)==0:
  print('OK')
else :
  print('NG')
K = int(input())
A, B = map(int, input().split())
result = "NG"

for i in range(abs(A - B)):
    i += 1
    if i % K == 0:
        result = "OK"
        break

print(result)
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())
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())

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

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

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

if a//k==b//k:
    print('NG')
else:
    print('OK')
# import math
# from collections import Counter

# N = int(input()) # 1行, 単数
# arg = list(map(int, input().split())) # 1行, 配列
# D = Counter(arg) # 出現数カウント

# print('Yes')
# print('No')
# print()
N = int(input()) # 1行, 単数
arg = list(map(int, input().split())) # 1行, 配列

A = arg[0]
B = arg[1]
flag = "NG"

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

print(flag)
K = input()
AB = input()

K = int(K)
AB = [int(i) for i in list(AB.split())]
x = AB[1]/K

if int(x) * K >= AB[0]:
  print('Yes')
else:
  print('No')
K = int(input())
A,B = map(int,input().split())
ans = 'NG'
if A%K!=0:
    if (B-A)//K!=0:
        ans = 'OK'
else:
    ans = 'OK'
print(ans)
k = int(input())
a, b=map(int,input().split())

fly=0
l=[]
while fly<b:
    fly += k
    l.append(fly)

print(l)
if l[-1]>=a and l[-1]<=b:
    print('OK')
else:
    print('NG')
# -*- coding: utf-8 -*-
# 整数の入力
k = int(input())
# スペース区切りの整数の入力
a, b = map(int, input().split())



d = a % k
e = a - d

if k <= (a + e):
    print('OK')
else:
    print('NG')
k = int(input())

a, b = map(int, input().split())
if a == b and a%k ==0:
  print("OK")
  exit()
else:
  print("NG")
  exit()  

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

N = A // K

if K*(N+1) <= B:
  print("OK")
elif K == A:
  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

print('NG')
K=int(input())

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

largest=(B / K) * K
if A <= largest:
    print('OK')
else:
    print('NG')
K = int(input())
A, B = map(int, input().split())

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

q, r = divmod(a, k)
Q, R = divmod(b, k)

if q > Q:
    print('OK')
else:
    if r == 0:
        print('OK')
    else:
        print('NG')
K = input()
A,B = input().split()

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

x = a // k
z = b // k

for i in range(z-x + 1):
  if a <= k*(x+i) and k*i <= b:
    print("OK")
    exit()
K = int(input())
A, B = map(int,(input().split()))

if(B-A>=K-1 or A%K==0 or B%K==0):
   print("OK")
else:
  print("NG")
def main():
    K = int(input())
    A, B = map(int, input().split())
    wari = int(B/K)
    if wari * K >= A:
        print("OK")
    else:
        print("NO")


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