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

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

if __name__ == '__main__':
    main()

Solution (Python):
from sys import exit

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

if __name__ == '__main__':
    main()

Solution (Python):
from sys import exit

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


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

Solution (Python):
k = int(input())
a,b = map(int,input().split())
nextk = a-a%k+k

if nextk <= b or a%k == 0 or k == 1:
    print('OK')
else:
    print('NG')

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

Solution (Python):
K=int(input())
f=input().split()
A=int(f[0])
B=int(f[1])
a="NG"
for i in range(int(B/K)+1):
  if A<=K*i<=B:
    a="OK"
print(a)

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

x = B // K * K

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

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

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

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

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

Solution (Python):

import math
import sys
input = sys.stdin.readline


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

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

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


if __name__ == '__main__':
    main()

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

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

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

flg = 0

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

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

Solution (Python):
from sys import stdin

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


flag=0
K_temp=K
while(True):
    if(K_temp>B):
        break
    if(K_temp>=A and K_temp<=B):
        flag=1
        break
    else:
        K_temp+=K

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

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

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

takahashikun = [i for i in range(A, B+1)]
for i in takahashikun:
    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())

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

Solution (Python):
from math import sqrt,ceil,floor
def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())

k=ii()
a=li()
a1=ceil(a[0]/k)*k
if(a1<=a[1]):
    print("OK")
else:
    print("NG")

Solution (Python):
from math import sqrt,ceil,floor
def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())

k=ii()
a,b=mi()
a1=ceil(a/k)*k
if(a1<=b):
    print("OK")
else:
    print("NG")

Solution (Python):
k=int(input())
x,y = map(int, input().split())

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

Solution (Python):
K = int(input())
A,B = map(int,input().split())
T = 0
c = K
while c <= B:
  if A <= c:
    T = 1
    break
  else:
    c +=K

if T == 0:
  print("NG")
else:
  print("OK")

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    k = ii()
    a,b = mi()
    tmp = 0
    while tmp < b+1:
        if tmp>=a:
            print('OK')
            exit()
        tmp+=k

    print('NG')




main()

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

x = b // k - (a-1) // k

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

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

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

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

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


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

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

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

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

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

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

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

Solution (Python):
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[1]
rem=(a%n)
left=n-rem
if b>=(left+a) :
    print("OK")
elif a%n ==0 or b%n==0:
    print("OK")
else :
    print("NG")

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

Solution (Python):


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

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

Solution (Python):

import sys

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

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

