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



from pprint import pprint as pp
from pprint import pformat as pf

def solve():
    k = int(input())
    a, b = map(int, input().split())
    v = k
    while not (v > b):
        if a <= v <= b:
            print("OK")
            return 0
        v += k
    print("NG")
    return 0


if __name__ == '__main__':
    solve()

Solution (Python):
k=int(input())
flag=0
ab=list(map(int, input().split()))
i=0
while ab[1]-ab[0]+1-i>0:
  if (ab[0]+i)%k==0:
    flag=1
    print("OK")
    break
  i=i+1
if flag==0:
  print("NG")

Solution (Python):
N = int(input())
A=input().split()

s=int(A[0])//N
if int(A[0])%N==0:
    print('OK')
else:
    if (s+1)*N>int(A[1]):
        print('NG')
    else:
        print('OK')

Solution (Python):
k = int(input())
a, b = map(int, input().split())
i = k
count = 0
while k <= 1000:
    if (k >= a) and (k <= b):
        count += 1
        print('OK')
        exit()
    k += i
if count == 0:
    print('NG')

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

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

if B-A>=K-1:
    print("OK")
elif A%K > B%K:
    print("OK")
elif A%K==0 or B%K==0:
    print("OK")
else:
    print("NG")

Solution (Python):


k = int(input())


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

if k==1:
    print("OK")
elif a%k == 0:
    print("OK")
elif abs(a-b) + a%k >= k:
    print("OK")


else:
    print("NG")

Solution (Python):
import math

k = int(input())
a, b = (int(x) for x in input().split())
outa = math.floor(a / k)
outb = math.floor(b / k)
if outb == 0:
    print("NG")
elif outa == outb and a != b and outa != a / k:
    print("NG") 
else:
    print("OK")

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

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

Solution (Python):
K=int(input())
A,B=map(int,input().split())
x=A
while x<=B:
  if x%K==0:
    print('OK')
    break
  else:
    x+=1
if x==B+1:
  print('NG')

Solution (Python):
check = False
n = int(input())
num = list(map(int, input().split()))
while num[0] <= num[1] and check != True :
    if(num[0]%n==0):
        check=True;
    num[0] += 1
if(check):
    print("OK")
else:
    print("NG")

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

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

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

print('NG')

Solution (Python):
K = int(input())
A, B = (int(x) for x in input().split())
if A == B:
  if A%K == 0:
    print("OK")
  else:
    print("NG")
else:
  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())

sa = B - A 
flag = 0

for i in range(sa+1):
	if (A+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())

flg = 0
ans = A

while ans <= B:
    if ans % K ==0:
        flg = 1
        break
    ans = ans +1


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

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

print(
    "OK" if any([ x % K == 0 for x in range(A, B + 1) ])
    else "NG"
)

Solution (Python):
import math

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

flg = False
for i in range(1000):
    x = i * K
    if A <= x and x <= B:
        flg = True

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

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

k = int(K)
a = int(A)
b = int(B)

p = "NG"
for i in range(1000):
    kk = k * i
    if (kk >= a and kk <= b) or k == 1:
        p = "OK"



print(p)

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

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

for i in range(1000):
    t = k * i
    if t >= a and b >= t:
        print("OK")
        break
    elif b < t:
        print("NG")
        break
    else:
        pass

Solution (Python):

K = int(input())

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

boolean = False

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

if(not boolean):
  print("NG")

Solution (Python):
import sys

K = int(sys.stdin.readline().strip())
A, B = map(int, sys.stdin.readline().strip().split())
for n in range(A, B+1):
    if n % K == 0:
        print("OK")
        sys.exit()
print("NG")

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

i = list(map(int, input().split()))


x = 0
for n in range(i[0], i[1]+1):
  if n % k == 0:
    print("OK")
    x = 1
    break
if x == 0:    
  print("NG")

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

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

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

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

num = b // k

n = num * k
if ((a <= n) and  (k <= n)):
    print('OK')
else:
    print('NG')

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

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

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

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

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

count = 0

for i in range(1, 1001):
    if k * i >= a and k * i <= b:
        print('OK')
        count = 1
        break

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

