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

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


if __name__ == '__main__':
    inputs = read()
    print("{}".format(solve(*inputs)))

Solution (Python):


K = int(input())

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

check = 0
for i in range(int(1000/K) ):
    if K*(i+1)>=A and K*(i+1) <= B:
        print('OK')
        check = 1
        break
if check == 0:
    print('NG')

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

if ans1 == a/k:
    print("OK")
elif ans2 == b/k:
    print("OK")
elif ans1 < ans2:
    print("OK")
else:
    print("NG")

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

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

a=(a-1)//k
l=k*(a+1)

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

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

Solution (Python):


import sys





















def main():
    mod = 1000000007                
    inf = float('inf')              
    inf = 2 ** 64 - 1               
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    k = ii()
    a, b = mi()
    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())
c = 1 
for i in range(A,B+1):
    if i % K == 0: 
        print("OK")
        c = 0
        break

if not c == 0:
    print("NG")

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

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

for i in range(1,1001):
  k=K*i
  if A<=k and k<=B:
    print('OK')
    exit()
print('NG')

Solution (Python):
import math

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

n = math.ceil(A / K)

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

Solution (Python):
k = int(input())
a, b = map(int, input().split())
flag = False
i = 1
while i*k <= b:
    if a <= i*k and i*k <= b:
        flag = True
        break
    i += 1

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

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

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

print("NG")

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

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

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

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

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

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

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

print(res())

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

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

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

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

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

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

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

for cnt in range(A,B+1):
    if cnt%k == 0:
        print("OK")
        break
    elif cnt == B and cnt%k != 0:
        print("NG")
        break

Solution (Python):









def main():
    K, A, B = map(int, open(0).read().split())
    a = 'NG'
    for i in range(A, B + 1):
        if i % K == 0:
            a = 'OK'
    print(a)
if __name__ == "__main__":
    main()

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

if (B-A) >= K:
  print("OK")
  c = 1
else:
  for i in range(K):
    if ( A + i ) <= B:
      if ( A + i ) % K == 0:
        print("OK")
        c = 1
        break
if c == 0:
  print("NG")

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

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

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

flag = 0

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

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

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

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

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

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

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

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

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

Solution (Python):
k = int(input())
a, b = list(map(int, input().split()))
flg = "NG"
for i in range(a, b + 1):

    if i >= k and i % k == 0:
        flg = "OK"
        break

print(flg)

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

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

Solution (Python):
n = int(input())
l = list(input().split(" "))
a = int(l[0])
b = int(l[1])
if a%n != 0:
  if b%n != 0 and a//n == b//n:
    print("NG")
  else:
    print("OK")
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
    else:
        continue
if A==B and A%K==0:
    flag = True
if flag:
    print('OK')
else:
    print('NG')

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

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

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

s = "NG"
value = k
while(value <= b):
    if(a <= value and b >= value):
        s = "OK"
    value += k
print(s)

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

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

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

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

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

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

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

Solution (Python):
K=int(input())
A,B=list(map(int,input().split()))
c=K
while c<=B:
  if c>=A and c<=B:
    print("OK")
    break
  else:
    c += K
else:
  print("NG")

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

Solution (Python):


def main():
    K = int(input())
    a = list(map(int, input().split()))
    A = a[0]
    B = a[1]
    for i in range(A, B + 1, 1):
        if i % K == 0:
            print("OK")
            exit()
    print("NG")


if __name__ == '__main__':
    main()

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

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

Solution (Python):
num = int(input())
min,max = map(int,input().split())

count = 0

for i in range(min,max+1):
    if i%num == 0:
        None
    else:
        count += 1

if count == max-min+1:
    print("NG")
else:
    print("OK")

Solution (Python):

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

