#include <bits/stdc++.h>
using namespace std;
long long n, t;
vector<tuple<long long, long long, long long>> wow;
long long solve(long long border) {
  long long cnt = 0;
  long long now_time = 0;
  for (int i = 0; i < n; ++i) {
    if (get<1>(wow[i]) >= border) {
      cnt++;
      now_time += get<0>(wow[i]);
      if (cnt == border) {
        if (now_time <= t) return 1;
        return 0;
      }
    }
  }
  return 0;
}
int main() {
  cin >> n >> t;
  for (long long i = 0; i < n; ++i) {
    long long a, b;
    cin >> a >> b;
    wow.push_back(make_tuple(b, a, i + 1));
  }
  sort(wow.begin(), wow.end());
  long long bot = 0;
  long long top = n;
  while (top - bot > 1) {
    long long mid = (top + bot) / 2;
    if (solve(mid))
      bot = mid;
    else
      top = mid;
  }
  long long estimate = 0;
  if (solve(top)) {
    estimate = top;
  } else
    estimate = bot;
  cout << estimate << endl;
  cout << estimate << endl;
  if (estimate == 0) {
    cout << endl;
    return 0;
  }
  long long cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (get<1>(wow[i]) >= estimate) {
      cnt++;
      cout << get<2>(wow[i]) << " ";
      if (cnt == estimate) {
        cout << endl;
        return 0;
      }
    }
  }
  assert(1 == 0);
}
