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())
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 i in range(1000):
    if (i+1)%K==0 and (A <= (i+1) and (i+1) <= B) :
        print('OK')
        exit()
print('NG')

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

while a < max:
    if a % k == 0:
        n = 1
        break
    else:
        a += 1

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

Solution (Python):


import sys


def solve(K: int, A: int, B: int):
    for i in range(K, B + 1, K):
        if A <= i <= B:
            return True
    return False


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

    if solve(K, A, B):
        print('OK')
    else:
        print('NG')


if __name__ == '__main__':
    main()

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())
diff=b//k-(a-1)//k
print('OK') if diff>0 else print('NG')

Solution (Python):
import math

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

A = int(A)
B = int(B)

if A % K == 0 or B % K == 0:
	print('OK')
elif math.floor(B / K) - math.floor(A / K) >= 1:
	print('OK')
else:
	print('NG')

Solution (Python):
K = int(input())
A, B = list(map(int,input().split()))
ans = 'NG'
for i in range(1,1000):
    if i*K >= A and i*K <= B:
        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(0)
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):
def solve():
    K = int(input())
    A, B = map(int,input().split())
    k = B // K
    if k * K >= A:
        print("OK")
    else:
        print("NG")
    

if __name__ == '__main__':
    solve()

Solution (Python):
import math

k = int(input())
a,b = map(int, input().split())
print("OK" if math.floor(b/k) * k >= a else "NG")

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

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

Solution (Python):







def resolve(K, A, B):
    n, r = divmod(A, K)
    if r == 0 or K * (n+1) <= B:
        return True
    return False

if __name__ == '__main__':

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

    result = resolve(K, A, B)

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

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

for i in range(b+1):
    if a <= k*i and k*i <=b:
        print("OK")
        sys.exit()
print("NG")

Solution (Python):
k = int(input())
a, b = list(map(int, input().split()))
if b//k * k >= a:
    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())

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

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

Solution (Python):
s_K = input()
s_AB = input().split()
str = "NG"

K = int(s_K)
A = int(s_AB[0])
B = int(s_AB[1])

for w in range(A, B+1):
  if(w%K==0):
    str = "OK"
    break

print(str)

Solution (Python):
s_K = input()
s_AB = input().split()
str = "NG"

K = int(s_K)
A = int(s_AB[0])
B = int(s_AB[1])

for w in range(A, B+1):
  if(w%K==0):
    str = "OK"

print(str)

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):
x = int(input())
p, q = map(int, input().split())

ok = 0
for i in range(p, q+1):
    if i % x == 0:
        ok += 1
        break
if ok == 1:
    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()
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 = [int(i) for i in 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())
result = k
A,B = map(int,input().split())

for i in range(1,B+1):
    if(result < A):
        result += k
if result <= B:
    print("OK")
    exit(0)
print("NG")

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




if(a%k):
  x = int(a/k)*k+k
else:
  x = int(a/k)*k

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

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

result = []
for x in range(a,b+1):
    if x%k == 0:
        result.append(True)
    else:
        result.append(False)
if True in result:
    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"
        break

print(ans)

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 math

input1 = input()
kbai= int(input1)
 
input2=input().split(" ")
mins= int(input2[0])
maxs= int(input2[1])
flg=0
ans=0
tmp=0

tmp=math.floor(mins/kbai)
ans=tmp*kbai


while ans <= maxs:
  if ans >= mins and ans <= maxs:
    flg=1
  ans=ans+kbai

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

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

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

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

flug = 0

A = list(range(a, b+1))

for number in A:
    if number % k == 0:
        flug = 1
        
    else:
        continue

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

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

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

d = A // K
while 1:
    s = K * d
    if(s >= A and s <= B):
        print('OK')
        break
    elif(s > B):
        print('NG')
        break
    else:
        d += 1

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=count+1
  else:
    count=count
    
if count>0:
  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):
def Main(K, A, B):
    for i in range(A, B+1):
        if i%K == 0:
            return 'OK'
    return 'NG'

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

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

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

un = a/k
up = b/k


if un <= int(up):
    print('OK')
else:
    print('NG')

Solution (Python):

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

    if (a / k) <= int(b / k):
        print("OK")
    else:
        print("NG")

if __name__ == '__main__':
    q_a()

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

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

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

Solution (Python):
K = int(input())
s = input()
A = int(s.split(" ")[0])
B = int(s.split(" ")[1])
i = 1
mul = 1
while mul <= B:
    mul = i * K
    if A <= mul <= B:
        print("OK")
        break
    i = i + 1
else :
    print("NG")

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

nK = K
n = 1
ans = "NG"
while(nK<=B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)

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

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

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

for i in range(1, 1001):
    if a <= k*i and k*i <= b:
        print("OK")
        sys.exit()

print("NG")

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

ans = 0


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

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

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

Solution (Python):
from sys import stdin, stdout
import math
import bisect
import queue

k = int(stdin.readline().strip())
a, b = map(int, stdin.readline().strip().split())

flag = 0

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

stdout.writelines('OK\n' if flag == 1 else 'NG\n')

Solution (Python):
k = int(input())
l, r = map(int, input().split())

for i in range(l, r + 1):
    if (i % k == 0):
        print("OK")
        exit()
print("NG")

Solution (Python):


from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

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

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

count = 0

for i in range(1001):
    if((A <= (K*i)) & ((K*i) <= B)):
        count = 1


if(count == 0):
    print("NG")
if(count == 1):
    print("OK")

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

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

t = K
while t <= B:
  if A <= t:
    print('OK')
    exit()
  t += K
print('NG')

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

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

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

print("NG")

