qyliang/CodeNanoFix huggingface dataset:
Buggy code:
k = int(input())
a, b = map(int, input().split())

x = b - a
if x >= k - 2:
  print("OK")
elif  k == 1:
  print("OK")
elif b == k or a == k:
  print("OK")
elif b % k == 0 or a % k == 0:
  print("OK")
elif b < k < a:
  print("OK")
elif a != b and k == 2:
  print("OK")  
else:
  print("NG")



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

if b - a >= k - 1:
  print("OK")
elif  k == 1:
  print("OK")
elif b == k or a == k:
  print("OK")
elif b % k == 0 or a % k == 0:
  print("OK")
elif a < k and k < b:
  print("OK")
elif a != b and k == 2:
  print("OK")
elif b < k:
  print("NG")
elif a % k > b % k:
  print("OK")
else:
  print("NG")
Buggy code:
k = int(input())
data = input().split()
a = int(data[0])
b = int(data[1])

ans = False

if abs(a - b) < k:
  ans = True
else:
  for i in range(a, b):
    if i % k == 0:
      ans = True
      break
print("OK" if ans else "NG")


Fixed code:
k = int(input())
data = input().split()
a = int(data[0])
b = int(data[1])
 
ans = False
 
if abs(a - b) > k:
  ans = True
else:
  for i in range(a, b + 1):
    if i % k == 0:
      ans = True
      break
print("OK" if ans else "NG")
Buggy code:
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:
  print('No')


Fixed code:
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')
Buggy code:
k=int(input())
a,b = list(map(int,input().split()))
v1 = (a+k-1)//k
v2 = (b+k-1)//k
if(v1<=v2):
  print("OK")
else:
  print("NG")


Fixed code:
k=int(input())
a,b = list(map(int,input().split()))
v1 = (a+k-1)//k
v2 = (b)//k
# print(v1,v2)
if(v1<=v2):
  print("OK")
else:
  print("NG")
Buggy code:
k = int(input())
a, b = [int(i) for i in input().split()]

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

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

if b // k - (a-1) // k > 0:
    print('OK')
else:
    print("NG")
Buggy code:
K = int(input())
A,B = map(int,input().split())
l = []
for i in range(A,B+1):
    if i % 7 == 0:
        l.append(i)
#print(l)
if not l:
    print("NG")
else:
    print("OK")

Fixed code:
K = int(input())
A,B = map(int,input().split())
l = []
for i in range(A,B+1):
    if i % K == 0:
        l.append(i)
#print(l)
if not l:
    print("NG")
else:
    print("OK")
Buggy code:
k=int(input())
a,b=map(int,input().split())

c=b//k

if a<c*k:
  print("OK")
else:
  print("NG")

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

c=b//k

if a<=c*k:
  print("OK")
else:
  print("NG")
Buggy code:
K=input()
A, B=input().split()


f="NG"
for i in range(int(A),int(B)):
    c=i%int(K)
    if c==0:
        f="OK"
print(f)


Fixed code:
K=input()
A, B=input().split()


f="NG"
for i in range(int(A),int(B)+1):
    c=i%int(K)
    if c==0:
        f="OK"
print(f)
Buggy code:
N = int(input())
L= list(map(int,input().split()))
min = L[0]
max = L[1]

for i in range(min,max):
  if i % N == 0:
    print("OK")
    break
else:
  print("NG")
    
    
	


Fixed code:
N = int(input())
L= list(map(int,input().split()))
min = L[0]
max = L[1]

for i in range(min,max+1):
  if i % N == 0:
    print("OK")
    break
else:
  print("NG")
Buggy code:
K =int(input())
A,B = map(int,input().split())
f = 0
for i in range(A,B+1):
    if(i%K==0):
        print("OK")
        f =1
        break
    print(i)
if(f ==0):
    print("NG")



