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):
def resolve():
    k = int(input())
    a, b = map(int, input().split())
    if a%k == 0:
        print("OK")
    else:
        if b//k == a//k:
            print("NG")
        else:
            print("OK")
resolve()

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


if __name__ == '__main__':
    solve()

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

print(ret)

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

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):
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 == 1:
    print("OK")
else:
    print("NG")

Solution (Python):






inputs: list = []
while True:
    try:
        inputs.append(input().strip('\n'))
    except EOFError:
        break


k = int(inputs[0])
a, b = [int(i) for i in inputs[1].split()]

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

Solution (Python):
K = int(input())
A, B = map(int, input().split())
print('OK' if A // K < B // K or (A % K) * (B % K) == 0 else '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 = map(int,input().split())

x = A // K
y = B // K

if x != y:
  print("OK")
elif A % K == 0:
  print("OK")
elif B % K == 0:
  print("OK")
else:
  print("NG")

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

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

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

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

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

lis = list(range(a,b+1))
ans = [i%k for i in lis]

if 0 in ans:
    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):
k = int(input())
[a, b] = [int(x) for x in input().split(' ')]

if a % k == 0 or (a // k != b // k):
  print ('OK')
else:
  print ('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")
        exit()
print("NG")

Solution (Python):
k = int(input())
a,b = [int(i) for i in input().split()]

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

Solution (Python):
import math

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

tmp=0
ans=False
for i in range(1001):
    tmp=i*K
    if tmp >= A and tmp <= B:
        ans=True

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

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

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

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

print('NG')

Solution (Python):
import sys
from random import choice,randint
inp=sys.stdin.readline
out=sys.stdout.write
flsh=sys.stdout.flush
 
sys.setrecursionlimit(10**9)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def MI(): return map(int, inp().strip().split())
def LI(): return list(map(int, inp().strip().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]
def LI_(): return [int(x)-1 for x in inp().strip().split()]
def LF(): return [float(x) for x in inp().strip().split()]
def LS(): return inp().strip().split()
def I(): return int(inp().strip())
def F(): return float(inp().strip())
def S(): return inp().strip()
def pf(s): return out(s+'\n')
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    k = I()
    a,b=MI()
    for i in range(a,b+1):
        if i%k==0:
            print("OK")
            break
    else:
        print("NG")

if __name__ == "__main__":
    main()

Solution (Python):
k, a, b = map(int, open(0).read().split())
for i in range(b+1):
    if k * i > b:
        print('NG')
        break
    if k * i >= a:
        print('OK')
        break

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

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

print(ans)

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

Solution (Python):
K = int(input())
a, b = map(int, input().split())
if a%K == 0:
  print('OK')
elif b//K > a//K:
  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:
        print('OK')
        count += 1
        break
if count == 0:
    print('NG')

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"
        break

print(ans)

Solution (Python):
K=int(input())
A,B=map(int,input().split())
c=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        c+=1
        break
    else:
        pass
if c==0:
    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):

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

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

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

a = A//K
if a*K >= A and a*K <= B:
    print("OK")
elif (a+1)*K >= A and (a+1)*K <= B:
    print("OK")
else:
    print("NG")

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    K = I()
    A, B = LI()

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

if __name__ == '__main__':
    resolve()

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'
        break
print(ans)

Solution (Python):
k = int(input())
a,b = map(int,input().split(" "))
can = False
for i in range(a,b+1):
  if i % k == 0:
    can = True
if can:
  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

    if i == B:
        print('NG')
        break

Solution (Python):
k,a,b=map(int,open(0).read().split())
for i in range(1,10000):
  if a<=k*i<=b:
    print('OK')
    break
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):
import sys

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

tmp = A//K

for i in range(1000):
    t = (tmp+i) * K
    if A<= t <= B:
        print('OK')
        sys.exit()
    if t > B:
        break
print('NG')

Solution (Python):
n = int(input())
a,b = map(int, input().split())
flg = 0
for i in range(10000):
  if n * i >= a and n * i <= b:
    flg = 1
if flg == 1:
  print('OK')
else:
  print('NG')

Solution (Python):
import queue
import copy
import math
from collections import deque
import bisect


k = int(input())


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

for x in range(a, b+1):
    d, m = divmod(x, k)

    if m == 0:
        print("OK")
        exit(0)

print("NG")

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

import sys
for n in range(A, B+1):
    if n % K == 0:
        print("OK")
        sys.exit()
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):
import math
K = int(input())
A, B = map(int, input().split())

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

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 = 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
input = sys.stdin.readline
input = sys.stdin.buffer.readline

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    K = II()
    A,B = MI()
    ans = 0

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


if __name__ == "__main__":
	main()

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):
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:
    print('OK')
else:
    print('NG')

Solution (Python):
k = int(input())
a, b = list(map(int, input().split()))
 
