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):
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):
K=int(input())
A,B=map(int,input().split())
find=0
for i in range(A,B+1):
    if (i%K)==0:
        find=1
        break

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

Solution (Python):
k=int(input())
a,b=list(map(int,input().split()))
s=0
f=0
while s<=b:
  if s>=a:
    f=1
    break
  s+=k
if f:
  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(0)
print("NG")

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

if (a // k != b // k) | (a % k == 0) | (b % k == 0):
    print('OK')
else:
    print('NG')

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

tmp = K
for i in range(100000):
    if A <= tmp <= B:
        print("OK")
        break
    else:
        tmp += K
    
    if tmp > B:
        print("NG")
        break

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

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

possible = False

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

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

Solution (Python):
K = input()
A,B = input().split()
K,A,B = int(K),int(A),int(B)
count = "NG"
box = int(A / K)
for i in range(box,A+1):
    if i * K >= A and i * K <= B:
        count = "OK"
        print("OK")
        break
    i += 1
if count == "OK":
    pass
else:
    print("NG")

Solution (Python):


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


min_value = K * (A // K)
if min_value < A:
    min_value += K
result = ""
if min_value <= B:
    result = "OK"
else:
    result = "NG"


print(result)

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

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

Solution (Python):
from math import floor
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):
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 == 0 or b % k == 0 or a // k != b // k else "NG")

Solution (Python):
"""
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import fractions
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, product, accumulate, groupby
from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)


inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]
ddn9 = ddn + [(0, 0)]
'''for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:'''
"""
from collections import defaultdict
import sys
sys.setrecursionlimit(10 ** 7)


def wi(): return list(map(int, sys.stdin.readline().split()))



def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]


def ws(): return sys.stdin.readline().split()


def si(): return int(sys.stdin.readline())  


def ss(): return input()


def hi(n): return [si() for _ in range(n)]


def hs(n): return [ss() for _ in range(n)]  


def s_list(): return list(input())


def mi(n): return [wi() for _ in range(n)]  


def mip(n): return [wip() for _ in range(n)]


def ms(n): return [ws() for _ in range(n)]


def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[
    0]] for _ in range(n)]  


def grid(n): return [s_list() for _ in range(n)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a




def round_up(a, b):
    """ a/b の切り上げ """
    c = (a + b - 1) / b
    return c


def lcm(a, b):
    """a,bの最小公倍数"""
    return a * b // gcd(a, b)


def main():
    k = int(input())
    a, b = wi()
    for i in range(a, b+1):
        if i % k == 0:
            print('OK')
            sys.exit()
    print('NG')


if __name__ == '__main__':
    main()

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
                print("OK")
                break
if( flg == 0):
        print("NG")

Solution (Python):
import numpy as np
import math
k=int(input())
a,b=map(int,input().split())



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

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

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

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

a = A/K
b = B/K

a_inte = A//K if A % K == 0 else A//K +1

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

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

Solution (Python):
k=int(input())
ab=list(map(int, input().split()))
a=ab[0]
b=ab[1]
ak=(a)//k
bk=b//k
if a%k==0:
    print('OK')
elif ak!=bk:
    print('OK')
else:
    print('NG')

Solution (Python):
K=int(input())
A,B=[int(x) for x in input().split()]
d=K
while d<=B:
    if d>=A:
        print('OK')
        exit()
    d+=K
print('NG')

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

if a//k==b//k and a%k!=0:
  print("NG")
else:
  print("OK")

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    x = 0
    while x <= b:
        x += k
        if a <= x <= b:
            print("OK")
            sys.exit()

    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

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

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

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

if A // K != B // K:
    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())

number = [int(x) for x in range(A,B+1)]
flag = False
for i in number:
    if i % K == 0 :
        flag = True
        break

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

Solution (Python):
n=int(input())
i ,j= list(map(int, input().split()))
x=i//n
y=j//n
ans="NG"
for k in range(x,y+1):
    if k*n<=j and k*n>=i:
        ans="OK"
        break
print(ans)

Solution (Python):
num = int(input())
low, high = list(map(int, input().split()))
word="OK"
for i in range(low, high+1):
  if i % num ==0:
    word = "OK"
    break
  else:
    word = "NG"
  
