#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vvll = vector<vector<ll>>;
using vll = vector<ll>;
using vstr = vector<string>;
const ll MOD = 1000000007;
vll dx{0, 1, 0, -1};
vll dy{1, 0, -1, 0};
int i, j, k, h, n, m, a, b, c;
ll res, ans;
template <class type>
void printVector(vector<type> vec) {
  stringstream ss;
  ll n = vec.size();
  for (ll i = 0; i < n; i++) {
    ss << vec[i] << " ";
    if (i != n - 1) ss << " ";
  }
  cout << ss.str() << endl;
}
template <class type>
void inputVector(vector<type>& vec) {
  for (ll i = 0; i < vec.size(); i++) {
    cin >> vec[i];
  }
}
void solve() {
  ll h;
  cin >> n >> h;
  vector<pll> katana = vector<pll>(n);
  for (int i = 0; i < (int)(n); i++) {
    ll a, b;
    cin >> a >> b;
    katana[i] = pll(a, b);
  }
  sort(katana.rbegin(), katana.rend());
  pll bound = katana[0];
  sort(katana.rbegin(), katana.rend(),
       [](pll i, pll j) { return i.second < j.second; });
  res = 0;
  for (int i = 0; i < (int)(katana.size()); i++) {
    if (katana[i].second <= bound.first) break;
    h -= katana[i].second;
    res++;
    cout << h << endl;
    if (h <= 0) break;
  }
  while (0 < h) {
    h -= bound.first;
    res++;
  }
  cout << res;
}
int main() {
  solve();
  return 0;
}
