#include <bits/stdc++.h>
using namespace std;
const int MAX = 200200;
int n;
long long t;
pair<long long, long long> prob[MAX];
vector<int> sol;
bool chk(int x) {
  sol.clear();
  vector<pair<long long, long long> > tst;
  for (int i = 0; i < n; i++) {
    if (prob[i].first >= x) tst.push_back({prob[i].second, i});
  }
  if (tst.size() < x) return false;
  sort(tst.begin(), tst.end());
  long long sum = 0;
  for (int i = 0; i < x; i++) {
    sum += tst[i].first;
    sol.push_back(tst[i].second);
  }
  return sum <= t;
}
int main() {
  cin >> n >> t;
  for (int i = 0; i < n; i++) cin >> prob[i].first >> prob[i].second;
  int l = 0, r = n;
  while (l + 5 < r) {
    int mid = (l + r) / 2;
    if (chk(mid))
      l = mid;
    else
      r = mid;
  }
  while (!chk(r)) r--;
  cout << r << endl << r << endl;
  for (auto it : sol) cout << it + 1 << " ";
  cout << endl;
  return 0;
}
