It's New Year's Eve soon, so Ivan decided it's high time he started setting the table. Ivan has bought two cakes and cut them into pieces: the first cake has been cut into a pieces, and the second one — into b pieces.

Ivan knows that there will be n people at the celebration (including himself), so Ivan has set n plates for the cakes. Now he is thinking about how to distribute the cakes between the plates. Ivan wants to do it in such a way that all following conditions are met:  Each piece of each cake is put on some plate;  Each plate contains at least one piece of cake;  No plate contains pieces of both cakes. 

To make his guests happy, Ivan wants to distribute the cakes in such a way that the minimum number of pieces on the plate is maximized. Formally, Ivan wants to know the maximum possible number x such that he can distribute the cakes according to the aforementioned conditions, and each plate will contain at least x pieces of cake.

Help Ivan to calculate this number x!


-----Input-----

The first line contains three integers n, a and b (1 ≤ a, b ≤ 100, 2 ≤ n ≤ a + b) — the number of plates, the number of pieces of the first cake, and the number of pieces of the second cake, respectively.


-----Output-----

Print the maximum possible number x such that Ivan can distribute the cake in such a way that each plate will contain at least x pieces of cake.


-----Examples-----
Input
5 2 3

Output
1

Input
4 7 10

Output
3



-----Note-----

In the first example there is only one way to distribute cakes to plates, all of them will have 1 cake on it.

In the second example you can have two plates with 3 and 4 pieces of the first cake and two plates both with 5 pieces of the second cake. Minimal number of pieces is 3.

Difficulty: interview

Starter code:

Solutions:
n, a, b = map(int, input().split())
ans = 0
for i in range(1, n):
    ans = max(ans, min(a // i, b // (n - i)))
print(ans)

n,a,b = [int(x) for x in input().split()]
mxmn = max(min(a//i,b//(n-i)) for i in range(1,n))
print(mxmn)


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

ans = -1
for x in range(1, min(n, a) + 1):
	y = n - x
	if (y > b or y == 0):
		continue
	ans = max(ans, min(a // x, b // y))
print(ans)

n,a,b = list(map(int, input().strip().split()))

x = 1
while True:
    prva = a//x
    druga = b//x
    if prva + druga < n:
        x -= 1
        break
    x += 1
x = min(x,a,b)
print(x)


n, a, b = map(int, input().split())
r = set()
for m in range(1, n):
	r.add(min(a // m, b // (n - m)))
print(max(r))

n,a,b = [int(x) for x in input().split()]
for x in reversed(list(range(1,1000000))):
    if a//x + b//x >= n and a//x>0 and b//x > 0:
        print(x)
        break


from sys import stdin, stdout

INF = float('inf')

n, a, b = map(int, stdin.readline().split())

l, r = 1, 200
while r - l > 1:
    m = (l + r) >> 1
    
    if (b // m and a // m and a // m + b // m >= n):
        l = m
    else:
        r = m

stdout.write(str(l))

n, a, b = [int(v) for v in input().split()]

best = 0
for k in range(1, n):
    fst = k
    snd = n - k
    best = max(best, min(a // fst, b // snd))
print(best)


n, a, b = list(map(int, input().split()))
answ = 0
for fir in range(1, n):
    sec = n - fir
    answ = max(answ, min(a // fir, b // sec))
print(answ)
    


n,a,b=list(map(int,input().split()))
ans=0
for x in range(1,n):
    #if a//x>0 and b//(n-x)>0:
        ans=max(ans,min(a//x,b//(n-x)))
print(ans)



n, a, b = list(map(int, input().strip().split()))


if a + b < n:
    print(0)
else:
    x = 2
    while True:
        if a // x + b // x >= n and a // x >= 1 and b // x >= 1:
            x += 1
        else:
            print(x - 1)
            break


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

c = int(n * (a/(a+b)))
d = n - c
from math import ceil
cc = ceil(n * (a/(a+b)))
dd = n-cc
opts = []
if c != 0 and d != 0:
    opts.append(min(a//c, b//d))
if cc != 0 and dd != 0:
    opts.append(min(a//cc, b//dd))
print(max(opts))

z, n, m = list(map(int, input().split()))
ans = 0
for i in range(1, z):
    ans = max(ans, min(n / (z - i), m / i))
print(int(ans // 1))


q,w,e=list(map(int,input().split()))
s=w+e
tt=s//q
while ((w//tt)+(e//tt)<q):
    tt-=1
if tt>min(w,e):
    tt=min(w,e)
print(tt)


n,a,b = list(map(int,input().split()))
for i in range(200,0,-1):
    if a//i > 0 and b//i > 0 and a//i+b//i>=n:
        print(i)
        break


n,a,b = list(map(int,input().split()))
m = min(a,b//(n-1))
for i in range(1,n):
    m = max(m , min(a//i,b//(n-i)))
print(m)


n, a, b=list(map(int,input().split(" ")))
ans=0
for i in range(1,n):
    m=min(a//i, b//(n-i))
    if m>ans:
        ans=m
print(ans)


zh, nh, mmm = list(map(int, input().split()))
asss = 0
for i in range(1, zh):
    asss = max(asss, min(nh / (zh - i), mmm / i))
print(int(asss // 1))


n, a, b = list(map(int,input().split()))
z = []
for i in range(1, n):
	z += [min(a // i, b // (n - i))]
print(max(z))


            

n,a,b = list(map(int,input().split()))



def check(x):
	A = a
	B = b
	if A >= x and B >= x:
		A -= x
		B -= x
	else:
		return False
	for i in range(n-2):
		if A >= x:
			A -= x
		elif B >= x:
			B -= x
		else:
			return False
	return True

l = 0 
r = a+b

while l + 1 < r:
	m = (l+r) // 2
	if check(m):
		l = m
	else:
		r = m
print(l)


n,a,b = map(int, input().split())
ans = 0
for i in range(1,n):
	ans = max(ans, min(a//i, b//(n-i)))
print(ans)

x, y, z = list(map(int, input().split()))
ans = 0
for i in range(1, x):
    kt = x - i
    ans = max(ans, min(y // i, z // kt))
print(ans)


n,a,b = [int(i) for i in input().split()]

ans = 0

for n1 in range(1,n):
    n2 = n - n1

    x1 = a//n1
    x2 = b//n2

    ans = max(ans,min(x1,x2))

print(ans)
    


n, a, b = list(map(int, input().split()))
ans = 0
for x in range(1, min(a, b) + 1):
	k = (a // x) + (b // x)
	if k >= n:
		ans = x
print(ans)



n,a,b=list(map(int,input().split()))
for x in range(1,110):
    if a//x+b//x<n or a<x or b<x:
        print(x-1)
        break