#include using namespace std; using ll = long long; #define all(a) a.begin(),a.end() #define reps(i, a, n) for (int i = (a); i < (int)(n); i++) #define rep(i, n) reps(i, 0, n) #define rreps(i, a, n) for (int i = (a); i > (int)(n); i--) const long long INF = 1e18; ll myceil(ll a, ll b) {return (a+b-1)/b;} template using vc = vector; template using vv = vc>; template using vvv = vv>; template inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); } template inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); } #define debug(var) do { cout << #var << " :\n"; view(var); } while(0) templatevoid view(const T& e) {cout << e;} templatevoid view(const pair& p) {cout << "{" << p.first << ", " << p.second << "}";} templatevoid view(const vc& v) {for (const auto& e : v) {view(e);cout << " ";} cout << endl;} templatevoid view(const vv& vv) {for (const auto& v : vv) {view(v);} cout << endl;} templatevoid view(const set& s) {for (const auto& e : s) {view(e);cout << " ";} cout << endl;} templatevoid view(const multiset& s) {for (const auto& e : s) {view(e);cout << " ";} cout << endl;} templatevoid view(const unordered_set& s) {for (const auto& e : s) {view(e);cout << " ";} cout << endl;} templatevoid view(const unordered_multiset& s) {for (const auto& e : s) {view(e);cout << " ";} cout << endl;} templatevoid view(const map& mp){for (const auto& e : mp) {view(e);cout << " ";} cout << endl;} // # pragma GCC target("avx2") // # pragma GCC optimize("O3") // # pragma GCC optimize("unroll-loops") void solve() { ll n,m; cin >> n >> m; map mp; ll a,b; rep(i,n) { cin >> a >> b; mp[(m-a)/b]++; } ll ct = 0; ll ans = 0; for (auto x : mp) { ct += x.second; ans = max(ans,myceil(ct,x.first+1)); } cout << ans << endl; } int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int t = 1; // cin >> t; rep(i,t) solve(); return 0; }