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-----
7
500 600

-----Sample Output-----
OK

Among the multiples of 7, for example, 567 lies between 500 and 600.

Difficulty: introductory

Starter code:

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

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

for i in range(1000):
  if A <= K*i and K*i <=B:
    ans += 1

if ans == 0:
  print('NG')
else:
  print('OK')

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

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

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


#ABC165
K=int(input()) 
A,B=map(int,input().split())
#----------以上入力----------
K_max = int(B/K)*K
if A <= K_max :
    print('OK')
else:
    print('NG')

def __starting_point():

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

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

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


__starting_point()

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

def ans165(K,A,B):
    ans_count=0
    for i in range(A,B+1):
        if i%K==0:
            ans_count+=1
    if ans_count>0:
        return "OK"
    else:
        return  "NG"

print((ans165(K,A,B)))


def mult(x,d):
    return x//d


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

if mult(B,K)-mult(A-1,K)>0:
    print('OK')
else:
    print('NG')

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

flag = 0

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

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

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

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


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

if b // k > (a-1) // k:
	print("OK")
else:
	print("NG")


k = int(input())
a,b = list(map(int,input().split()))
num = a//k
for i in range(num,num+100):
    if k*i >=a and k*i <=b:
        print('OK')
        return
print('NG')



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

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


k = int(input())
a, b = map(int, input().split())
if b // k - a // k > 0:
    print('OK')
elif a % k == 0:
    print('OK')
else:
    print('NG')

K = int(input())
N = list(map(int,input().split()))
flag = 0
for i in range(N[0],N[1]+1):
  if( i % K == 0):
    flag = 1
    break
  else:continue
if(flag ==1):print("OK")
else:print("NG")

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

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

a = int(input())
b,c = map(int,input().split())
for i in range(1000):
    if a * (i+1) >= b:
        if a * (i+1) <= c:
            print("OK")
            return
print("NG")

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

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

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

else:
    print("NG")


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

if a%k ==0:
    n = a//k
else:
    n = a//k +1

if k*n > b:
    print("NG")
else:
    print("OK")

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

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

import sys
def input(): return sys.stdin.readline().rstrip()

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

ans = False
count = K
while count <= B:
    if A <= count and count <= B:
        ans = True
    count += K

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

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

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

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


def __starting_point():
    print((main()))

__starting_point()

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

TOP = B // K
BOTTOM = (A-1) // K
d = TOP - BOTTOM
if d > 0:
    print("OK")
else:
    print("NG")

K = int(input())
A, B = map(int, input().split())
"""
if(B-A+1 >= K):
  print("OK")
else:
  print("NG")
"""
flag = False
for i in range(A, B+1):
  if i%K == 0:
    flag = True
if flag:
  print("OK")
else:
  print("NG")

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "NG"

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

print(res)


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

t=b//k
u=(a-1)//k

if t-u>=1:
    print("OK")
else:
    print("NG")


#!/usr/bin/env python3

#import
#import math
#import numpy as np
K = int(input())
A, B = list(map(int, input().split()))

for i in range(1000):
    if A <= K * i <= B:
        print("OK")
        return

print("NG")


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

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

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

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

k = int(input())
a, b = list(map(int, input().split()))
if b < k * (a // k + 1) and a % k != 0:
    print('NG')
else:
    print('OK')


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


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

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

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

print('NG')


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

K = int(input())
A, B = map(int, input().split())
print("NOGK"[K<(B-A+2) or B%K<A%K or B%K==0 or A%K==0::2])

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

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

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

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

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

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)

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

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


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

K = int(input())
A, B = list(map(int, input().split()))
if B // K * K >= A:
  print('OK')
else:
  print('NG')




K=int(input())
A,B=map(int,input().split())
ans=0
i=1
while K*i<=1000:
    if A<=K*i and K*i<=B:
        ans=1
        break
    i+=1
if ans==1:
    print("OK")
