#include #include #include using namespace std; struct M{ long long c, d; }; main(){ cin.tie(nullptr); long long n,t,d=0, ans = 2e9; cin >> n >> t; vector ms(n); for(auto &m:ms) cin >> m.d >> m.c; sort(ms.begin(), ms.end(), [](M l, M r){ return l.d * r.c > r.d * l.c; }); for(auto &m : ms){ t += m.c; d += m.d; ans = min(ans, (t+d-1)/d); } cout << ans << endl; }