print(word)

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

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    K = int(input())
    A, B = map(int, input().split())
    for i in range(A, B+1):
        if i % K == 0:
            return 'OK'
    else:
        return 'NG'

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

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

n = b // k

if a <= n * k <= b:
    print("OK")
else:
    print("NG")

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

from collections import deque, defaultdict
import bisect
from math import factorial, sqrt

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

    flag = False
    k = K
    i = 1
    while k <= B:
        if k >= A:
            flag = True
            break
        i += 1
        k = K * i

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


if __name__ == '__main__':
    main()

Solution (Python):
K = eval(input())
A, B = [eval(v) for v in input().strip().split(" ")]

i = 1
while K * i <= B:
    if K * i >= A:
        print("OK")
        exit(0)
    i += 1

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

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

for i in range(1,1000):
  kk=k*i
  if (kk >= a and kk <= b):
    print ('OK')
    sys.exit()
  if (kk > b):
    print ('NG')
    sys.exit()

Solution (Python):
K = int(input())
A, B = map(int, input().split())
if B - A >= B % K:
    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=map(int,input().split())
l=[i*k for i in range(1,1001)]
for k in l:
    if a<=k<=b:
        print("OK")
        break
else:
    print("NG")

Solution (Python):
k = int(input())
a, b = map(int, input().split())
L = list(range(a, b+1))
n = b-a+1
for i in range(n):
  L[i] = L[i]%k
if 0 in L:
  print("OK")
else:
  print("NG")

