Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
for i in lis:
    if i >= N:
        break

print(M//i )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
for i in lis:
    if i >= N:
        break

print(M//i3 )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)


ret = 0
for i in lis:

    ret = i
    if i >= N:
        break

print(M//ret )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)

lis.sort()
ret = 0
for i in lis:

    ret = i
    if i >= N:
        break

print(M//ret )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2
for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)

lis.sort()
ret = 0
for i in lis:

    ret = i
    if i >= N:
        break

print(M_//ret )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2
for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)

lis.sort()
ret = 0
for i in lis:

    ret = i
    if i > N:
        break

print(M_//ret )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Runtime Error):
import  math
lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2
for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)

lis.sort()
ret = 0
for i in lis:
    if i > N:
        break
    ret = i

print(M_//ret )


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Time Limit Exceeded):

lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2

while True:
    if M % i == 0:
        M = M // i
        lis.append(i)
    elif M == 1:
        break
    else:
        i += 1
ans = M_
ret = 1
for n in range(2**len(lis)):
    m = bin(n)[-1:1:-1]
    ret = 1
    for l in range(len(m)):
        if int(m[l]):
            ret *= lis[l]
            if  ret >= N:
                continue
    if ret >= N and ret <=ans:
        ans = ret

print(M_//ans)


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Time Limit Exceeded):

lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2

while True:
    if M % i == 0:
        M = M // i
        lis.append(i)
    elif M == 1:
        break
    else:
        i += 1
ans = M_
ret = 1
for n in range(2**len(lis)):
    m = bin(n)[-1:1:-1]
    ret = 1
    for l in range(len(m)):
        if int(m[l]):
            ret *= lis[l]
            if  ret >= N:
                break
    if ret >= N and ret <=ans:
        ans = ret

print(M_//ans)


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Time Limit Exceeded):

lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2

while True:
    if M % i == 0:
        M = M // i
        lis.append(i)
    elif M == 1:
        break
    else:
        i += 1
ans = M_

for n in range(2**len(lis)):
    m = bin(n)[-1:1:-1]
    ret = 1
    for l in range(len(m)):
        if int(m[l]):
            ret *= lis[l]
            if  ret >= N:
                break
    if ret >= N and ret <=ans:
        ans = ret

print(M_//ans)


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Time Limit Exceeded):

lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2

while True:
    if M % i == 0:
        M = M // i
        lis.append(i)
    elif M == 1:
        break
    else:
        i += 1
ans = M_

for n in range(2**len(lis)):
    m = bin(n)[-1:1:-1]
    ret = 1
    for l in range(len(m)):
        if int(m[l]):
            ret *= lis[l]
           # print(lis[l])
            if  ret >= N:
                break
    if ret >= N:
        #print(ret)
        ans = min(ans,ret)

print(M_//ans)


Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )

Buggy python submission (verdict: Time Limit Exceeded):

lis = []

N,M = [int(i) for i in input().split()]
M_ = M
i = 2

while True:
    if M % i == 0:
        M = M // i
        lis.append(i)
    elif M == 1:
        break
    else:
        i += 1
ans = M_

#print(lis)
for n in range(2**len(lis)):
    m = bin(n)[-1:1:-1]
    ret = 1
   # print(m)
    for l in range(len(m)):
        if int(m[l]):
            ret *= lis[l]
           # print(lis[l])
            if  ret > N:
                break
    if ret >= N:
        #print(ret)
        ans = min(ans,ret)

print(M_//ans)

Fixed submission:
import  math
lis = []

N,M = [int(i) for i in input().split()]

for i in range(1,int(math.sqrt(M))):
    if M % i == 0:
        lis.append(i)
        lis.append(M//i)


lis.sort()
i =1
for i in lis:
    if i >= N:
        break

print(M//i )