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