count = 0
for ele in range(a, b+1):
    if ele % k == 0:
        print("OK")
        count += 1
        break
if count == 0:
    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):
k=int(input())
a,b=map(int,input().split())
flag=False
for i in range(a,b+1):
    if i%k==0:
        flag=True
        break
    else:
        continue
if flag==True:
    print('OK')
else:
    print('NG')

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

A_w = A // K
A_a = A % K
B_w = B // K 

if A_w == B_w and A_a != 0:
    print("NG")
else:
    print("OK")

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

tf = False
for k in range(A, B + 1):
    if k % K == 0:
        tf = True
        break

if tf == True:
    print("OK")
else:
    print("NG")

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

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

Solution (Python):
def main():
    K = int(input())
    A, B = map(int, input().split())
    N = B-A
    frag = 0
    for cycle in range(0,N+1) :
        value = A + cycle
        if value % K == 0 :
            print("OK")
            frag = 1
            break
    if frag == 0 :
        print("NG")

if __name__ == '__main__':
    main()

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

if flag == True:
    print('OK')
else:
    print('NG')

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

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

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

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

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

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

Solution (Python):
def main():
    k = int(input())
    ab = list(map(int, input().split()))

    c = False
    for i in range(ab[0],ab[1]+1):
        if i % k == 0:
            c = True
            break
    print('OK' if c else 'NG')

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6) 
import math
from copy import copy, deepcopy
from operator import itemgetter

from bisect import bisect_left, bisect, bisect_right

from collections import deque 



from collections import Counter

from itertools import accumulate

from heapq import heapify,heappop,heappush


def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds




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





if A%K==0 or B%K==0:
    print('OK')
    exit()

elif A//K<B//K:
    print('OK')
    exit()
print('NG')

Solution (Python):
from collections import  *
def io():
    return map(int,input().split())
def op():
    return list(map(int,input().split()))

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

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

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

Solution (Python):
import collections
import math
import operator as op
from functools import reduce
from collections import Counter
import numpy as np
import math
import bisect
import heapq

MOD = 1000000007


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def main():
    K = get_input(int)
    A, B = get_inputs(int)

    mul = K
    while mul <= B:
        if mul >= A and mul <= B:
            print("OK")
            return
        mul += K

    print("NG")


   

if __name__ == '__main__':
    main()

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

Solution (Python):
import math
import sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from functools import lru_cache, reduce
from heapq import heapify, heappop, heappush
from itertools import chain, combinations, permutations, product
from typing import List, Dict



sys.setrecursionlimit(10**5 + 1)
input = sys.stdin.readline
write = sys.stdout.write


def read_item(cls=int):
    return cls(input())


def read_n_item(cls=int) -> list:
    return [cls(s) for s in input().split()]


def list2d(row, col, init_val=0) -> List[list]:
    return [[init_val] * col for _ in range(row)]


MOD = 10**9 + 7



k = read_item()
a, b = read_n_item()

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

Solution (Python):
K = int(input())
a,b = [int(x) for x in input().split()]
if a//K == b//K and a % K != 0 and b % K != 0:
    print("NG")
else:
    print("OK")

Solution (Python):
import math
k = int(input())
a, b = map(int, input().split())
print('OK' if math.ceil(a/k) <= b/k else 'NG')

Solution (Python):
K = int(input())
A,B = 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('NG')

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

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

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

print(anser)

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
    if(i == b):
        print('NG')
        break

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):
K = int(input())
A,B = map(int,input().split())
ans = 'NG'
if A % K == 0:
    ans = 'OK'
elif B % K == 0:
    ans = 'OK'
x = A // K
y = B // K
if y > x:
    ans = 'OK'
print(ans)

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

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

print("NG")

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(0)

else:
    print("NG")

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

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

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):
k = int(input())
a, b = map(int, input().split())
ans = 'NG'
for i in range(a, b+1):
  if i % k == 0:
    ans = 'OK'
    break
print(ans)

Solution (Python):
K = [int(i) for i in input().split()][0]
A, B = [int(i) for i in input().split()]
is_ok = False
for i in range(A, B+1):
  if i % K == 0:
    is_ok = True
if is_ok:
  print("OK")
else:
  print("NG")

Solution (Python):
from math import ceil
K = int(input())
A, B = map(int, input().split())

m = ceil(A/K)-1
if (m+1)*K>B:
    print('NG')
else:
    print('OK')

Solution (Python):

import collections
import itertools as it
import math

 

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 = 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())
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):
if __name__ == '__main__':
	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 sys

input = sys.stdin.readline
MOD = 1000000007

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

for i in range(1,1000):
    ans = K*i
    if ans >= A and ans <= B:
        print("OK")
        exit()

print("NG")

Solution (Python):
from collections import deque, Counter, defaultdict
from itertools import chain, combinations
import json

