#include <bits/stdc++.h>
using namespace std;
vector<long long int> ans;
long long int tl, n;
struct node {
  long long int t, l, id;
  node() {}
  node(long long int x, long long int y, long long int z) {
    t = x;
    l = y;
    id = z;
  }
};
bool operator<(node a, node b) { return a.t < b.t; }
vector<node> vs;
bool ispossible(long long int x) {
  int cnt = 0, rem = tl;
  vector<int> temp;
  for (int i = 0; i < n; i++) {
    node tmp = vs[i];
    if (tmp.l >= x && tmp.t <= rem) {
      rem -= tmp.t;
      temp.push_back(tmp.id);
      cnt++;
    }
    if (cnt == x) {
      ans.clear();
      for (int i = 0; i < temp.size(); i++) {
        ans.push_back(temp[i]);
      }
      return true;
    }
  }
  return false;
}
int main() {
  long long int t, u, v;
  cin >> n >> tl;
  for (int i = 0; i < n; i++) {
    cin >> v >> u;
    vs.push_back(node(u, v, i + 1));
  }
  sort(vs.begin(), vs.end());
  {}
  int l = 1, h = n, mid;
  while (l <= h) {
    mid = (l + h) / 2;
    if (ispossible(mid)) {
      l = mid + 1;
    } else
      h = mid - 1;
  }
  cout << ans.size() << endl;
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  puts("");
}
