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

import math
from collections import deque
from fractions import gcd
from functools import lru_cache

import heapq






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)





K = inputI()
A,B = inputIL()

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

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

print('OK') if flag 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, a, b = map(int, open(0).read().split())
cant = True
for i in range(a, b+1):
    if i%k==0: cant = False
print("ONKG"[cant::2])

Solution (Python):

import sys


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


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))  
    print(solve(K, A, B))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

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

Solution (Python):
import math

def readInt():
	return int(input())
 
def readInts():
	return list(map(int, input().split()))
 
def readChars():
	return input().split()

k = readInt()
a,b = readInts()

for n in range(a,b+1):
	if n%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")
        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(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())

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

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    K=int(input())
    A,B=map(int,input().split())
    f=False
    for i in range(1000):
        if A<=i*K<=B:
            f=True
    if f:
        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'
        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(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'

print(ans)

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


if __name__ == '__main__':
    resolve()

Solution (Python):
import sys
input = sys.stdin.readline
K = int(input())
A, B = map(int, input().split())
for i in range(1, 1001):
  if K * i in range(A, B + 1):
    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=list(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())
flg = 0
for i in range(A, B + 1):
    if i % K == 0:
        flg = 1
        break

if flg:
    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())

num = 1
while K * num < A:
    num += 1

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

Solution (Python):
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import permutations,combinations
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right


from functools import reduce
from pprint import pprint

def myinput():
    return map(int,input().split())

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

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

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

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

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

Solution (Python):
k = int(input())
a,b = map(int,input().split())
res = 0
for i in range(a, b+1):
    if i%k==0:
        res = 1
print('OK' if res==1 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 = 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):
def main():
    n = int(input())
    a,b = map(int,input().split())
    for i in range(a,b+1):
        if i%n == 0:
            print('OK')
            return 0
    print('NG')
    
if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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

Solution (Python):
k=int(input())
a,b=map(int,input().split())
f=0
for i in range(a,b+1):
    if i%k==0:
        f=1
print('OK' if f==1 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 = map(int, input().split())
for x in range(A, B + 1):
    if not x % K:
        print('OK')
        break
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
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:
		exit(print("OK"))
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")
        exit()
print("NG")

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

Solution (Python):
from math import *
k = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
	if i%k==0:
		print("OK")
		quit()
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')
        exit()
print('NG')

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

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())
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(x) for x in input().split()]
A, B = [int(x) for x in input().split()]
for x in range(A, B + 1):
    if x % 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"
print(ans)

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

if __name__ == "__main__":
    main()

Solution (Python):
import sys
k=int(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())
f=0
for i in range(A,B+1):
    if i%K==0:
        f=1
print(['NG','OK'][f])

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(i) for i in 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(i) for i in input().split()]

if b // k - (a-1) // k > 0:
    print('OK')
else:
    print("NG")

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


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


def main():
    
    solve()


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

if b//k - (a-1)//k >= 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):
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())
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())
flag = False
for i in range(A,B+1) :
    if i % K == 0 :
        print("OK")
        flag = True
        break

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

Solution (Python):
if __name__ == '__main__':
    from sys import stdin
    
    input = stdin.readline

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

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):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

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

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy


from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    k = inp()
    a,b = inpm()
    if (b//k)*k >= a:
        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')
        exit()
print('NG')

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

found = False

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

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

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

for x in range(A, B + 1):
    if x % 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(100000):

    if A <= K * i <= B:
        print ("OK")
        sys.exit()

print ("NG")

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

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


if __name__ == '__main__':
    main()

Solution (Python):
k = int(input())
a, b = map(int, input().split())
flg = False
for i in range(a, b+1):
    if i % k == 0:
        flg = True

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

K = INT()
A, B = MAP()

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')
        exit()
print('NG')

Solution (Python):
import sys
import math  
import bisect  
import queue  


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


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

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

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


if __name__ == '__main__':
    main()

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
from collections import defaultdict
from heapq import heappop, heappush

from decimal import *
































def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	K = inputInt()
	A,B = inputMap()

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

	print("NG")





def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv



def dfs(graph,parent,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)

if __name__ == "__main__":
	main()

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

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

Solution (Python):















mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def readInt():
    return list(map(int,input().split()))

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

if __name__=='__main__':
    main()

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

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

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

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

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

print('NG')

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

Solution (Python):
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")
        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):
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]
import sys

K = Int()
A,B = Ints()

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

Solution (Python):
def main():

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

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

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():
    import sys
    sys.setrecursionlimit(10 ** 6)
    input = sys.stdin.readline
    K = int(input())
    A, B = [int(x) for x in input().strip().split()]
    for i in range(A, B+1):
        if i % K == 0:
            print('OK')
            exit()
    print('NG')

if __name__ == '__main__':
    main()

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

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

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

print(ans)

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


if __name__ == '__main__':
    main()