#include <bits/stdc++.h>
using namespace std;
const constexpr int INF = 1e9;
const constexpr long long MOD = 1e9 + 7;
vector<pair<int, int> > vp;
struct Less {
  bool operator()(const pair<int, int>& x, const pair<int, int>& y) const {
    return x.first > y.first;
  }
};
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
vector<int> g[200010];
int h[100010];
long long N, H;
string s;
long long a[100010], b[100010];
int main(void) {
  cin >> N >> H;
  long long maxa = 0, m_idx = 0;
  for (int i = 0; i < N; ++i) {
    long long n, m;
    cin >> n >> m;
    a[i] = n;
    b[i] = m;
    if (maxa < n) {
      maxa = n;
      m_idx = i;
    }
  }
  long long cnt = 0;
  for (int i = 0; i < N; ++i) {
    if (a[m_idx] < b[i] && i != m_idx) {
      H -= b[i];
      cnt++;
    }
    if (H <= 0) break;
  }
  while (H > 0) {
    if (H <= b[m_idx]) {
      cnt++;
      break;
    }
    H -= a[m_idx];
    cnt++;
    cout << H << endl;
  }
  cout << cnt << endl;
  return 0;
}