Fixed code:
K =int(input())
A,B = map(int,input().split())
f = 0
for i in range(A,B+1):

    if(i%K==0):
        print("OK")
        f =1
        break

if(f ==0):
    print("NG")
Buggy code:
k = int(input())
a, b = map(int, input().split())
if k < a:
    print("NG")
else:
    print("OK")

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

if a <= (b//k)*k:
  print("OK")
else:
  print("NG")
Buggy code:
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")

Fixed code:
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")
Buggy code:
k = int(input())
a, b = map(int, input().split())
count = 0
for i in range(a, b):
    if i % 7 == 0:
        count += 1
    else:
        continue
if count != 0:
    print("OK")
else:
    print("NG")

Fixed code:
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")
Buggy code:
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)

Fixed code:
def resolve():
    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)

resolve()
Buggy code:
k=input()
a,b = map(int, input().split())
ans="NG"
while a <= b:
  if a%k=0:
    ans ="OK"
  else:
    a=a+1
print(ans)

Fixed code:
import math
k=int(input())
a,b = map(int, input().split())
ans="NG"

while a <= b:
	if a%k==0:
		ans ="OK"
		a=b+1
	else:
		a=a+1

print(ans)
Buggy code:
K = int(input())
A, B = map(int, input().split())


ps = int(A / K)
pa = A % K
qs = int(B / K)
qa = B % K

if A==B:
	if p==0:
		print("OK")
	else:
		print("NG")
else:
	if qs-ps>0:
		print("OK")
	else:
		if pa+qa >K:
			print("OK")
		else:
			print("NG")


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


ps = int(A / K)
pa = A % K
qs = int(B / K)
qa = B % K

if A==B:
	if pa==0:
		print("OK")
	else:
		print("NG")
else:
	if qs-ps>0:
		print("OK")
	else:
		if pa==0 or qa ==0:
			print("OK")
		else:
			print("NG")
Buggy code:
def main():
    K=int(input())
    (A,B)=[int(x) for x in input().split()]
    if A % K == 0:
        print('OK')
    elif math.ceil(A/K)*K <= B:
        print('OK')
    else:
        print('NG')
 
if __name__ == '__main__':
    main()

Fixed code:
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()
Buggy code:
import sys
k=int(input())
a,b=map(int,input().split())
for i in range(a+1,b+1):
  if (i % k)==0:
    print("OK")
    sys.exit()
print("NG")

Fixed code:
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")
Buggy code:
k = int(input())
a, b = map(int, input().split())
if k - 1 <= b - a:
    print("OK")
else:
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            break
    else:
        print("NO")

Fixed code:
k = int(input())
a, b = map(int, input().split())
if k - 1 <= b - a:
    print("OK")
else:
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            break
    else:
        print("NG")
Buggy code:
K = int(input())
A, B = map(int,input().split())
count = 0
for i in range(A,B):
    if i%K == 0:
        count += 1
    else:
        count += 0
if count >= 1:
    print("OK")
elif count == 0:
    print("NO")

Fixed code:
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:
        count += 0

        
        
if count >= 1:
    print("OK")
elif count == 0:
    print("NG")
Buggy code:
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')

Fixed code:
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')
Buggy code:
k=int(input())
a,b=map(int,input().split())
if b//k-a//k>0:
    print("OK")
else:
    print("NG")


Fixed code:
k=int(input())
a,b=map(int,input().split())
if b//k-(a-1)//k>0:
    print("OK")
else:
    print("NG")
Buggy code:
K = int(input())
A , B = (int(x) for x in input().split())


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


Fixed code:
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
Buggy code:
k = int(input())
a, b = map(int, input().split())
tmp = 0
for i in range(a, b+1):
    if i % k == 0:
        tmp = 1
if tmp:
    print("OK")
else:
    print("NO")

Fixed code:
k = int(input())
a, b = map(int, input().split())
tmp = 0
for i in range(a, b+1):
    if i % k == 0:
        tmp = 1
