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

i = A
while (i % K != 0) and (i <= B):
    i += 1

if i == B+1:
    print("NG")
else:
    print("OK")

Solution (Python):
K = int(input())
A, B = map(int, input().split())
for i in range(0, B+1, K):
    if i >= A:
        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):
x=int(input())
y=input()
z=y.split(" ")
a=int(z[0])
b=int(z[1])
over=0
multiples=[x*d for d in range(1000)]
for c in multiples:
    if(over==0):
        if(c>=a and c<=b):
            print('OK')
            over+=1
if(over==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):
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(i) for i in input().split()]

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

Solution (Python):
import math
K = int(input())
A, B = map(int, input().split())
largest = math.floor(B/K)*K
print("OK") if largest >= A else print("NG")

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

    for i in range(1, 1001):
        if A <= K*i <= B:
            print("OK")
            return
    print("NG")

if __name__ == "__main__":
    resolve()

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

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

if (A-1)//K == B//K:
  print("NG")
else:
  print("OK")

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

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

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

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

Solution (Python):
K = int(input())
A, B = map(int, input().split())
for i in range(1000):
  if A <= K*i <= B:
    print("OK")
    exit(0)
print("NG")

Solution (Python):
def solve():
    K = int(input())
    A,B = [int(i) for i in input().split()]
    qA,rA = divmod(A, K)
    qB,rB = divmod(B, K)
    if rA == 0 or rB == 0:
        print("OK")
    elif qB - qA > 0:
        print("OK")
    else:
        print("NG")

if __name__ == "__main__":
    solve()

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

Solution (Python):

def main():
    k = int(input())
    a, b = map(int, input().split())
    flg = False
    for i in range(a, b+1):
        if i % k == 0:
            print('OK')
            flg = True
            break
    if not flg:
        print('NG')


if __name__ == "__main__":
    main()

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

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

if a % k == 0:
    print("OK")
else:
    print("NG")

Solution (Python):
def main():
    n = int(input())
    s = list(map(int,input().strip().split()))

    if s[0] % n == 0 or s[1] % n == 0:
        print("OK")
        return 

    for nn in range(s[0], s[1]):
        if nn % n == 0:
            print("OK")
            return 
    print("NG")
    return

main()

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

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

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

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

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

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

print('NG')

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

Solution (Python):
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
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 make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors


k = ini()
a,b = inm()
ans = 'NG'
for i in range(1000):
    if a <= i * k <= b:
        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")
    break
else:
  print("NG")

Solution (Python):


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

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

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

for i in range(A,B+1):

  if i%K == 0:
    flag += 1
    print("OK")
    break
if flag == 0:
  print("NG")

Solution (Python):

K = int(input())
A, B = map(int, input().split())
if K == 1:
    print('OK')
else:
    print(['NG', 'OK'][(B % K) <= (B - A)])

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

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

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

Solution (Python):
import sys

k = int(input())

a,b = list(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(1001):
    if a<=(i*k)<=b :
        ans = "OK"
print(ans)

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

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

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

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(1000 // k + 1):
    if a <= i * k <= b:
        ans = 'OK'
        break

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):
k=int(input())
a,b=map(int,input().split())
x=0
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())
while a <= b:
    if a % k == 0:
        print('OK')
        exit()
    a += 1
print('NG')

Solution (Python):