ans = ( A[1]//K ) - ( A[0]//K ) 


if ( A[0]%K==0 or A[1]%K==0 ):
  print("OK")
elif ( ans>0 ):
  print("OK")
else:
  print("NG")

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

k = math.ceil(a/k)*k

print("OK" if a<=k and 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')
    break
  if i == B:
    print('NG')
    break

Solution (Python):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

K = intinp()
A, B = mapint_inp()

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

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


if all(N%K!=0 for N in range(A, B+1)):
  print("NG")
    
else:
  print("OK")

Solution (Python):


def solve():
    mult = (a // k + int(a % k > 0)) * k
    if a<= mult <=b:
        print("OK")
    else:
        print("NG")

    return


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

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

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

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

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

Solution (Python):

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

    for num in range(0,B+1,K):
        if A<=num and num <=B:
            print("OK")
            return

    print("NG")


if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np
k = int(input())
ab = input()
ab = ab.split()
[a, b] = ab
a, b = int(a), int(b)
a_k = a // k
b_k = b // k
if(b_k > a_k or a % k == 0 or b % k == 0):
  print('OK')
else:
  print('NG')

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

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

Solution (Python):
INT_MAX=10**11+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]

import math as M
k=int(input())
a,b=INPUT()
bool=False
for i in range(a,b+1):
    if i%k==0:
        print("OK")
        bool=True
        break
if bool is False:
    print("NG")

Solution (Python):
import sys

K = int(sys.stdin.readline().strip())
A, B = [int(i) for i in sys.stdin.readline().strip().split(" ")]

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

Solution (Python):
def main():
    k = int(input())
    a, b = map(int,input().split())
    a_mod = a % k
    a_dev = a // k
    if a_mod != 0 and (a_dev + 1) * k > b:
        print ("NG")
    else:
        print("OK")
      

if __name__ == '__main__':
  main()

Solution (Python):
k=int(input())
a,b=map(int,input().split())
c=a%k
if b-a<k and c>0 and c+b-a<k:
    print("NG")
else:
    print("OK")

Solution (Python):
K = int(input())
a,b = list(map(int, input().split()))
n = 0
while True:
  n += 1
  if a <= n*K and n*K <= b:
    print('OK')
    break
  if b < n*K:
    print('NG')
    break

Solution (Python):
import sys
k = int(sys.stdin.readline().rstrip())
a, b = [int(x) for x in sys.stdin.readline().rstrip().split()]

_a = a // k;
_b = b // k;

print("OK" if _b - _a > 0 or a % k == 0 else "NG")

Solution (Python):
import math
k=int(input())
m = list(map(int,input().split()))
a=m[0]
b=m[1]
c=0
for i in range(1000):
  j=i+1
  n=k*j
  if a<=n and n<=b:
    c=c+1
if c>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:
        ans = 'OK'
        break
    ans = 'NG'

print(ans)

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')
sys.exit()

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=[int(x) for x in list(input().split())]
A=a[0]
B=a[1]
import math
if K*math.ceil(A/K) <= B:
    print('OK')
else:
    print('NG')

Solution (Python):
S=int(input())
As,Bs=input().split()


ans=0

A=int(As)
B=int(Bs)
tmp=A%S
if (A+(S-tmp))<=B:
    print("OK")
elif tmp==0:
    print("OK")

else:
    print("NG")

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

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

ans = 'NG'

if a % k == 0 or b % k == 0:
  ans = 'OK'
elif a // k != b // k:
  ans = 'OK'

print(ans)

Solution (Python):
k = int(input())
a, b = [int(x) for x in input().split()]
i = 1
ans = "NG"
while True:
    n = k * i
    if n < a:
        i += 1
    elif n > b:
            break
    else:
        if a <= n <= b:
            ans = "OK"
            break
        i += 1
print(ans)

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

Solution (Python):

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

if a % k == 0:
    temp = a
else:
    temp = (a // k + 1) * k

if temp >= a and temp <= 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(0)
print('NG')

Solution (Python):
k = int(input())
n, m =map(int,input().split())
kit = 0
flag = 0
while kit <= m-k :
  kit += k
  if n <= kit:
    print ("OK")
    flag = 1
    break
if flag == 0:
  print("NG")

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

l = B//K

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

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

Solution (Python):
K = int(input())
A, B = map(int, input().split())
A_B = []
index = 0

for i in range(0, B - A + 1):
    A_B.append(i+A)

for i in range(0, len(A_B)):
    if A_B[i] % K == 0:
        index = 1
        break

if index == 1:
    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()
print('NG')

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

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

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

ans = a-a%k + k

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

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

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

Solution (Python):
K=int(input())
AB=input().split(' ')
A,B=int(AB[0]),int(AB[1])

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

if a // k < b // k:
    print("OK")
elif a % k == 0:
    print("OK")
else:
    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:
       ans = 0
print(["OK","NG"][ans])

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"
print(ans)

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

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

if (a <=(a//k)*k and (a//k)*k <= b) or (a <= ((a//k)+1)*k and ((a//k)+1)*k <= b):
    print('OK')
else:
    print('NG')

Solution (Python):
k = int(input())
n,m=list(map(int,input().split()))
if n%k==0:
    print("OK")
else:
    if n-n%k+k<=m:
        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 = int(readline())
a, b = map(int, read().split())

flg = 0
i = 0

while i < 2000:
    if a <= k*i and b >= k*i:
        flg = 1
        break
    i += 1

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

Solution (Python):
num_val = int(input())
num_list = [int(i) for i in input().split()]

if num_val == 1:
    print('OK')
elif (num_list[0] % num_val == 0 ) or (num_list[1] % num_val == 0):
    print('OK')
elif (num_list[0] // num_val) == (num_list[1] // num_val):
    print('NG')
else:
    print('OK')

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

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

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

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

Solution (Python):

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

ans = 'NG'

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

print(ans)

Solution (Python):
K = int(input())
AB = list(map(int, input().split()))
A = AB[0]
B = AB[1]
run = True
mul = 1
while run:
    if A<=mul*K<=B:
        break
    if mul*K>B:
        run = False
    else:
        mul += 1
if run:
    print('OK')
else:
    print('NG')

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

c = a // k
c += 0 if c*k == a else 1
d = c * k

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

Solution (Python):
K = int(input())
A,B = map(int,input().split())
Flag = True
if B-A >= K:
  Flag = False
i = A
while Flag == True and i<B+1 :
  if i%K == 0:
    Flag = False
  i += 1
if Flag == False:
  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())

ra = a % k
a = a + k - ra

if a <= b or ra == 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"
    break
    
print(ans)

Solution (Python):

import sys


def solve(K: int, A: int, B: int):
    n = ((A-1) // K +1)*K
    print('OK' if A <= n and n <= B else '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())
s=""
for i in range(a,b+1):
  if i%k==0:
    s="OK"
    print(s)
    break
if s!="OK":
  print("NG")

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

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

Solution (Python):
S = int(input())
a = 0
count = 0
n,m = map(int,input().split())
while count == 0:
    a += S
    if n <= a and m >= a:
        count = 1
    if a >= 1000:
        break
if count == 0:
    print("NG")
else:
    print("OK")

Solution (Python):
k = int(input())
N, M = map(int, input().split())

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

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

Solution (Python):
import sys
K = int(input())
A,B = map(int,input().split())
for i in range(1001):
    if A<=i*K and i*K<=B:
        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")
        break
else:
    print("NG")

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

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

x = int(a / k)
y = int(b / k)
rx = a % k
ry = b % k

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

if y - x >= 1 or rx * ry == 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')
        quit()
else:
    print('NG')

Solution (Python):

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

while 1:
    if A <= k and k <=B:
        f=True
        break
    if B < k:
        break
    k+=K

if f:
    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

if c>=1:
	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 != B // K:
    print('OK')
else:
    print('NG')

Solution (Python):
k = int(input())
a, b = map(int, input().split())
dflag = False
for i in range(1000):
  if (a <= i * k <= b):
    dflag = True
    break
if dflag == True:
  print('OK')
else:
  print('NG')

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

ans = 'NG'

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

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

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

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

Solution (Python):
a=int(input())
b=list(map(int,input().split()))
i=2
out='NG'
c=a
while c<=b[1]:
  if c >=b[0]:
    out='OK'
    break
  else:
    c=a*i
    i+=1

print(out)

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

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

Solution (Python):
k = int(input())
a, b = map(int, input().split())
k2 = []
import sys
for i in range(1, 1001):
  ans = k * i
  k2.append(ans)
  if ans >= a and ans <= b:
    print('OK')
    sys.exit()
print('NG')

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

Solution (Python):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from fractions import Fraction



mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(" ".join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


k = int(data())
a, b = sp()
for i in range(a, b+1):
    if i % k == 0:
        out("OK")
        exit()
out("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())
r="NG"
for i in range(A,B+1):
  if i%K==0:
    r="OK"
    break
print(r)

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

def main():
  c=A
  while c<=B:
    if c%K==0:
      return True
    c+=1
  return False

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

Solution (Python):



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

kk = k
ok = False
while(kk <= b):
    
    
    if kk >= a and kk <= b:
        ok = True
        break
    
    kk += k

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

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

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

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

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

Solution (Python):
K=int(input())
A,B=map(int,input().split())
x=K
i=1
flg=False
while x<=B:
    if A<=x:flg=True;break
    i+=1
    x=K*i
if flg:print("OK")
else: print("NG")

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

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

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

Solution (Python):
K=int(input())
A,B=input().split()
A=int(A)
B=int(B)
C=A%K
if (1<=A<=B<=1000)and(1<=K<=1000):
    if B-A>=K-1:
        print("OK")
    else:
        if C==0:
            print("OK")
        elif A+K-C<=B:
            print("OK")
        elif A+K-C>B:
            print("NG")

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

for i in range(1001):
    if k*i >= a and k*i<=b:
        print("OK")
        exit()
    if k*i > b:
        break

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
    else:
        c = 0
if c> 0:
    print("OK")
else:
    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
    break

if count > 0:
  print("OK")
else:
  print("NG")

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

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

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

Solution (Python):
def main():
    K = int(input())
    A,B = [int(x) for x in input().split()]
    for a in range(A,B+1):
        if a % K == 0:
            print('OK')
            return
    print('NG')

if __name__ == '__main__':
    main()