Solution (Python):
import sys
import math

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]= [int(s) for s in input().rstrip().split(' ')]
[a_1,a_2] = [A//K,A%K]
[b_1,b_2] = [B//K,B%K]
if a_1 != b_1:
    print("OK")
else:
    if a_2==0 or b_2==0:
        print("OK")
    else:
        print("NG")

Solution (Python):
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())
MIN, MAX = map(int, input().split())

flag = 1

for num in range(MIN, MAX + 1):
    if num % K == 0:
        print("OK")
        flag = 0
        break

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

Solution (Python):
k = int(input())
a, b = map(int, input().split())
print("OK" if (a-1)//k != b//k else "NG")

Solution (Python):
k = int(input())
a , b= map(int,input().split())
num_list = []
for i in range(a,b+1,1):
    num_list.append(i)
for i in num_list:
    flag = False
    if i % k == 0:
        flag = True
        break
    else:
        continue
if flag:
    print('OK')
else:
    print('NG')

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

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

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

import sys

DEBUG = True if (len(sys.argv) > 1 and sys.argv[1] == "DEBUG") else False


def dp(value):
    if DEBUG:
        print(value)
    return


def input_text(split=" "):
    
    result = []
    while True:
        try:
            row = list(
                map(lambda x: int(x) if x.isdecimal() else x, input().split(split))
            )
            result.append(row)
        except EOFError:
            break
    return result



it = input_text()

k = it[0][0]
a = it[1][0]
b = it[1][1]

n = 0
while k * n <= b:
    if a <= k * n <= b:
        print("OK")
        sys.exit()
    n += 1

print("NG")

Solution (Python):
K = int(input())
ans = "NG"
A,B = [int(hoge) for hoge in input().split()]
for i in range(A,B+1):
    if not i%K:
        ans = "OK"

print(ans)

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

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

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

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

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

Solution (Python):
k = int(input(''))
ab = input('')
a = int(ab.split(' ')[0])
b = int(ab.split(' ')[1])

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

if ret==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")
        break
    if i == b:
        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 == 1:
  print('OK')
else:
  print('NG')

Solution (Python):
k=int(input())
a,b=[int(x) for x in input().split()]
if b//k-(a-1)//k>0: print("OK")
else: print("NG")

Solution (Python):
k=int(input())
a,b=map(int, input().split())
if (a-1)//k!=b//k:
    print("OK")
else:
    print("NG")

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

if a%k==0 or b%k==0:
    print('OK')
elif (b-a)>=k-a%k:
    print('OK')

else:
    print('NG')

Solution (Python):
import sys

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

i=1
p = n * i

while p <= B:
  p = n * i
  if p >= A and p <= B:
    print("OK")
    sys.exit(0)
  i = i + 1

print("NG")

Solution (Python):
import sys


def solve(K: int, A: int, B: int):

    n = B // K

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

Solution (Python):
a=int(input())
b,c=map(int,input().split())
if c-b>=c%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
    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()
print('NG')

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

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

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

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

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

Solution (Python):
k = int(input())
a,b = (int(i) for i in input().split())
if a%k !=0:
	if not a-a%k+k<=b:
		print("NG")
	else:
		print("OK")
else:
	print("OK")

Solution (Python):
k=int(input())
ans="NG"
a,b=map(int,input().split())
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())

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

print('NG')

Solution (Python):
base=int(input())
(mn, mx)=[int(x) for x in input().split()]
c=1
f=0
while base*c <= mx:
  if base*c >= mn:
    print("OK")
    f=1
    break
  c+=1
if f==0:
  print("NG")

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

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

qA, modA = divmod(A, K)

if modA == 0:
  print("OK")
else:
  if (qA+1)*K <= B:
    print("OK")
  else:
    print("NG")

Solution (Python):

def main():
    k = int(input())
    a, b = map(int, input().split())
    n = a//k
    num = 0
    while num <= b:
        num = k * n
        if a <= num and num <= b:
            print("OK")
            quit()
        n += 1
    print("NG")

if __name__ == '__main__':
    main()

Solution (Python):






"""Module docstring
"""

import functools
import heapq
import itertools
import logging
import math
import random
import string
import sys
from argparse import ArgumentParser
from collections import defaultdict, deque
from copy import deepcopy
from typing import Dict, List, Optional, Set, Tuple


def solve(multiple: int, min_value: int, max_value: int) -> bool:
    return max_value - (max_value % multiple) >= min_value


def do_job():
    "Do the work"
    LOG.debug("Start working")
    
    K = int(input())
    A, B = map(int, input().split())
    
    
    
    result = solve(K, A, B)
    print("OK" if result else "NG")


def print_output(testcase: int, result) -> None:
    "Formats and print result"
    if result is None:
        result = "IMPOSSIBLE"
    print("Case 
    
    


def configure_log() -> None:
    "Configure the log output"
    log_formatter = logging.Formatter("%(lineno)d - " "%(message)s")
    handler = logging.StreamHandler(sys.stdout)
    handler.setFormatter(log_formatter)
    LOG.addHandler(handler)


LOG = None

if not LOG:
    LOG = logging.getLogger("template")
    configure_log()


def main(argv=None):
    "Program wrapper."
    if argv is None:
        argv = sys.argv[1:]
    parser = ArgumentParser()
    parser.add_argument(
        "-v",
        "--verbose",
        dest="verbose",
        action="store_true",
        default=False,
        help="run as verbose mode",
    )
    args = parser.parse_args(argv)
    if args.verbose:
        LOG.setLevel(logging.DEBUG)
    do_job()
    return 0


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    sys.exit(main())


class memoized:
    """Decorator that caches a function's return value each time it is called.
    If called later with the same arguments, the cached value is returned, and
    not re-evaluated.
    """

    def __init__(self, func):
        self.func = func
        self.cache = {}

    def __call__(self, *args):
        try:
            return self.cache[args]
        except KeyError:
            value = self.func(*args)
            self.cache[args] = value
            return value
        except TypeError:
            
            
            return self.func(*args)

    def __repr__(self):
        """Return the function's docstring."""
        return self.func.__doc__

    def __get__(self, obj, objtype):
        """Support instance methods."""
        return functools.partial(self.__call__, obj)

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


ma = A//K
if A%K==0:
    print('OK')
elif K*(ma+1)>=A and K*(ma+1)<=B:
    print('OK')
else:
    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:
        print("OK")
        c += 1
        break
    else:
        continue
if c == 0:
    print("NG")

Solution (Python):
target = int(input())
plus = target
range = input().rstrip().split(" ")
min = int(range[0])
max = int(range[1])
answer = 0
while target <= max:
    if target >= min:
        answer += 1
        break
    target += plus
if answer == 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())
a ,b = list( map( int ,input().split()))
if a %n == 0 or b %n == 0:
  print('OK')
  exit(0)
if ( b//n - a //n >=1 ):
  print('OK')
else:
  print('NG')

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

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

Solution (Python):
k = int(input())
x = input()
a = int(x.split()[0])
b = int(x.split()[1])
count = 0

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

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

Solution (Python):
S = int(input())
N, M = map(int, input().split())

if N%S == 0:
  print("OK")
elif N%S != 0 and M >= N + S - N%S:
  print("OK")
else:
  print("NG")

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

Solution (Python):



import sys


def input():
    return sys.stdin.readline()


def resolve():
    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")


if __name__ == "__main__":
    resolve()

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

num = k
while num <= b:
    if a <= num:
        print("OK")
        exit()
    num += k

print("NG")

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

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

x = 0

while x < a:
    x += k

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

Solution (Python):

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


result = False
if -(-A//K)*K <= B//K*K:
    result = True


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

Solution (Python):
K = int(input())
S, W = map(int, input().split())

for i in range(S, W+1):
    if i%K==0:
        print("OK")
        exit()
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())
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 calculate(k, a, b):
    result = False
    for i in range(a, b + 1):
        if i % k == 0:
            result = True
            break

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


calculate(K, A, B)

Solution (Python):

import sys


def solve(K: int, A: int, B: int):
    for i in range(A, B+1):
        if not i % K:
            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):
c=int(input())
a,b=map(int,input().split())
k=0
for i in range(a,b+1):
    if i%c==0:
        k+=1
if k>0:
    print("OK")
else:
    print("NG")

Solution (Python):
a = int(input())
b,c = map(int,input().split())
d = 0
for i in range(b,c+1):
    if( i % a == 0):
        d += 1

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

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]