else:
    print("NG")

K = int(input())
A,B = map(int,input().split())
li = []
for i in range(A,B+1):
    li.append(i)
ans = False
for j in li:
    if j%K == 0:
        ans = True
        break
    else:
        ans = False
if ans == True:print("OK")
else:print("NG")

x=int(input())
a,b=map(int,input().split())
max_b=b//x*x
if max_b>=a:
  print("OK")
else:
  print("NG")

k=int(input())
a,b=map(int,input().split())
if ((b-a)>=k):
  print('OK')
elif (a%k==0) or (b%k==0):
  print('OK')
elif(a<(a//k)*k+k<b):
  print('OK')
else:
  print('NG')

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

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


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

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

import math
k=int(input())
[a,b]=list(map(int, input().split()))
A=math.floor(a/k)
B=math.floor(b/k)
if A!=B:
  print("OK")
elif k==1:
  print("OK")
elif a%k==0 or b%k==0:
  print("OK")
else:
  print("NG")

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

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


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


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

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

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

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

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


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

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

print('NG')

k = int(input())

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

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

print('NG')

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

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

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

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

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

K = int(input())
A, B = map(int, input().split())
ans = 'OK' if B//K-(A-1)//K > 0 else 'NG'
print(ans)

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

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

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

n=int(input())
a,b=map(int,input().split())
n_a=a//n
n_b=(b+n-1)//n
# print(n_a,n_b)
for i in range(n_a-1,n_b+1):
    if a<=n*i<=b:
        print("OK")
        return
print("NG")

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)

k=int(input())
a,b= map(int, input().split())
q=0
 
for i in range(1,1000):
  if a<=k*i and k*i<=b:
    print('OK')
    q=1
    break
 
if q==0:
  print('NG')

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

if (A // K) ==  (B // K) and (A % K) != 0:
    print("NG")

else:
    print("OK")


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)

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

K = int(input())
[A, B] = [int(i) for i in input().split()]
for num in range(A, B+1):
    if num % K == 0:
        print("OK")
        return
print("NG")

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


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

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

K=int(input())
A,B=list(map(int,input().split()))
i=0
can=False
while i<=B:
  i+=K
  if i>=A and i<=B:
    can=True
    break
if can:
  print("OK")
else:
  print("NG")


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

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


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

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

K=int(input())
A,B=map(int,input().split())
if (B//K)*K>=A:
    print('OK')
else:
    print('NG')

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

k=int(input())
a,b=map(int,input().split())
print(['NG','OK'][b-b%k>=a])

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

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

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

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


def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7
#import numpy
k = N()
a,b = L()
for i in range(a,b+1):
    if i%k == 0:
        print("OK")
        return
print("NG")

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

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

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

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

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

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

k = int(input())
a, b = list(map(int, input().split()))
if b // k > a // k or a % k == 0:
    print('OK')
else:
    print('NG')


K=int(input())
A,B=map(int,input().split())
C=A//K
D=B//K
E=A%K
F=B%K
if E==0 or F==0:
    print('OK')
elif C==D:
    print('NG')
else:
    print('OK')

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

x = c//a
if(x>=1 and x*a>=b):
    print("OK")
else:
    print("NG")

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

k = int(input())

a,b = input().split()

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

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

k = int(input())
a, b = list(map(int,input().split()))
list1 = []
x =(k+a-1)//k
y = b // k

for i in range(x,y+1):
  list1.append(i)
if list1 == []:
  print('NG')
else:
  print('OK')


k=int(input());a,b=map(int,input().split())
print('NOGK'[any([i%k==0 for i in range(a,b+1)])::2])

K = int(input())
A,B = map(int,input().split())
n = 0
for i in range(A,B+1):
  if i % K == 0:
    n = 1
    break 

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

k = int(input())
a, b = list(map(int, input().split()))
n = 0
for i in range(a, b + 1):
    if i % k == 0:
        n = 1
        break

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