print("OK" if a <= b//k*k else "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())
x = [int(i) for i in input().split()]
A = x[0]
B = x[1]
if B//K - A//K >= 1 or (A%K == 0) or (B%K==0 ):
    print('OK')
else : print('NG')

Solution (Python):
import sys; input = sys.stdin.buffer.readline
from collections import defaultdict
con = 10 ** 9 + 7

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

def main():
	K = int(input())
	A, B = getlist()
	for i in range(1001):
		if A <= K * i and K * i <= B:
			print("OK")
			return

	print("NG")
	


if __name__ == '__main__':
	main()

Solution (Python):


k = int(input())

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

d = a % k
e = k - d

if (a % k == 0) or ((a + e) <= 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()

print("NG")

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

c = 1
result = False

while not result:
  if a <= c*K and c*K <= b:
    result = True
  elif c*K > b:
    break
  c += 1

if result == True:
  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:
        print('OK')
        exit()
print(ans)

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

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

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

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

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

K = ri()
A, B = rl()

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

Solution (Python):
k=int(input())
suzi_list=input().split()
a=int(suzi_list[0])
b=int(suzi_list[1])
c=(b//k)*k
if a<=c:
  print('OK\n')
else:
  print('NG\n')

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

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

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

if b <= (c//a)*a:
    print('OK')
else:
    print('NG')

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    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 = list(map(int,input().split()))
print('OK' if a <= ( b // k * k) else 'NG')

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

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

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

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

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

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

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

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

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

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

if b - b%k >= a:
    print('OK')
else:
    print('NG')

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

msg = 'NG'

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

print(msg)

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

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

while n1 < b:
  if (a <= n1):
    break
  else:
    n1 += n

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

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

a = int(A/K)
if A <= (a+1)*K <= B or A <= a*K <=B:
    print('OK')
else:
    print('NG')

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

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

golf(a,b,k)

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 = list(map(int, input().split()))

i = int(a/k)
flag = False

while k*i <= b:
    if k*i >= a and k*i <= b:
        flag = True
    i += 1
        
if flag:
    print("OK")
else:
    print("NG")

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

print('NG')

Solution (Python):
from math import *
k=int(input())
a,b =map(int,input().split())
m=0
while a<=b :
    if a%k==0:
        m=1
        break
    a=a+1
if m==1:
    print("OK")
else :
    print("NG")

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

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

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

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

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

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

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

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

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

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

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

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


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

print(answer)

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):
from sys import setrecursionlimit, exit
setrecursionlimit(1000000000)

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

main()

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

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

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


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


def main():

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


if __name__ == '__main__':
    main()

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

Solution (Python):
k=int(input())
a,b=map(int,input().split())
print('NOGK'[a//k<b//k or a%k<1::2])

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

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

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

if count == 0:
    print('NG')

Solution (Python):
import math

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

if a <= (math.floor(b/K) * K):
    print('OK')
else:
    print('NG')

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

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

print('NG')

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

Solution (Python):


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

div = a / float(k)

import math

if math.ceil(div) * k <= b:
    print('OK')
else:
    print('NG')

Solution (Python):
def main():
    K = int(input())
    A, B = map(int, input().split())
    div = A // K
    rem = A % K
    if rem == 0:
        flag = True
        print('OK')
    else:
        val = div * K + K
        if val <= B:
            print('OK')
        else:
            print('NG')

if __name__ == '__main__':
    main()

Solution (Python):




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

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

for _ in range(b-a+1):
    if a%k==0:
        flag = True
        break

    else:
        a += 1

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

for i in range(1001):
    if A <= K*i <= B:
        print('OK')
        break
    if B<K*i:
        print('NG')
        break

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

Solution (Python):
k=input()
a,b=input().split()
c=int(a)
d=int(b)
l=int(k)
e=d-d%l
if e>=c:
  print('OK')
else:
  print('NG')

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

m=A//K*K

if m<A:
  m+=K
if m>=A and m<=B:
  print("OK")
else:
  print("NG")

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

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

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


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

Solution (Python):


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

Solution (Python):
K = int(input())
A,B = map(int,input().split())
C = "NG"
if A%K == 0:
    C = "OK"
else:
    if A//K != B//K:
        C = "OK"

print(C)

Solution (Python):
k = int(input())
a,b = map(int,input().split())
ls = list()
for i in range(1,b+1):
  if a <= i*k and i*k <= b:
    ls.append(1)
  else:
    ls.append(0)

print('OK' if sum(ls) > 0 else 'NG')

Solution (Python):
K = int(input())
A,B = map(int,input().split())
flg = 'NG'
cnt = 1
while True:

    if K * cnt > B:
        break
    if A <= K * cnt and K * cnt <= B:
        flg = 'OK'
    cnt += 1
print(flg)

Solution (Python):
import sys
import os
import math
import bisect
import collections

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

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

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

rb = b % a
if ((a - rb) % a) <= c - b:
    print("OK")
else:
    print("NG")

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

print('OK' if b//k*k >= a else 'NG')

Solution (Python):


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

for i in range(1,b+1):
    if((k * i >= a) and (k * i <= b)):
        flag = True
        break

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

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

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

while A<=B:
  if A%K == 0:
    print('OK')
    exit()
  A += 1

print('NG')

Solution (Python):




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

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


if __name__ == "__main__":
    main()

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

Solution (Python):
from collections import defaultdict

import sys
sys.setrecursionlimit(10**6)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    k=ii()
    a,b=mis()
    x=b//k-(a-1)//k
    print('OK' if x>0 else 'NG')

if __name__ == "__main__":
    main()

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

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

print("NG")

Solution (Python):
k = int(input())
a, b = map(int, input().split())
chk = False
for i in range(a, b+1):
    if i%k == 0:
        chk = True
        break
    else:
        pass
if chk == True:
    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):
n = int(input())
a, b = map(int, input().split())
for i in range(a, b + 1):
  if i % n == 0:
    print("OK")
    quit()
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):
def solve(k, a, b):
    return "OK" if ((a // k != b // k) or (a % k == 0)) else "NG"

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

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

for i in range(1000):
    if K * i > B:
        break
    if K * i >= A and K *i <= B:
        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())

res = [i for i in range(A,B+1) if i%K==0]

if res == []:
  print('NG')
else:
  print('OK')

Solution (Python):
import numpy as np
import math
k = int(input())
a, b = map(int,input().split())
ans = False
for i in range(a,b+1):
    if i%k == 0:
        ans = True
        break

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

Solution (Python):
k=int(input())
a,b=map(int,input().split())
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 A // K != B // K or A % K == 0 else "NG")

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

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

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

res = [i for i in range(A,B+1) if i%K==0]

if res == []:
  print('NG')
else:
  print('OK')

Solution (Python):
import sys

k, a, b = map(int, sys.stdin.read().split())

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

if __name__ == '__main__':
    main()

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

Solution (Python):

import sys
input = sys.stdin.readline

k = int(input())

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

s = a // k 

if s * k == a:
    print('OK')

elif (s+1) * k <= b:
    print('OK')

else:
    print('NG')

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

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

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

aa=a-a%k
ans=False
while aa<=b:
    if a<=aa<=b:
        ans=True
        break
    aa+=k
if ans:print("OK")
else:print("NG")

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

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

is_ok = False

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

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