#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h, s = 0, i = 0;
  cin >> n >> h;
  vector<int> a(n), b(n);
  for (; i < n; ++i) cin >> a[i] >> b[i];
  sort(a.begin(), a.end(), greater<int>()),
      sort(b.begin(), b.end(), greater<int>());
  for (i = 0; i < n && b[i] > a[0] && s < h; ++i) s += b[i];
  cout << i << endl;
  cout << i + (s < h) * (h - s + a[0] - 1) / a[0] << endl;
}
