N, K = input().split(' ')
N = int(N)
K = int(K)
chocolateWidth = list(range(N))
chocolateLength = list(range(N))
chocolateMax = 10 ** 5 + 1
chocolateMini = 1
for i in range(N):
tempLeft, tempRight = input().split(' ')
chocolateWidth[i], chocolateLength[i] = int(tempLeft), int(tempRight)
chocolateMax = min(chocolateMax, int(tempLeft), int(tempRight))
while True:
chocolateCnt = 0
for i in range(N):
chocolateCnt += ((chocolateLength[i] // chocolateMax) * (chocolateWidth[i] // chocolateMax))
if chocolateCnt >= K:
print(chocolateMax)
break
else:
chocolateMax -= 1