Solution (Python):
tmp = input().split()
K = int(tmp[0])

tmp = input().split()
A = int(tmp[0])
B = int(tmp[1])
flag = 0

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

    def dump(*args):
        sys.stderr.write(str(args))

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


if __name__ == '__main__':
    main()

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

Solution (Python):

K = int(input())

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

L = A // K
M = B // K

if L * K == A or M * K == B :  
    print("OK")

elif A <= (L+1)*K and (L+1) * K <= B:
    print("OK")

else:
    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):
row1 = input()
row2 = input()
k = int(row1)
a = int(row2.split(' ')[0])
b = int(row2.split(' ')[1])
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=0

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

if a>0:
    print('OK')
else:
    print('NG')

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

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

print(res)

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

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

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

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

cnt = 1
while cnt <= 1000:
    if K * cnt >= A and K * cnt <= B:
        print('OK')
        exit()
    cnt += 1
print('NG')

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

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

vala = A//N
valb = B//N
if vala != valb or A%N == 0 or B%N == 0:
    print('OK')
elif A == B and N == 1:
    print('OK')
else:
    print('NG')

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

if b % k <= b-a:
    print('OK')
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')
        cnt += 1
        break

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

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

c = b // k
d = k*c

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

Solution (Python):
aim = int(input())
min, max = map(int, input().split(' '))
if (max // aim) - (min // aim) >= 1:
    print('OK')
elif min % aim == 0 or max % aim == 0:
    print('OK')
else:
    print('NG')

Solution (Python):
K = int(input())
A,B = map(int,input().split())
success = False
for i in range(A,B+1):
   if i%K==0:
      success = True
      break

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

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


for i in range(1000):
    if B >= i * K >= A:
        print("OK")
        break
    elif i*K > B:
        print("NG")
        break

Solution (Python):
import sys
K = int(input())
A, B = [int(x) for x in input().split()]
for i in range(A, B+1):
  if i%K == 0:
    print("OK")
    sys.exit()
print("NG")

Solution (Python):
X = int(input())
A,B = map(int, input().split())
F = 0

for i in range(A, B+1, 1):
  if i % X == 0:
    print("OK")
    F =+ 1
    break
if F == 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:
        count += 1
    else:
        continue
if count != 0:
    print("OK")
else:
    print("NG")

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

Solution (Python):
T = int(input())
A,B = map(int, input().split(' '))
k = B // T
if T*k >= A:
    print("OK")
else :
    print("NG")

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

if a%K == 0:
    print('OK')
elif (a//K+1)*K <= b:
    print('OK')
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")
        cnt += 1
        break
if(cnt == 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"
        break

print(ans)

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

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

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

ans = B // K 
ans1 = ans * K

if (ans1 >= A and ans1 <= B):
  print('OK')
else:
  print('NG')

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


if __name__ == '__main__':
    q1()

Solution (Python):
import math
k = int(input())
s, t = [int(i)/k for i in input().split()]

if math.ceil(s) <= math.floor(t):
  print('OK')
else:
  print('NG')

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

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

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

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

Solution (Python):

import sys


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

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

    a = A // K

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

    return



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

if __name__ == '__main__':
    main()

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

Solution (Python):
def solve(k, a, b):
    for x in range(a, b+1):
        if x % k == 0:
            return "OK"

    return "NG"


if __name__ == '__main__':
    k = int(input())
    a, b = map(int, input().split())
    res = solve(k, a, b)
    print(res)

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

i = b//a
ans = "NG"
n = a*i
while n <= c:
    if n >= b:
        ans = "OK"
        break
    i +=1
    n = a*i
print(ans)

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

if len(set(range(0,1001,k)) & set(range(a,b+1))) >= 1:
    print('OK')
else:
    print('NG')

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")
    break
else:
  print("NG")

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

Solution (Python):
from sys import stdin


def get_result(data):
    K = data[0][0]
    A, B = data[1]
    if A % K == 0 or B % K == 0:
        return 'OK'
    else:
        if (A // K) == (B // K):
            return 'NG'
        else:
            return 'OK'


if __name__ == '__main__':
    raw_data = [val.rstrip() for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

Solution (Python):
import math 
k = int(input())
l = list(map (int, input().strip().split()))
a = l[0]
b = l[1]
if ((b//k) > (a//k)) or (b%k==0 or a%k==0):
    print('OK')
else:
    print("NG")

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

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

Solution (Python):
import math

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


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

Solution (Python):
K = int(input())
i = list(map(int, input().split()))
count =i[0]
for num in range(i[0],i[1]+1):
  if num % K == 0:
    print('OK')
    break;
  else:
    count += 1    
if count > i[1]:
  print("NG")

Solution (Python):
K = int(input())
A, B = map(int, input().split( ))
Res = int(A)
M = 0
while Res <= B:
    if Res % K == 0:
        print("OK")
        M = 1

        break
    Res += 1

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

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

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

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

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

else:
    print("NG")

Solution (Python):
K = int(input())
a, b = map(int, input().split())
k = K
for i in range(1, 1001):
  if a <= k <= b:
    print('OK')
    break
  else:
    k = K*i
    if k > b:
      print('NG')
      break

Solution (Python):
import math
K = input()
AB = input().split()

K = int(K)
A = int(AB[0])
B = int(AB[1])

if B//K >= -(-A//K):
    print('OK')
else:
    print('NG')

Solution (Python):
in1 = int(input())
in2, in3 = map(int,input().split())


for i in range(in2, in3+1):
  if i % in1 == 0:
    print("OK")
    break
  elif i == in3:
    print("NG")

Solution (Python):
k=int(input())
a,b =map(int,input().split())
for i in range(1,(a//k)+2):
    if a <= i*k and i*k <=b:
        print("OK")
        exit()
print("NG")

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

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

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

Solution (Python):
K=()
A=()
B=()

K=int(input(""))
A, B = map(int, input().split())
V=False
C=K
D=B+1

for i in range(0,D):
      K=C*i
      if K>=A and K<=B:
            V=True
            break
      else:
            V=False

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

Solution (Python):



input_a = input()
input_b = input()
k = int(input_a)
a = int(input_b.split(" ")[0])
b = int(input_b.split(" ")[1])


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

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

for i in range(1, 1000):
  if a<= (i* k) <= b:
    print("OK")
    break
  elif (i* k) > b:
    print("NG")
    break
else:
    print("NG")

Solution (Python):
import math

def main():
    K=int(input())
    (A,B)=[int(x) for x in input().strip().split()]
    if A % K == 0:
        print('OK')
    elif math.ceil(A/K)*K <= B:
        print('OK')
    else:
        print('NG')
 
if __name__ == '__main__':
    main()

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

if li[1]<math.ceil(li[0]/a)*a:
    print("NG")
else:
    print("OK")

Solution (Python):


def main():
    K = int(input())
    A, B = [int(x) for x in 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=(int(x) for x in input().split())
if K-(A%K)<=B-A or A%K==0:print('OK')
else:print('NG')

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

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
k = int(input())
a, b = map(int, input().split())
if (k <= (b-a)):
    print("OK")
else:
    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())
i = A
chack = 0

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

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

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

kk = a // k
kk = k*kk

while(kk <= 1000):
    if(kk <= b and kk >= a):
        print("OK")
        exit()
    
    kk = kk + k
    

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")
        break
else:
    print("NG")

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

for i in range(1000):
    if a <= k*i <= b:
        print("OK")
        break
else:
    print("NG")

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

Solution (Python):
def golf(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(golf(K, A, B))
    
if __name__ == "__main__":
    main()

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

c = a//k
d = b//k

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

Solution (Python):
K = int(input())
A, B = tuple(int(x) for x 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())
c = b//k
ans=0
 
for i in range(c+1):
    i += 1
    ans = i*k
    if a<= ans <=b:
        print("OK")
        break
    else:
        ans = -1
 
if ans == -1:
    print("NG")

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

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

Solution (Python):
import sys

input = sys.stdin.readline

N = int(input())
A,B = map(int,input().split())
for i in range(A,B+1):
    if i%N == 0:
        print('OK')
        sys.exit(0)
print('NG')

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

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

(a, b) = [int(s) for s in input().split()]

v = range(n, 1001, n)

v = [i for i in v if a <= i <= b]

ans = 'OK'

if len(v) == 0:
    ans = 'NG'

print(ans)

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):
a = int(input())
b = input().split(" ")
if int(b[0]) % a == 0:
    print("OK")
elif int(b[1]) % a == 0:
    print("OK")
elif int(b[0]) // a * a + a > int(b[1]):
    print("NG")
else:
    print("OK")

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

ok_flag = False
value = K

while value <= B:
    if value >= A and value <= B:
        ok_flag = True
        break
    value += K

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

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

con = (a // k + 1) * k

if(con >= a and b >= con):
    print('OK')
elif(a % k == 0):
    print('OK')
else:
    print('NG')

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

Solution (Python):
def main():
    k = int(input())
    inputs = input().split(' ')
    start = int(inputs[0])
    end = int(inputs[1])
    
    if start == end:
        if start % k == 0:
            print('OK')
        else:
            print('NG')

    else:
        if (start % k == 0) or (end % k == 0):
            print('OK')
        else:
            if (end - start) >= k:
                print('OK')
            else:
                for i in range(start, end):
                    if i % k == 0:
                        print('OK')
                        break
                    elif i == end - 1:
                        print('NG')
                        break
                    else:
                        pass

if __name__ == '__main__':
    main()

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

for i in range(1, 1001):
    if a <= (k * i) <= b:
        break
    else:
        count += 1

if count == 1000:
    print("NG")
else:
    print("OK")

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

Solution (Python):

from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


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


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


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    k = I()
    a, b = LI()
    flag = False
    if k == 1:
        print(
            'OK'
        )
        exit()
    for i in range(a, b+1):
        if i % k == 0:
            flag = True
    if flag == True:
        print('OK')
    else:
        print('NG')
    return



if __name__ == "__main__":
    solve()

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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import defaultdict
from sys import exit
import math


def main():
    k = getN()
    a,b = getList()
    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())
arr = list(map(int, input().split()))
a = arr[1] % K
b = arr[1] - arr[0]
if a <= 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())
while a<=b:
    if(a%k==0):
        print("OK")
        break
    elif a==b:
        print("NG")
        break
    else:
        a += 1

Solution (Python):
k = int(input())
a, b = map(int, input().split())
bmod = b % k
if a % k == 0 or a % k == 0:
    print("OK")
    exit()

if bmod < b - a:
    print("OK")
    exit()

print("NG")

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

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

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

Solution (Python):
k = int(input())
a,b = map(int, input().split())
s = 0
z = b - a + 1



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

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

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

t = (b//k)*k

if t <= b and a <= t:
    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())
c =0
for i in range(1,int(b/k)+1):
    if a <= i*k <= b:
        c = 1
        break
if c ==1:
    print('OK')
else:
    print('NG')

Solution (Python):
from copy import copy, deepcopy
from collections import Counter
from math import sqrt

MOD = 10**9 + 7
K = int(input())
A, B = list(map(int, input().split()))
flag = 0
for i in range(B-A+1):
    if (A+i) % K == 0:
        flag = 1
        break

if flag == 0:
    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(0)

print('NG')

Solution (Python):
k = int(input())
a, b = map(int,input().split())
n = 1
ans = "NG"
while (k*n) <= b:
    if (k*n) >= a and (k*n) <= b:
        ans = "OK"
        break
    n += 1
print(ans)

Solution (Python):
if __name__ == "__main__":
    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
            break
    if flag:
        print('OK')
    else:
        print('NG')

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

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

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

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

res = "NG"

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

print(res)

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

if K <= B and (A%K == 0 or B%K == 0 or (B/K - A/K) >= 1):
	print 'OK'
else:
	print 'NG'

Solution (Python):
a=int(input())
x,y = map(int,input().split())
count = 0

for i in range(x, y + 1):
    if i % a == 0:
        count += 1

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

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

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