#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, t;
  cin >> n >> t;
  long long int a[n], b[n];
  long long int i;
  for (i = 0; i <= n - 1; i++) {
    cin >> a[i] >> b[i];
  }
  long long int l = 0, r = n;
  vector<long long int> ans;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    vector<pair<long long int, long long int> > v;
    for (i = 0; i <= n - 1; i++) {
      if (a[i] >= mid) {
        v.push_back(make_pair(b[i], i));
      }
    }
    bool status = false;
    if (v.size() >= mid) {
      sort(v.begin(), v.end());
      long long int sum = 0;
      for (i = 0; i <= mid - 1; i++) {
        sum += (v[i].first);
      }
      if (sum <= t) {
        ans.clear();
        for (i = 0; i < mid; i++) {
          ans.push_back(v[i].second + 1);
        }
        status = true;
      }
    }
    if (status == true) {
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  if (ans.size() == 0) {
    cout << 0 << "\n" << 0;
  } else {
    cout << ans.size() << "\n";
    cout << ans.size() << "\n";
    for (i = 0; i <= ans.size() - 1; i++) {
      cout << ans[i] << " ";
    }
  }
}
