#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
using ll = long long;
#define inf 10000
int t, k, a[N], b[N];
int check(int x){
ll sum = 0;
for(int i = 0; i < t; ++i)
sum += (a[i] / x) * (b[i] / x);
return sum >= k;
}
int main(){
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> t >> k;
for(int i = 0;i < t; ++i) cin >> a[i] >> b[i];
int l = 1, r = inf;
while(l + 1 < r){
int mid=(l + r) >> 1;
if(check(mid)) l = mid;
else r = mid;
}
cout << l << "\n";
return 0;
}