Solution (Python):
k=int(input())
s=input().split()
a=int(s[0])
b=int(s[1])
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())
m=b//k*k
if a<=m:
    print("OK")
else:
    print("NG")

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

if a <= b // K * K:
    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')
    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())

n = math.floor(b/k)

if n*k >= a and n*k <= b:
    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())

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

if (a//k < b//k) or (k==1) or (not(a%k) or not(b%k)):
    print("OK")
else:
    print("NG")

Solution (Python):
get = int(input())
ints = list(map(int, input().split(' ')))
count=0
while count<=ints[1]:
  count+=get
if count-get>=ints[0] and count-get<=ints[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
print('OK' if flag else '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):
k=int(input())
a,b=map(int,input().split())
if (b//k)*k>=a:
  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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
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 LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
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 = LI()
    for i in range(a,b+1):
        if i % k == 0:
            return 'OK'

    return "NG"


print(main())

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

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

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


while i < b:
    if k == 1:
        flag = True
        break
    dis = i * k
    if dis >= a and dis <= b:
        flag = True
        break

    i += 1


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

Solution (Python):







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

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

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

a=True
for i in range(1000):
    if int(A)<=i*int(K)<=int(B):
        print("OK")
        a=False
        break
if a==True:
    print("NG")

Solution (Python):
k = int(input())
a,b = [int(i) for i in input().split()]
print('OK' if a%k == 0 or b%k == 0 or a//k < b//k else 'NG')

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

print("OK" if len([q for q in range(A, B + 1) if not q % K]) else "NG")

Solution (Python):




import sys

input_k = input()
input_a_b = input()

k = int(input_k)
input_a, input_b = input_a_b.split()
a = int(input_a)
b = int(input_b)

xd = a // k 
xm = a % k  

if xm == 0:
    print('OK')
    sys.exit(0)

if b >= k * (xd+1):
    print('OK')
    sys.exit(0)

print('NG')
sys.exit(0)

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

S = B//K
T = B%K
U = B-A

if S >= 1:
  if T <= U:
    print("OK")
  else:
    print("NG")
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):
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):
def main():
    import sys
    input = sys.stdin.readline

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

    x = A//K

    y = B//K

    for i in range(A, B+1):
        if i % K == 0:
            print('OK')
            exit()
    if A == B and A % K == 0:
        print('OK')
        exit()
    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')
    break
else:
  print('NG')

Solution (Python):
K = int(input())
A, B = [int(_) for _ in input().split()]
if B%K == 0 or A%K == 0:
    print("OK")
elif B//K - A//K > 0:
    print('OK')
else:
    print('NG')

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

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

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

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

Solution (Python):
k = int(input())
k_under, k_over = map(int,input().split())

if (k_under // k + ((k_under % k != 0) * 1)) * k > k_over:
    print('NG')
else:
    print('OK')

Solution (Python):

import sys


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



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

if __name__ == '__main__':
    main()

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):


from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

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

        
        
if count >= 1:
    print("OK")
elif count == 0:
    print("NG")

Solution (Python):
k = int(input())
n,m = map(int,input().split())
for i in range(m-n+1):
  if (i+n)%k == 0:
    print("OK")
    exit()
print("NG")

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

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

Solution (Python):
def hoge(K, A, B):
    ans = 0
    for n in range(A, B+1):
        if n%K == 0:
            ans = 1
            return ans
    return ans

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

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

data = input().split()
a = int(data[0])
b = int(data[1])

largest = b //k * k
if largest >= a:
    print("OK")
else:
    print("NG")

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

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

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

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

Solution (Python):
K = int(input())
A, B = map(int, input().split())
judge = False;
count = 1
num = K * count
while num <= B:
  if A <= num and num <= B:
    judge = True
    break
  count += 1
  num = K * count
if judge:
  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())

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

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 'NG'
for i in range(A, B+1):
    if i % N == 0:
        ans = 'OK'
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    k = II()
    a, b = MI()

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


if __name__ == '__main__':
    solve()

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

tmp = B//K * K

if A <= tmp:
    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'
        break

print(ans)

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 = [int(i) for i in 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())
ans = 'NG'
for i in range(A, B + 1):
    if i % K == 0:
        ans = 'OK'
        break
print(ans)

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

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

Solution (Python):
from math import floor, ceil

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

if ceil(A / K) <= floor(B / K):
	print('OK')
else:
	print('NG')

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

result="NG"

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

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

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

Solution (Python):

"""
Created on Sat May  2 14:48:19 2020

@author: ab
"""

import sys


def isDivisible(num1,num2):
    return num1%num2 == 0

def search(n,m,k):
    if isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    for i in range(n,m):
        if isDivisible(i, k):
            return True
    return False
    
def solution(k,n,m):
    if k == 1:
        return True
    elif isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    elif k>m:
        return False
    else:
        return search(n,m,k)



input = sys.stdin
output = sys.stdout
while True:
    lineElements = input.readline().rstrip("/n").split(" ")
    if(lineElements[0] == ''):
        break;
    if len(lineElements) == 1:
        k = int(lineElements[0])
    else:
        n,m = lineElements
        n,m = int(n),int(m)
        if solution(k,n,m) == True:
            print("OK\n")
        else:
            print("NG\n")

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):
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().strip())
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 = map(int, input().split()) 
i = 0
while(1):
    i=i+1
    if i*k >= a and i*k <= b:
        print("OK")
        break
    elif i*k > b:
        print("NG")
        break

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


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):
a=int(input())
L,R = map(int,input().split())
b=L%a
if b==0:
  print('OK')
else:
  if L-b+a<=R:
    print('OK')
  else:
    print('NG')

Solution (Python):
from sys import exit

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








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

if B // K > A // K:
    print("OK")
else:
    print("NG")