K = int(input())
X = list(map(int,input().split()))
if (X[0] // K + 1) * K <=  X[1] or X[0] % 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 = [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):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    k = int(input())
    a, b = map(int, input().split())
    for i1 in range(a, b + 1):
        if i1 % k == 0:
            print('OK')
            sys.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")
        break
else:
    print("NG")

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

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

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

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

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

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

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

answer = k - (score[0] % k)
if score[0]%k == 0:
    print('OK')
elif answer + score[0] <= score[1]:
    print('OK')
else:
    print('NG')

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

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

Solution (Python):
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools

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, a, b = map(int, open(0).read().split())
print("OK" if b // k * k >= a else "NG")

Solution (Python):
K=int(input())
ans = False
M,N = map(int,input().rstrip().split(" ")) 

for number in range(M,N+1):
    if number%K==0:
        ans = True
if ans:
    print("OK")
else:
    print("NG")

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

flag = False

if a <= int(b / k) * k:
  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'
print(result)

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

print("OK" if flag 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')
        exit(0)

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 K == 1:
    print('OK')
elif B - (B % K) >= A:
    print('OK')
else:
    print('NG')

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

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

if int((a-1)/k + 1)*k <= b:
    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, 1):
	if i % k == 0:
		flag = flag + 1
		break

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

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

Solution (Python):
K = int(input())
[A,B] = list(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().rstrip())
distance_range = list(map(int,input().split()))
if (distance_range[1]//K)*K >= distance_range[0]:
    print("OK")
else:
    print("NG")

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

b=list[0]//a
c=list[1]//a

if list[0]%a==0:
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")

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

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

if a <= k <= b or k <= b/2:
    print('OK')

else:
    print('NG')

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

Solution (Python):
x = int(input())
a, b = map(int, input().split())
print((b // x) * x >= a and "OK" or "NG")

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

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

Solution (Python):
k= int(input())
a, b= input().split()
a= int(a)
b= int(b)
cont=0
while 1:
    cont+= k
    if a<= cont <= b:
        print("OK")
        break
    if cont > b:
        print("NG")
        break

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

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

n = 1
while True:
    m = K * n
    if A <= m <= B:
        print('OK')
        sys.exit()

    if n == B:
        break

    n += 1

print('NG')

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

x = 1000//K

for n in range(x+1):
    if (n * K >= A) and (n * K <= B):
        print('OK')
        break
    if n == x:
        print('NG')

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

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

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

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

Solution (Python):
K = int(input())
tmp = input().split(" ")
A = int(tmp[0])
B = int(tmp[1])

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

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

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

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

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

print("NG")

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

Solution (Python):
import math 

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

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

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

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

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

Solution (Python):
k = int(input())
a, b = list(map(int, input().split()))
p = 0
while p <= 1000:
    if a <= p <= b:
        print("OK")
        exit()
    p += k
print("NG")

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

s = a//k
t = b//k
if s != t:
    ans = True
elif a % k == 0:
    ans = True
else:
    ans = False

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

Solution (Python):
n = int(input())
low, high = map(int,input().split())
for i in range(low, high + 1):
    if i % n == 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):


def main():

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

    numA = (A - 1) // K
    numB = B // K

    if numB - numA > 0:
        ans = 'OK'

    else:
        ans = 'NG'

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):


























































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    K = int(lines[0])
    A, B = list(map(int, lines[1].split()))
    
    
    
    
    
    
    
    

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

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['7', '500 600']
        lines_export = ['OK']
    if pattern == 2:
        lines_input = ['4', '5 7']
        lines_export = ['NG']
    if pattern == 3:
        lines_input = ['1', '11 11']
        lines_export = ['OK']
    if pattern == -1:
        lines_input = ['1000', '1000 1000']
        lines_export = ['OK']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if FLAG_LOG:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')



if __name__ == '__main__':
    main()

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

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

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

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

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

largest = b // k * k

if (largest < a):
    print("NG")
else:
    print("OK")

Solution (Python):





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

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

print("NG")

Solution (Python):
K=int(input())
A,B=map(int,input().split())
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())
q, mod = divmod(A, K)
if mod == 0:
    print("OK")
elif K*(q+1) <= B:
    print("OK")
else:
    print("NG")

Solution (Python):
import sys
import itertools


def resolve(in_):
    k = int(next(in_))
    a, b = map(int, next(in_).split())
    for v in range(a, b + 1):
        if not v % k:
            return 'OK'
    
    return 'NG'


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

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

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

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

if not ( 1 <= K <= 1000 ): sys.exit()
if not ( 1 <= A <= 1000 and A <= B <= 1000 ): sys.exit()

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

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

print("NG")

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

ans = 1

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

if ans:
    print('NG')

Solution (Python):

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

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

Solution (Python):
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
print("NOGK"[ans::2])

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

import math

if math.floor(b/k)-math.ceil(a/k)>=0:
  print('OK')
else:
  print('NG')

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

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

print(ans)

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

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

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

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

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

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

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



x = B-B%K
if x >= 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:
    if i == b:
      print('NG')
  else:
    print('OK')
    break

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

can_K_times = False
if (A % K) == 0 or (B % K) == 0:
    can_K_times = True
elif (A // K) != (B // K):
    can_K_times = True


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

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

print('OK' if B//K - (A - 1)//K > 0 else 'NG')

Solution (Python):
K = int(input())
count = 0
number = K
A, B = map(int, input().split())
while number < A:
    count += 1
    number = K * count

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

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

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

x = math.floor(A/K)
y = math.floor(B/K)

if y-x > 0:
    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 = list(map(int, input().split()))

n = a//k
ans = n * k
while ans <= b:
  if a <= ans <= b:
    exit(print('OK'))
  else:
    n += 1
    ans = k * n

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

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

print(ans)

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

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

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

K = int(input())
A, B = (int(x) for x in input().split())
num=0
while B>=num:
  num+=K
  if A<=num and num<=B:
    print("OK")
    sys.exit(0)
print("NG")

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

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

if (int(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'
    break

print(ans)

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