#include <iostream>
using namespace std;
int total;
int res;
int demand;
const int N = (int)1e5 + 100;
struct node {
long long len;
long long b;
}nodes[N];
inline bool check(int x) {
int count = 0;
long long whole = 0;
for (int i = 0; i < total; i++) {
if (x > nodes[i].len || x > nodes[i].b) {
continue;
}
else {
whole = nodes[i].len * nodes[i].b;
long long need = (long)x * (long)x;
int see = 0;
see= whole / need;
count += see;
}
}
bool shit=count >= demand;
return shit;
}
int main() {
cin >> total >> demand;
int right = 0;
for (int i = 0; i < total; i++){
int bind_1, bind_2;
cin >> bind_1 >> bind_2;
right = max(right, bind_1);
right = max(right, bind_2);
nodes[i].len = bind_1;
nodes[i].b = bind_2;
}
int left = 1;
while (left <= right) {
int mid = right + left >> 1;
if (check(mid)) {
res = mid;
left = mid + 1;
}
else {
right = mid - 1;
}
}
cout << res << endl;
return 0;
}