Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
print(output)


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

output = 1
for i in range(1, M//N+1):
    if M % i == 0 and output < i:
        output = i
print(output)


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())
 
output = 1
for i in range(1, M/N+1):
    if M % i == 0 and output < i:
        output = i
 
print(output)


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

start = None
if M % 2 == 1 and (M//N + 1) % 2 == 0:
    start = M//N
    step = -2
else:
    start = M//N + 1
    step = -1

for i in range(start, 0, step):
    if M % i == 0:
        print i
        break


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

for i in range((M//N)+1, 0, -1):
    if M % i == 0:
        print i
        break


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

for i in range(M/N+1, 0, -1):
    if M % i == 0:
        print i



Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

for i in range(M/N+1, 0, -1):
    if M % i == 0:
        print i
        exit()


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

for i in reversed(range(1, M/N+1)):
    if M % i == 0:
        print i
        exit()


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, raw_input().split())

output = 1
for i in range(1, M/N+1):
    if M % i == 0 and output < i:
        output = i

print output


Fixed submission:
N, M = map(int, input().split())

output = 1
for i in range(M//N, 0, -1):
    if M % i == 0 and output < i:
        output = i
        break
print(output)