Buggy python submission (verdict: Runtime Error):
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
			print(i)
            break
solve()

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n, m = list(map(int,input().split()))
for i in range(m//n,0,-1):
    if m % i == 0:
        print(i)
        break

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
k=m//n
s=[]
for i in range(1,int(m**2)+2):
    if m%i==0 and i<=k:
        s.append(i)
        if m/i<=k:
           s.append(m/i)
print(int(max(s)))

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=[]
for i in range(1,int(m**2)+1):
    if m%i==0 and i=<n:
        s.append(i)
        if m/i=<n:
           s.append(m/i)
print(max(s))

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=[]
for i in range(1,int(m**2)+1):
    if m%i==0 and i<n:
        s.append(i)
        if m/i<n:
           s.append(m/i)
print(max(s))

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=m//n
if m//n<=int(m**0.5):
    for i in range(m//n,0,-1):
        if m%i==0:
            print(i)
            break
else:
    for i in range(m//n,0,-1):
        if m%i==0:
            print(i)
            break

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
c=1
if n==1:
    print(m)
else:
    for i in range(m//n,0,-1):
        if m%i==0:
            print(i)
            break

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
c=1
if m<2*n:
    print(1)
else:
    for i in range(m//n,0,-1):
        if m%i==0:
            print(i)
            break

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
c=1
if m%n==0:
    print(int(m/n))
else:
    for i in range(m//n,0,-1):
        if m%i==0:
            print(i)
            break

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
c=1
if m%n==0:
    print(int(m/n))
else:
    for i in range(m//2-1,0,-1):
        if m%i==0:
            if m/i>=n:
                print(i)
                break

Fixed submission:
n, m = list(map(int,input().split()))
def solve():
    for i in range(m//n, 0, -1):
        if m % i == 0:
            if m//i>= n:
                print(i)
                break
solve()