#include <bits/stdc++.h>
using namespace std;
void smain();
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(7);
  cout << fixed;
  smain();
  return 0;
}
long long n, T;
long long a[200002], t[200002];
pair<long long, long long> fw[200002];
pair<long long, long long> sum(long long r) {
  pair<long long, long long> result = {0, 0};
  for (; r >= 0; r = (r & (r + 1)) - 1) {
    result.first += fw[r].first;
    result.second += fw[r].second;
  }
  return result;
}
void inc(long long i, long long delta) {
  for (; i < n; i = (i | (i + 1))) {
    fw[i].first += delta;
    fw[i].second += 1;
  }
}
vector<long long> solve() {
  vector<long long> o(n), p(n);
  for (long long i = 0; i < n; i++) o[i] = i;
  memset(fw, 0, sizeof(fw));
  sort(o.begin(), o.end(),
       [](long long i, long long j) { return t[i] < t[j]; });
  for (long long i = 0; i < n; i++) p[o[i]] = i;
  sort(o.begin(), o.end(),
       [](long long i, long long j) { return a[i] > a[j]; });
  long long k = n, i = 0;
  for (; k > 0; --k) {
    for (; i < n && a[o[i]] >= k; ++i) {
      inc(p[o[i]], t[o[i]]);
    }
    long long l = 0, r = n - 1;
    while (l < r) {
      long long m = (l + r) / 2;
      if (sum(m).first > T) {
        r = m;
      } else {
        l = m + 1;
      }
    }
    for (; l >= 0 && sum(l).first > T; --l)
      ;
    if (l >= 0 && sum(l).second >= k) {
      vector<long long> res;
      for (long long j = 0; j < i; j++)
        if (p[o[j]] <= l && (long long)res.size() < k) res.push_back(o[j]);
      assert((long long)res.size() == k);
      return res;
    }
  }
  return vector<long long>();
}
void smain() {
  for (; cin >> n >> T;) {
    for (long long i = 0; i < n; i++) cin >> a[i] >> t[i];
    auto res = solve();
    cout << res.size() << '\n' << res.size() << '\n';
    for (auto i : res) cout << i + 1 << ' ';
    cout << endl;
  }
}
