Problem:
 Score: 100 points    Problem Statement  Takahashi the Jumbo will practice golf.  His objective is to get a carry distance that is a multiple of K , while he can only make a carry distance of between A and B (inclusive).  If he can achieve the objective, print OK ; if he cannot, print NG .      Constraints   All values in input are integers.  1 \leq A \leq B \leq 1000  1 \leq K \leq 1000         Input  Input is given from Standard Input in the following format:  K  A  B       Output  If he can achieve the objective, print OK ; if he cannot, print NG .        Sample Input 1 7
500 600      Sample Output 1 OK  Among the multiples of 7 , for example, 567 lies between 500 and 600 .       Sample Input 2 4
5 7      Sample Output 2 NG  No multiple of 4 lies between 5 and 7 .       Sample Input 3 1
11 11      Sample Output 3 OK

Solution (Python):

import sys

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

distance =0
kekka ="NG"
for i in range(10):
    distance =K *(i + A//K)
    if A<=distance and distance <=B:
        kekka ="OK"
        
        break
print(kekka)

Solution (Python):
prime = int(input())
range1 = list(map(int, input().split()))

for i in range(range1[0],range1[1]+1):
  mod = i % prime
  if mod == 0:
    print("OK")
    break
  if i == range1[1] and mod != 0:
    print("NG")

Solution (Python):
k = int(input())

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

count = 0
for i in range(b-a+1):
    if (a + i) % k == 0:
        count += 1
if (b-a) / k >= 1:
    print('OK')
elif count == 1:
    print('OK')
else:
    print('NG')

Solution (Python):
k = int(input())
a,b = (int(x) for x in input().split())
i=a
while True:
    if i%k == 0:
        print("OK")
        break
    i+=1
    if i>b:
        print("NG")
        break

Solution (Python):
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')

Solution (Python):
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')

Solution (Python):
K = int(input())
A, B = list(map(int, input().split()))

if A % K == 0:
    print('OK')
else:
    if ((A // K)+1) * K > B:
        print('NG')
    else:
        print('OK')

Solution (Python):

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

Solution (Python):
K = int(input())
A,B = [int(i) for i in input().split()]
flag=0
for i in range(1,1001):
    if(i*K>=A and i*K<=B):
        print("OK")
        flag=1
        break
if (flag==0):
    print("NG")

Solution (Python):
n = int(input())
a,b = map(int,input().split())

ans='NG'

for i in range(b+1):
    c=n*i
    if c>=a and c<=b:
        ans='OK'
        break

print(ans)

Solution (Python):
k = int(input())
a, b = input().split()
a = int(a)
b = int(b)
if a - a % k + k <= b or a % k == 0 or b % k == 0:
  print('OK')
else:
  print('NG')

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):
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')

Solution (Python):
import math

if __name__ == '__main__':
    
    K = int(input())
    s = input().rstrip().split(' ')
    A,B = int(s[0]), int(s[1])
    C,D = float(A/K), float(B/K)
    E = math.ceil(C)
    if K == 1:
        print('OK')
    else:
        print('OK' if C <= E and E <= D else 'NG')

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

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

while A<B and A%K!=0:
  A+=1

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

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

if a%k == 0:
    res_k = a
else:
    res_k = (a//k + 1)*k

if (res_k >= a) and (res_k <= b):
    print('OK')
else:
    print('NG')

Solution (Python):
K = input()





k = int(K)

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

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

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

Solution (Python):
K = int(input())
A,B = map(int,input().split())
c = 0

for x in range(A-1,B):
  if (x+1) % K == 0:
    c += 1
    break

if c == 1:
  print("OK")
else:
  print("NG")

Solution (Python):
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")

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

if k<a:
  if a%k == 0:
    print("OK")
  elif b%k == 0:
    print("OK")
  elif(a+(k-a%k)) <= b:
    print("OK")
  else:
    print("NG")
elif k<=b:
  print("OK")
else:
  print("NG")

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

i=0

while True:
  if (a+i)%k==0:
    print('OK')
    break
  
  if  a+i==b:
    print('NG')
    break
  
  i+=1

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

K, A, B = map(int, read().split())
x = B // K - (A - 1) // K
print('OK' if x else 'NG')

Solution (Python):
if __name__ == "__main__":
    K = int(input())
    A, B = map(int, input().split())
    result = "NG"
    for i in range(A, B+1):
        if i % K == 0:
            result = "OK"
            break
    print(result)

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

Solution (Python):
K = int(input())
A,B = map(int,input().split())
K1 = 0
flag = 0
while K1 <= B:
    K1 = K1 + K 
    if A <= K1 <= B:
        print("OK")
        flag = 1
        break
if flag == 0:
    print("NG")

Solution (Python):
k = int(input())
a, b = map(int, input().split())
multi7 = []
for i in range(a, b + 1):
    if i % k == 0:
        multi7.append(i)
if len(multi7) > 0:
    print('OK')
else:
    print('NG')

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

if (a % k) == 0 or a + k - (a % k) <= b:
  print("OK")
else:
  print("NG")

Solution (Python):

import sys


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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(K, A, B)

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
K = int(input())
A, B = map(int, input().split())
can=False
count = 1
a = K

while(a <= B):
    a = count * K
    count += 1
    
    if(a>=A and a<=B): can=True

if(can):print('OK')
else: print('NG')

Solution (Python):
K = int(input())
A,B = map(int,input().split())
flag = 0

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

Solution (Python):
num = int(input())

hani = input().split()
flag = 0
for i in range(int(hani[0]),int(hani[1])+1):
    if (int(i) % num) == 0:
        flag = 1
        break
if flag == 1:
    print("OK")
else:
    print("NG")

Solution (Python):






import sys,bisect,math
sys.setrecursionlimit(15000)

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

if A%K == 0 or B%K == 0:
    print("OK")
    exit()
if A//K == B//K:
    print("NG")
    exit()
print("OK")

Solution (Python):
import sys
input = sys.stdin.readline

k = int(input())
a, b = map(int, input().replace("\n","").split())

if a == b:
    if a % k == 0:
        print("OK")
        exit()

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

print("NG")

Solution (Python):


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



q_1, mod_1 = divmod(a,K)
q_2, mod_2 = divmod(b,K)

if(K == 1 or b == K or a == K or mod_1 == 0 or mod_2 == 0):
  print("OK")
  exit()

if(q_1 != q_2):
  print("OK")
else:
  print("NG")

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

Solution (Python):
k = int(input())
a, b = map(int, input().split())
flag = 0
for i in range(1001):
    if a <= k*i <= b:
        flag = 1

if flag == 1:
    print("OK")
else:
    print("NG")

Solution (Python):
K = int(input())
 
A,B=map(int,input().split())
 
if (int(B/K) - int((A-1)/K) ) >=1 :
    print('OK')
else :
    print('NG')

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

fly=0
l=[]
while fly<b:
    fly += k
    l.append(fly)
    
if len(l)==1:
    if k>=a and k<=b:
        print('OK')
    else:
        print('NG')
else:
    if l[-1]>=a and l[-1]<=b:
        print('OK')
    elif l[-2]>=a and l[-2]<=b:
        print('OK')
    else:
        print('NG')

Solution (Python):
K = int(input())
A,B = (int(x) for x in input().split())
c = A // K
while True:
    if K == 1:
        print('OK')
        break
    b = K * (c)
    if b >= A and b <= B:
        print('OK')
        break
    elif b > B:
        print('NG')
        break
    c += 1

Solution (Python):


K = int (input())
line= list(map(int,input().split()))
a,b = line[0],line[1]
if b<K:
    print("NG")
    

else:
    for i in range(a,b+1):
        if i%K==0:
            print("OK")
            break
        elif i==b:
            print("NG")

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

listK = [K*i for i in range(1, 1000) if K*i<=1000]

for j in listK:
    if A<=j and j<=B:
        print('OK')
        exit()

print('NG')

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

min=(a//k)+1
if a%k==0:
    print("OK")
else:
    if a<=k*min and k*min<=b:
        print("OK")
    else:
        print("NG")

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

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

Solution (Python):
import math
K=int(input())
A,B=[int(i)for i in input().split()]
a=math.ceil(A/K)
print("OK" if B>=a*K else "NG")

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

while A < B and A % K != 0 :
    A += 1

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

Solution (Python):



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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
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")

Solution (Python):
K=int(input())
A,B=map(int,input().split())
n=0
for i in range(A,B+1):
    if i%K==0:
        n+=1

if n==0:
    print('NG')
else:
    print('OK')

Solution (Python):
num=int(input())
date1=input().rstrip().split(" ")
A=int(date1[0])
B=int(date1[1])
C=int((A-A%num)/num)
D=int((B-B%num)/num)
if A%num==0 or B%num==0:
    print("OK")
elif C==D:
    print("NG")
else:
    print("OK")

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

con = 0
ans = 0

for i in range(1,144):
    ans = K * i

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

    else:
        con += 1
        continue


        

if(con==143):
    print("NG")

Solution (Python):
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")

Solution (Python):
K=int(input())
A,B = map(int, input().split())
a=[]
i=1
while True:
    if K*i<=1000:
        a.append(K*i)
        i=i+1
    else:
        break
s=0
for i in a:
    

    if A<=i<=B:
        s=1
        
        break
if s==0:
    print("NG")
if s==1:
    print("OK")

Solution (Python):
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")

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

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

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

flg = False
for i in range(A, B):
	if i % K == 0:
		flg = True
		break

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

Solution (Python):
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")
if count==0:
  print("NG")

Solution (Python):
import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]
def init_dp1(init, N): return [init for _ in range(N)]
def init_dp2(init, N, M): return [[init for _ in range(M)] for _ in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if n is None:
            return

        if self.v is None:
            self.v = n
            return
        self.v = self.f(self.v, n) 


def main():
    K = int(input())
    A, B = read_values()
    if A % K == 0 or B % K == 0:
        print("OK")
    elif (B // K - A // K) > 0:
        print("OK")
    else:
        print("NG")


if __name__ == "__main__":
    main()

Solution (Python):
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 > 0):
    print("OK")
else:
    print("NG")

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

Solution (Python):



import math
import itertools
from collections import defaultdict
from collections import Counter
import numpy as np

import heapq
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")

Solution (Python):
k = int(input())
param = list(map(int, input().split()))
a = int(param[0])
b = int(param[1])

ret = 'NG'
tmp = k
while tmp <= b:
    if a <= tmp:
        ret = 'OK'
    tmp += k
  
print(ret)

Solution (Python):
listA=[] 
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        

a = listA[0][0]
b = listA[1][0]
c = listA[1][1]

if b % a == 0:
  print ('OK')

d = b // a

if b % a !=0:
  if a * (d+1) <= c:
    print ('OK')
  else:
    print ('NG')

Solution (Python):
k = int(input().strip())
a, b = input().strip().split()
a = int(a)
b = int(b)
c = 0
for i in range(1,1001):
    if i*k <= b and i*k >= a:
        print("OK")
        c = 1
        break
if c == 0:
    print("NG")

Solution (Python):
K = int(input())
A = list(map(int, input().split()))
d=A[1]-A[0]+1
ok=0

for i in range(d):
    if A[0]%K==0:
        print("OK")
        ok+=1
        break
    else:
        a=A[0]
        A[0]=a+1

if ok==0:
    print("NG")

Solution (Python):
k = int(input())
a, b = map(int, input().split())
ans = 0

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

Solution (Python):
k=int(input())
a,b=map(int,input().split())
flag=0

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

if flag>=1:
  print('OK')
else:
  print('NG')

Solution (Python):
base = int(input())
min,max = map(int, input().split())
for num in range(min,max+1):
  if num % base == 0:
    print('OK')
    break
else:
  print('NG')

Solution (Python):
k = int(input())
a, b = map(int,input().split())
c = int(a / k)
d = int(b / k)

count = 0
for i in range(c,d+1):
    if a <= k*i and k*i <= b:
        count += 1
if count >= 1:
    print("OK")
else:
    print("NG")

Solution (Python):
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')

Solution (Python):
n = int(input())
i,j = [int(e) for e in input().split()]


a = i // n
b = j // n
ans = 'NG'
if a < b:
  ans = 'OK'
else:
  if i % n == 0:
    ans = 'OK'

print(ans)

Solution (Python):
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')

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

i = 1
flg = 0
tmp = K
while(K <= B):
    K =  tmp * i
    
    if(A <= K <= B):
        flg = 1
        break
    i += 1

if(flg == 1):
    print('OK')
else:
    print('NG')

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

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

if ((res_A + 1) * K <= B):
    print("OK")
elif(A % K ==0 or B % K ==0 ):
    print("OK")
else:
    print("NG")

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

c = list(range(a,b+1))
d = []

for i in range(len(c)):
    if c[i] % k == 0:
        d.append('A')

if len(d) >= 1:
    print('OK')
else:
    print('NG')

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

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

Solution (Python):





def main():
    print(resolve())


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

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

    return 'NG'


if __name__ == "__main__":
    main()

Solution (Python):
k = int(input())
l = input().split()
a = int(l[0])
b = int(l[1])
for i in list(range(a, b+1)):
  if i % k == 0:
    print('OK')
    break
  elif i == b:
    print('NG')

Solution (Python):
K=int(input())
A,B=map(int, input().split())
 
if K>B :
    print("NG")
elif A<=K<=B :
    print("OK")
elif K<A and 2*K>B :
    print("NG")
elif K<A and 2*K<=B :
    print("OK")

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

Solution (Python):
K = int(input())
A,B = map(int, input().split())
C = K
count = 1
ans = "NG"

while (C<=B):
    
    if(A<=C and C<=B):
        ans ="OK"
    C = K*count
    count += 1
    


print(ans)

Solution (Python):
s = [input() for i in range(2)]
n = int(s[0])
l = s[1].split()
n1 = int(l[0])
n2 = int(l[1])
m="NG"
i=n1
while i <= n2:
    if i % n==0:
        m = "OK"
        break
    i +=1
print(m)

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

Solution (Python):
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')

Solution (Python):
def solve(a, b, k):
    if a % k == 0:
        return a % k == 0
    return a / k < b / k

assert solve(12, 14, 4)
assert solve(11, 11, 1)
assert solve(11, 12, 1)
assert solve(11, 12, 3)
assert solve(11, 12, 5) == False
assert solve(3, 3, 3)
assert solve(1, 2, 3) == False
assert solve(5, 7, 4) == False
assert solve(7, 7, 7)
assert solve(3, 7, 4)
assert solve(5, 8, 4)
assert solve(5, 9, 4)
assert solve(500, 600, 7)

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

print 'OK' if solve(a, b, k) else 'NG'

Solution (Python):
k = int(input())
a, b = map(int, input().split())
t = a%k
if t==0:
    print("OK")
else:
    if k-t <= b-a:
        print("OK")
    else:
        print("NG")

Solution (Python):
k=int(input())
a,b=map(int,input().split())
t=b//k*k
if t>=a and t<=b:
    print("OK")
else:
    print("NG")

Solution (Python):
K = int(input())
a, b = map(int, input().split())
for i in range(1,1000):
    c = K*i
    if a <= c <= b:
        print("OK")
        test = 1
        break
    else:
        test = 0
        continue
if test == 0:
    print("NG")

Solution (Python):
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")

Solution (Python):
k = int(input())
a, b = map(int, input().split())
n = (a + k - 1) // k

if k * n > b:
    print('NG')
else:
    print('OK')

Solution (Python):
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)

Solution (Python):
import sys
N = int(input())
 
input_line = input()
Line = input_line.split()
Line = [int(s) for s in Line]

for i in range(Line[0],Line[1]+1):
    
    if i % N == 0:
        print("OK")
        sys.exit()
print("NG")

Solution (Python):
k=int(input())
a,b=map(int,input().split())
i=1
num=0
while num<=b:
    num=k*i
    if a<=num<=b:
        print("OK")
        exit()
    i+=1
print("NG")

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

if a % k != 0:
    if a <= (a//k + 1)*k <= b:
        print('OK')
    else:
        print('NG')
else:
    if a <= (a//k)*k <= b:
        print('OK')
    else:
        print('NG')

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

b = B // K
a = b * K

if A <= a <= B:
    print("OK")
else:
    print("NG")

Solution (Python):
K = int(input())
A, B = (int(x) for x in input().split())
aq, amod = divmod(A, K)
bq, bmod = divmod(B, K)
if amod == 0:
    print('OK')
elif bmod == 0:
    print('OK')
elif aq < bq:
    print('OK')
else:
    print('NG')

Solution (Python):

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

for nn in range(a,b+1):
    if nn%k == 0:
        print("OK")
        break
        exit()
    if nn==b and nn%k!=0:
        print("NG")

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

x=0
y=0

for i in range(B+1):
  if K*i<=B:
    y+=1

for i in range(y):
  if A<=K*i<=B:
    x+=1
if x>=1:
  print("OK")
else:
  print("NG")

Solution (Python):
k = int(input())
a, b = map(int, input().split())
if a//k < b//k or a%k == 0 or b%k == 0:
    print("OK")
else:
    print("NG")

Solution (Python):

k = int(input())
a ,b = map(int,input().split())
l = [num for num in range(a, b+1)]

flag = True
for n in l:
    if n % k == 0:
        print("OK")
        flag = False
        break
if flag:
    print("NG")

Solution (Python):
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")

Solution (Python):
I = [input() for i in range(2)]
K = int(I[0])
S = I[1].split()
A = int(S[0])
B = int(S[1])

na = A//K
nb = B//K

la = A%K
lb = B%K




if na < nb or la == 0 or lb == 0 :
    ans = 'OK'
else:
    ans = 'NG'

print(ans)

Solution (Python):
K=int(input())
A,B=map(int,input().split(" "))
baisu=B//K*K
print("OK" if  A <= baisu and baisu <= B else "NG")

Solution (Python):
N=int(input())

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

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

Solution (Python):
K = int(input())
A, B = input().split()


if  int(A) % K ==0 or int(B) % K ==0:
    print("OK")
elif int(A) // K == int(B)//K:
    print("NG")
else:
    print("OK")

Solution (Python):
N = int(input())
mi,ma = map(int,input().split())

flag = 0
for i in range(mi,ma+1):
  if(i % N == 0):
    flag = 1
    break
if(flag == 1):
  print('OK')
else:
  print('NG')

Solution (Python):
from math import ceil
K = int(input())
A, B = map(int, input().split())
upper = B//K
lower = ceil(A/K)
if upper>=lower:
  print("OK")
else:
  print("NG")

Solution (Python):
K = int(input())
A,B = map(int,input().split())
check = int()

for i in range(A,B+1):
  if i % K == 0:
    print('OK')
    break
  elif i != B:
    continue
  else:
    print('NG')

Solution (Python):
K = int(input())
A, B = map(int, input().split())
mod = A % K
dif = B - A
if mod + dif >= K or mod==0:
    print("OK")
else:
    print("NG")

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

tmp = 0
num = 0
res = False
while(tmp < b):
    num += 1
    tmp = k*num
    if tmp==a or tmp==b or a <= tmp <= b:
        res = True
        break

if res:
    print('OK')
else:
    print('NG')

Solution (Python):
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()

Solution (Python):
def main():
  k = int(input())
  a, b = map(int, input().split())
  
  i = 0
  res = 0
  while True:
    i += 1
    if res >= a:
      break
    res = k*i
  
  print("OK" if (res >= a and res <= b) or (a==b and a%k==0) else "NG")
  
if __name__ == '__main__':
  main()

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

Solution (Python):
K = int(input())
A , B = (map(int , input().split()))
kk = K
while True:
    if kk >= A and kk <= B:
        ans = 'OK'
        break
    elif  kk > B:
        ans = 'NG'
        break
    else:
        kk = kk+K
print(ans)

Solution (Python):
def inputOneLine():
	global S
	S=input()

def inputMaltiLine1():
	global S,N,lines
	N=int(input())
	for i in range(N):
		lines.append(input())

def inputMaltiLine2Numbers():
	global S,N,lines
	N=int(input())
	for i in range(N):
		lines.append(input())




S=''
N=''
lines=[]

inputOneLine()
n=int(S)
line2=input()
line2s=line2.split(' ')
min=int(line2s[0])
max=int(line2s[1])


if not((min % n)==0):
	min= min + (n-(min % n))


if not((max % n)==0):
	max = max - (max % n)



if min <=max :
	print ('OK')
else:
	print ('NG')

Solution (Python):
K=int(input())
A,B=map(int, input().split())
flag=0
for i in range(A,B+1):
	if i%K==0:
		flag=1
		break

print("OK" if flag==1 else "NG")

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

Solution (Python):
import sys

lines = sys.stdin.readlines()
a = int(lines[0].strip())
b = lines[1].split()
c = int(b[0])
d = int(b[1])
if (int(d/a)-d/a)*(int(c/a)-c/a) == 0:
    print("OK")
else:
    if (int(d/a)-int(c/a))>=1.0:
        print("OK")
    else:
        print("NG")

Solution (Python):

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

flag=False
i=0
num=0
while num<=B:
	num=K*i
	if num>=A and num<=B:
		flag=True
		break
	else:
		i=i+1
      
if flag:
	print("OK")
else:
	print("NG")

Solution (Python):
K = int(input())
AB=input().split()
A = int(AB[0])
B=int(AB[1])
bb= int(B/K)
if bb * K >= A:
    print("OK")
else:
    print("NG")

Solution (Python):
K = int(input())
A,B = map(int,input().split())
list = []
n = range(A,B+1)
ind = range(B-A+1)
for i in n:
    list.append(i)
counter = 0

for i in ind:
    if list[i] % K == 0:
        counter += 1
    else:
        counter += 0
if counter >= 1:
    print("OK")
else:
    print("NG")

Solution (Python):
K = input()
K = int(K)
ab = list(map(int, input().split()))
S = 0

for i in range(1000):
    if ab[0] <= (i + 1) * K and (i + 1) * K <= ab[1]:
        print("OK")
        break
    S += 1
if S == 1000:

    print("NG")

Solution (Python):
def solve(n, x, y):
  for i in range(x, y+1):
    if i % n == 0:
      return "OK"

  return "NG"


n = int(input())
a, b = list(map(int, input().split()))
print(solve(n, a, b))

Solution (Python):

def inputlist(): return [int(k) for k in input().split()]

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

Solution (Python):
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")

Solution (Python):
import math
K = int(input())
A,B = list(map(int,input().split()))
num = 0
while num <=2000:
    num += K
    if num >1000:
        print("NG")
        break
    if num <= B and A <= num:
        print("OK")
        break
    else:
        continue

Solution (Python):
K=int(input())
A,B=map(int,input().split())
a=A%K
b=B%K
ans=0
ans=a*b
if(ans==0):
    print("OK")
else:
    if((A+K-a)<=B or (B-b)>=A):
        print("OK")
    else:
        print("NG")

Solution (Python):
def main():
    k = int(input())
    a,b = tuple([int(t)for t in input().split()])

    for i in range(1000):
        t = k*i
        if a<=t and t<=b:
            print("OK")
            return
    print("NG")

if __name__ == "__main__":
    main()

Solution (Python):
def resolve():
    k = int(input())
    a, b = map(int, input().split())

    result = k
    count_bai = 1
    while result < b:
        result = k * count_bai
        if a <= result <= b:
            break
        count_bai += 1

    if a <= result <= b:
        print("OK")
    else:
        print("NG")

resolve()

Solution (Python):
k=int(input())
inp=[int(x) for x in input().split()]
a,b=inp[0],inp[1]
ans=False
for i in range(a,b+1):
  if i%k==0:
    ans=True
    break
if ans:
  print("OK")
else:
  print("NG")

Solution (Python):
K = int(input())
A,B = map(int,input().split())
ans = "NG"

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

Solution (Python):
k = int(input())
[a, b] = [int(i) for i in input().split()]
sum = 0
while sum < b:
    sum += k
    if sum >= a and sum <= b:
        print("OK")
        break
else:
    print("NG")

Solution (Python):
import math

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

if math.ceil(a/k) <= math.floor(b/k):
  print("OK")
else:
  print("NG")

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

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

    return print('NG')
    
mun7()

Solution (Python):
k = int(input())
a, b = map(int,input().split())
n = 0
while a > k*n:
    n += 1
if a <= k*n <= b:
    print("OK")
else:
    print("NG")