import bisect
import sys
import math
import bisect
from functools import lru_cache

sys.setrecursionlimit(10 ** 8)

M = 10 ** 9 + 7
INF = 10 ** 17


def main():
    K = int(input())
    A, B = [int(a) for a in input().split()]

    for i in range(A, B + 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(i%K==0):
        print("OK")
        exit(0)

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):
K = int(input())
A, B = map(int, input().split())

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

main()

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

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

for x in range(1001):
    if a<=k*x<=b:print("OK");break
else:print("NG")

Solution (Python):
N = int(input())
A, B = map(int, input().split())
hoge = N
while hoge <= B:
    if A <= hoge <= B:
        print("OK")
        exit()
    hoge += N

print("NG")

Solution (Python):
k = int(input())
a,b = map(int,input().split())
ok = False
for i in range(a,b+1):
    if i %k == 0:
        ok = True
if ok:print('OK')
else:print('NG')

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

Solution (Python):
k = int(input())
a, b = map(int, input().split())
r = 'NG'
v = a
while True:
	if v % k == 0:
		r = 'OK'
		break
	elif v == b:
		break
	v += 1
print(r)

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')
        break
    if i==b:
        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):
def main():
    K = int(input())
    A, B = list(map(int, input().split()))
    for i in range(A, B + 1):
        if i % K == 0:
            return True
    return False

print("OK" if main() else "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):











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

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

print('NG')

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


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

solve()

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
    elif i%K!=0 and i==B:
        print("NG")

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

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

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

Solution (Python):
k = int(input())
a,b = [int(e) for e in input().split()]
if b//k != a//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())
c = [i for i in range(a,b+1)]
ans = 'NG'
for j in c:
    if j%k == 0:
        ans ='OK'
        break
print(ans)

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

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

if flg:
    print("OK")
else:
    print("NG")

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

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

Solution (Python):
K = int(input())
A, B = map(int, input().split())
num = B // K
if num * K >= A:
    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

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

Solution (Python):
import sys


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):
def main():
    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("OK")
    else:
        print("NG")
main()

Solution (Python):
k=int(input())
a,b=map(int,input().split())
ans=False
for i in range(999):
    if a<= k*i <= b:
        ans=True
print("OK" if ans==True else "NG")

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

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

Solution (Python):
k = int(input())
a,b = map(int,input().split())
d = 0
while d<=b:
  if a <=d:
    print('OK')
    break
  d+= k
else:
  print('NG')

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

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 i in range(a,b+1):
  if i % k == 0:
    print('OK')
    break
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
print('OK' if flag == 1 else 'NG')

Solution (Python):
k = int(input())
a, b = input().split(" ")
flg = "NG"
for n in range(int(a), int(b)+1):
    if n%k == 0:
        flg = "OK"

print(flg)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
def input(): return sys.stdin.readline().rstrip()

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

  ans = False
  for i in range(A, B+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())
flag=1
for i in range(a,b+1):
    if i%K==0:
        flag=0
if flag==1:
    print("NG")
else:
    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):
import sys
input = sys.stdin.readline

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

Solution (Python):


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

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

    ak = a // k
    bk = b // k
    if ak != bk:
        print('OK')
    else:
        print('NG')
        

submit()

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

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

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

Solution (Python):


def solve():
    K = int(input())
    A, B = map(int,input().split())
    if B//K - (A-1)//K >= 1:
        return 'OK'
    else:
        return 'NG'



if __name__ == '__main__':
    print(solve())

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

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'
    break
print(ans)

Solution (Python):
K = int(input())
A,B = map(int,input().split())
flag = False
for i in range(1000):
    if K*i >= A and K*i <= B:
        flag = True
        print('OK')
        break
if flag == False:
    print('NG')

Solution (Python):
def main():
    import math
    k = int(input())
    a,b = map(int,input().split())
    c = math.ceil(a/k)
    if c*k<=b:
        print('OK')
    else:
        print('NG')

if __name__ == "__main__":
    main()

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


if __name__ == '__main__':
    main()

Solution (Python):

k = int(input())
a,b =map(int, input().split())
f = 0
for i in range(a,b+1):
    if i % k == 0:
        print("OK")
        f = 1
        break
if f == 0: 
    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 = map(int,input().split())

t=0
for i in range(a,b+1):
    if i % k ==0:
        print('OK')
        t+=1
        break
if t ==0:
    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

print('OK' if ans else 'NG')

Solution (Python):
k = int(input())
a, b = map(int, input().split())
flag = False
for i in range(a, b+1):
  if i % k == 0:
    flag = True
    break
if flag:
  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:
    print('NG')

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

Solution (Python):
K = int(input())
A, B = [int(n) for n in input().split()]

ans = "NG"
for n in range(A, B+1):
    if n % K == 0:
        ans = "OK"

print(ans)

Solution (Python):


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

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

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