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):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop,heapify
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]






k=ii()
a,b=mii()
chk=False
for i in range(a,b+1):
    if i%k==0:
        chk=True
if chk:
    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()
else:
    print("NG")

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

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

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

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


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

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

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

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    K = int(rl())
    A, B = map(int, rl().split())
    
    for i in range(A, B + 1):
        if i % K == 0:
            print('OK')
            exit()
    print('NG')


if __name__ == '__main__':
    solve()

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    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")

    return 0

if __name__ == "__main__":
    solve()

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()
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())
if B // K > (A-1) // K:
    print("OK")
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')
    quit()

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

import sys


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



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

if __name__ == '__main__':
    main()

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

flag = True

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

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

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


print(main())

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

Solution (Python):

import sys

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


if __name__ == '__main__':
    main()

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

import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left 
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

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

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]

def to_bin(x: int) -> str: return format(x, 'b') 
def to_oct(x: int) -> str: return format(x, 'o') 
def to_hex(x: int) -> str: return format(x, 'x') 
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]

from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left


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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(1000000)

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

if __name__ == "__main__":
    K = int(input())
    A, B = tuple(map(int, input().split(" ")))

    print(solve(K, A, B))

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):
FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())



def solve(K, A, B):
    q,r = divmod(A, K)
    q += r> 0
    q *= K
    return A <= q <= B

K = rri()
A, B = rrm()
ans = solve(K, A, B)
print "OK" if ans else "NG"

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

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

    print('NG')

if __name__ == '__main__':
    main()

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


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

print("NG")

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def debug(table, *args):
    ret = []
    for name, val in table.items():
        if val in args:
            ret.append('{}: {}'.format(name, val))
    print(' | '.join(ret), file=sys.stderr)


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



def main():
    K = I()
    A, B = MI()

    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 = 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):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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):
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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    k = I()
    a, b = LI()
    for p in range(a, b+1):
        if p % k == 0:
            print('OK')
            return
    print('NG')

main()

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7 
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    k = int(input())
    a, b = map(int,input().split())
    for i in range(0, b + 1, k):
        if i >= a:
            print("OK")
            return
    print("NG")
resolve()

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

Solution (Python):
import sys
input=lambda: sys.stdin.readline().rstrip()
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):
import sys
import collections as cc
I=lambda:list(map(int,input().split()))
k,=I()
n,m=I()
for i in range(n,m+1):
    if i%k==0:
        print('OK')
        sys.exit()
print('NG')

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

k=INT()
a,b=MAP()

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

K = INT()
A, B = MAP()

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

Solution (Python):
K = int(input())
A,B = map(int,input().split())
flag = False
for 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()
print('NG')

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.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()
    for i in range(a,b+1):
        if i%k == 0:
            print("OK")
            return
    print("NG")
    return


if __name__ == "__main__":
    solve()

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):
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    k = ni()
    a, b = nm()

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

print("NG")

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)
k = int(stdin.readline().rstrip())
a,b = map(int,stdin.readline().rstrip().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())

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

if f:
    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 = list(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())
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):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  k=I()
  a,b=LI()

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


print(main())

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

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

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

def main():
    K = int(readline())
    A, B = map(int, readline().rstrip().split())
    for i in range(A, B+1):
        if i % K == 0:
            print('OK')
            exit()
    
    print('NG')


if __name__ == '__main__':
    main()

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

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from bisect import bisect_left
setrecursionlimit(1000000)

INF = int(1e10)
MOD = int(1e9 + 7)

def input():
    return stdin.readline()[:-1]


def main():
    from builtins import int, map
    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")


if __name__ == '__main__':
    main()

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 bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import lru_cache, reduce
from math import gcd
from operator import add, itemgetter, mul, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



K = int(sys.stdin.buffer.readline())
A, B = list(map(int, sys.stdin.buffer.readline().split()))

ok=False
for a in range(A, B + 1):
    if  a %K== 0:
        ok=True
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")
        exit()
print("NG")

Solution (Python):
"""
じょえチャンネルおもしろいよ～～～
https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
"""

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