K = I()
A, B = LI()

a = 1
while True:
    if A <= a*K <= B:
        print("OK")
        break
    else:
        a += 1
    if B < a*K:
        print("NG")
        break

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

for i in range(1020):
    if i>=A and i<= B:
        if i%K==0:
            print("OK")
            break
else:
    print("NG")

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

    bai = ((a-1) // k) + 1
    if k * bai <= b:
        print('OK')
    else:
        print('NG')



if __name__ == "__main__":
    a()

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):
from math import floor
k = int(input())
a,b=map(int,input().split())
f=True
for p in range(a,b+1):
  if p%k==0:
    f=False
    break
if f:
  print("NG")
else:
  print("OK")

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')
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())
ans = 0
while True:
    ans += K
    if A <= ans <= B:
        print("OK")
        sys.exit()
    elif ans > B:
        print("NG")
        sys.exit()
    else:
        pass

Solution (Python):
import math

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]


k = int(input())
a,b = NextInts()

ju = False

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

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

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

Solution (Python):
def isOK(p0, p1):
    for i in range(p0, p1 + 1):
        if i % paramK == 0:
            return True
    return False

paramK = int(input())
params1 = list(map(lambda x: int(x), input().split(' ')))

if isOK(params1[0], params1[1]):
    print('OK')
else:
    print('NG')

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

Solution (Python):

from sys import stdin
from operator import itemgetter
from collections import deque, Counter
import math
import pprint
from functools import reduce


MOD = 1000000007

def keta(kazu):
    kazu_str = str(kazu)
    kazu_list = [int(kazu_str[i]) for i in range(0, len(kazu_str))]
    return kazu_list

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def combination(m,n):
    if n > m:
        return 'すまん'
    return math.factorial(m) // (math.factorial(m-n) * math.factorial(n))

def main():
    a = int(stdin.readline().rstrip())
    b, c = [int(x) for x in stdin.readline().rstrip().split()]
    check = 0
    while b <= c:
        if b % a == 0:
            check += 1
        b += 1
    if check > 0:
        print("OK")
    else:
        print("NG")
main()

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

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

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

Solution (Python):
k = int(input())
gr = list(map(int,input().split()))
tmp = k
while True:
  if gr[0] <= k and k <=gr[1]:
    print('OK')
    break
  if k > gr[1]:
    print('NG')
    break
  k = k + tmp

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

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

if cnt>0:
    print("OK")
if cnt==0:
    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

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

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

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

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