#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n, ti, flag = 0;
pair<pair<int, int>, int> a[maxn];
int check(int cnt) {
  int tt = 0, cc = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i].first.second >= cnt) {
      tt += a[i].first.first;
      cc++;
      if (tt > ti) return 0;
      if (cc >= cnt) return 1;
    }
  }
  return 0;
}
int check1(int cnt) {
  int tt = 0, cc = 0;
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    if (a[i].first.second >= cnt) {
      tt += a[i].first.first;
      ans.push_back(a[i].second);
      cc++;
      if (tt > ti) return 0;
      if (cc >= cnt) {
        for (auto it : ans) cout << it << ' ';
        cout << endl;
        return 1;
      }
    }
  }
}
int main() {
  cin >> n >> ti;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first.second >> a[i].first.first;
    a[i].second = i;
  }
  sort(a + 1, a + 1 + n);
  int l = 0, r = n + 1;
  while (l + 1 < r) {
    int m = (l + r) >> 1;
    if (check(m))
      l = m;
    else
      r = m;
  }
  flag = 1;
  cout << l << endl;
  cout << l << endl;
  check1(l);
}
