#include <bits/stdc++.h>
using namespace std;
int n, t;
int check(int a, vector<pair<int, int> > v) {
  if (a == 0) return 1;
  vector<int> u;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (v[i].first >= a) {
      u.push_back(v[i].second);
    }
  }
  if (u.size() < a) return 0;
  sort((u).begin(), (u).end());
  for (int i = 0; i < a; i++) sum += u[i];
  if (sum <= t) return 1;
  return 0;
}
int bs(int l, int h, vector<pair<int, int> > v) {
  int m = (l + h) / 2;
  if (h - l <= 1) {
    if (check(h, v))
      return h;
    else
      return l;
  }
  if (check(m, v))
    return bs(m, h, v);
  else
    return bs(l, m - 1, v);
}
int solve() {
  vector<pair<int, int> > v, u, w;
  cin >> n >> t;
  int a, b;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    v.push_back({a, b});
    w.push_back({a, b});
  }
  sort((v).begin(), (v).end());
  a = bs(0, n, v);
  cout << a << "\n" << a << "\n";
  for (int i = 0; i < n; i++) {
    if (w[i].first >= a) u.push_back({w[i].second, i + 1});
  }
  sort((u).begin(), (u).end());
  for (int i = 0; i < a; i++) cout << u[i].second << " ";
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
}