if tmp:
    print("OK")
else:
    print("NG")
Buggy code:
K = int(input())
A, B = map(int,input().split())

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


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

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

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

if B - A >= K:
    print("OK")
elif (B % K) < (A % K):
    print("OK")
elif A % K == 0 or B % K == 0:
    print("OK")
else:
    print("NG")
Buggy code:
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")

Fixed code:
import math
 
a=int(input())
li = list(map(int,input().split()))
#print(math.ceil(li[0]/a)*a)
if li[1]<math.ceil(li[0]/a)*a:
    print("NG")
else:
    print("OK")
Buggy code:
k = int(input())
a, b = map(int, input().split())
if (a // k != b // k) | (a % k == 0) | (b % k == 0):
    print('OK')
else:
    print('NO')

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

if (a // k != b // k) | (a % k == 0) | (b % k == 0):
    print('OK')
else:
    print('NG')
Buggy code:
k = int(input())
a, b = map(int, input().split())

flag = False
for i in range(a, b + 1):
    if i // k > 0 ans i % k == 0:
        flag = True
        
if flag:
    print('OK')
else:
    print('NG')

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

flag = False
for i in range(a, b + 1):
    if i % k == 0:
        flag = True
        
if flag:
    print('OK')
else:
    print('NG')
Buggy code:
k = int(input())
a,b = map(int, input().split())


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


Fixed code:
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')
Buggy code:
k = input()
a, b = list(map(int, input().split()))
isYes = False
for i in range(a, b+1):
    if i % k == 0:
        isYes = False
        break
print('OK' if isYes else 'NG')

Fixed code:
k = int(input())
a, b = list(map(int, input().split()))
isYes = False
for i in range(a, b+1):
    if i % k == 0:
        isYes = True
        break
print('OK' if isYes else 'NG')
Buggy code:

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

Fixed code:
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')
Buggy code:
k = int(input())
a, b = [int(e) for e in input().split()]

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

Fixed code:
k = int(input())
a, b = [int(e) for e in input().split()]
ans='NG'
for i in range(a,b+1):
    if i%k == 0:
        ans='OK'
        break
    else:
        pass
print(ans)
Buggy code:

k = int(input())
a,b = (map(int,input().split()))
new_list = []
for i in range(a,b+1):
    if i%k == 0:
        print('Yes')
    else:
        print('NG')

Fixed code:

k = int(input())
a,b = (map(int,input().split()))
new_list = []
for i in range(a,b+1):
    if i%k == 0:
        print("OK")
        break
else:
    print('NG')
Buggy code:
k = int(input())
a, b = map(int, input().split())

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

Fixed code:
k=int(input())
a,b=map(int,input().split())
n=(a+k-1)//k
if n*k<=b:print("OK")
else:print("NG")
Buggy code:
def main():
    K = int(input())
    A, B = list(map(int, input().split(' ')))
    
    
    
    for i in range(A, B):
        if i % K == 0:
            print('OK')
            return
            
    print('NG')
        
        
    
    
    
main()

Fixed code:
def main():
    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')
        
        
    
    
    
main()
Buggy code:
K=int(input())
A,B=map(int,input())
if (A-1)/K == B/K:
  print('NG')
else:
  print('OK')

Fixed code:
K=int(input())
A,B=map(int,input().split())
if (A-1)//K == B//K:
  print('NG')
else:
  print('OK')
Buggy code:
k = int(input())
a, b = map(int, input().split())
print('OK' if a <= b // k * b else 'NG')

Fixed code:
k = int(input())
a, b = map(int, input().split())
print('OK' if a <= b // k * k else 'NG')
Buggy code:
K = int(input())
A, B = map(int, input().split())
for i in range(A, B+1, 1):
    if i%K == 0:
        print("YES")
        exit()
print("NG")


Fixed code:
K = int(input())
A, B = map(int, input().split())
for i in range(A, B+1, 1):
    if i%K == 0:
        print("OK")
        exit()
print("NG")
Buggy code:
k = int(input())
a, b = map(int, input().split())
for i in range(a, b+1, 1):
    print(i)
    if i % k == 0:
        print('OK')
        exit()
print('NG')

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

data = input().split()
a = int(data[0])
b = int(data[1])

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

Fixed code:
k = int(input())

data = input().split()
a = int(data[0])
b = int(data[1])

largest = b //k * k
if largest >= a:
    print("OK")
else:
    print("NG")
Buggy code:
import sys

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

if A == B and A % K == 0:
  print("OK")
  sys.exit()

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

    
print("NG")

Fixed code:
import sys

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

if A == B and A % K == 0:
  print("OK")
  sys.exit()

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

    
print("NG")
Buggy code:
K = int(input())
A,B=[int(i) for i in input().split(" ")]
if A%K == 0　or (A//K+1)*K <= B:
    print("OK")
else:
    print("NG")

Fixed code:
K = int(input())
A,B=[int(i) for i in input().split(" ")]
if A%K == 0:
    print("OK")
elif (A//K+1)*K <= B:
    print("OK")
else:
    print("NG")
Buggy code:
k = int(input())
a,b=map(int, input().split())
for i in range(1,2000):
    x=k*i
    if a <= k and k <= b:
        print("OK")
        break
    else b < k:
        print("NG")
	break


Fixed code:
k = int(input())
a,b=map(int, input().split())
for i in range(1,2000):
    x=k*i
    if a <= x and x <= b:
        print("OK")
        break
    elif b < x:
        print("NG")
        break
Buggy code:
k = int(input())
a, b = list(map(int, input().split()))

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

Fixed code:
k = int(input())
a, b = list(map(int, input().split()))
 
count = 0
for ele in range(a, b+1):
    if ele % k == 0:
        print("OK")
        count += 1
        break
if count == 0:
    print("NG")
Buggy code:
k = int(input())
a, b = map(int,input().split())
bb = b//k
aa , i = divmod(a, k)
if (a != b) or ( i ==0):
    print("OK")
else:
    print("OK")

Fixed code:
k = int(input())
a, b = map(int,input().split())
bb = b//k
aa , i = divmod(a, k)
if (aa != bb) or ( i ==0):
    print("OK")
else:
    print("NG")
Buggy code:
import sys

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


K = a[0]
B = x[1]
A = x[0]

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

Fixed code:
import sys

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


K = a[0]
B = x[1]
A = x[0]

for i in range(A,B+1):
    if i%K == 0:
        print("OK")
        sys.exit()
print("NG")
Buggy code:
k = int(input())
a,b = map(int, input().split())
 
for i in range(a,b):
  if i % k == 0:
    print('OK')
    exit(0)
print('NG')

Fixed code:
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')
Buggy code:
k = input()
a, b = map(int, input().split())

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

Fixed code:
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")
Buggy code:
K = int(input())
a, b = map(int, input().split())

if a < b // K * K:
    print('OK')
else:
    print('NG')

Fixed code:
K = int(input())
a, b = map(int, input().split())

if a <= b // K * K:
    print('OK')
else:
    print('NG')
Buggy code:
K = int(input())
A, B = tuple(map(int, input().split()))

a = A%K

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


Fixed code:
K = int(input())
A, B = tuple(map(int, input().split()))

a = A%K

if a==0 or K-a+A<=B:
  print("OK")
else:
  print("NG")
Buggy code:
K = int(input())
A, B  = map(int, input().split())

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

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

a = 0
for i in range(A,B+1):
  if i % K == 0:
    a = 1
    break
print("OK" if a == 1 else "NG")
Buggy code:
K = int(input())
A = list(map(int, input().split()))
d=A[1]-A[0]
ok=0
for i in range(d):
    if A[0]%K==0:
        print("OK")
        ok+=1
        break
    else:
        a=A[0]
        A[0]=a+1

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


Fixed code:
K = int(input())
A = list(map(int, input().split()))
d=A[1]-A[0]+1
ok=0

for i in range(d):
    if A[0]%K==0:
        print("OK")
        ok+=1
        break
    else:
        a=A[0]
        A[0]=a+1

if ok==0:
    print("NG")
Buggy code:
# AtCoder
K = int(input())
A, B = map(int, input().split())

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


Fixed code:
# AtCoder
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')
Buggy code:
k = int(input())
a,b = map(int,input().split())
f = 1
for i in range(a,b+1):
  if i % k == 0:
    print('OK')
    f = 0
    break
if f:
  print('NO')

Fixed code:
k = int(input())
a,b = map(int,input().split())
f = 1
for i in range(a,b+1):
  if i % k == 0:
    print('OK')
    f = 0
    break
if f:
  print('NG')
Buggy code:
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("NO")


Fixed code:
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")
Buggy code:
k = input()
a, b = (int(x) for x in input().split())
K = int(k)
A = int(a)
B = int(b)
i = 0

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

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


Fixed code:
k = input()
a, b = (int(x) for x in input().split())
K = int(k)
A = int(a)
B = int(b)
C = B - A + 1
p = 1

for p in range(C):
    if A % K == 0:
        i = 1
        break
    else:
        A += 1
        i = 0

if i == 1:
    print('OK')
else:
    print('NG')
Buggy code:
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")
		exit()

print("NG")

Fixed code:
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")
		exit()
 
print("NG")
Buggy code:
K= int(input())
A, B = map(int, input().split())
i = 0
while A <= B:
  if K / 4 == K // 4:
    i = i + 1
    A = A + 1
  else:
    i = i + 0
    A = A + 1
    
if i = 0:
  print("NG")
else:
  print("OK")

Fixed code:
K= int(input())
A, B = map(int, input().split())
i = 0
while A <= B:
  if A / K == A // K:
    i = i + 1
    A = A + 1
  else:
    i = i + 0
    A = A + 1
    
if i == 0:
  print("NG")
else:
  print("OK")
Buggy code:
K = int(input())
A, B = [int(s) for s in input().split()]
 
largest = B // K * K

print("OK" if largest >= a else "NG")

Fixed code:
K = int(input())
A, B = [int(s) for s in input().split()]
 
largest = B // K * K
 
print("OK" if largest >= A else "NG")
Buggy code:
K = input("")
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
    if number % K == 0:
        number = True
        
print("OK" if number else "NG")

Fixed code:
K = int(input(""))
A, B = map(int, input().split())
number = False
for i in range(A, B+1):
    if i % K == 0:
        number = True

print("OK" if number else "NG")
Buggy code:
K = int(input())
A, B = map(int, input().split())

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


Fixed code:
K = int(input())
A, B = map(int, input().split())
 
print('OK' if (B-A >= (K-A%K)%K) else 'NG')
Buggy code:
#a
M = int(input())
N,K=map(int,input().split())
p=0
for i in range(N,K):
    if i%M==0:
        p=1
        break
if p==1:
    print('OK')
else:
    print('NG')

Fixed code:
#a
M = int(input())
N,K=map(int,input().split())
p=0
for i in range(N,K+1):
    if i%M==0:
        p=1
        break
if p==1:
    print('OK')
else:
    print('NG')
Buggy code:
k = int(input())
a, b = map(int, input().split())

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

print("No")

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

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

print("NG")
Buggy code:
K = int(input())
A, B = map(int, input().split())

clear = []

for target in range (A,B):
    if target % K == 0:
        clear.append(target)
        
if not clear:
    print("NG")
else:
    print("OK")

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

clear = []

for target in range (A,B+1):
    if target % K == 0:
        clear.append(target)
        
if not clear:
    print("NG")
else:
    print("OK")