#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> a[200007];
long long int n, t;
long long int ok(long long int k) {
  long long int sum = 0;
  std::vector<long long int> v;
  for (long long int i = 0; i < n; i++) {
    if (a[i].first >= k) v.push_back(a[i].second);
  }
  sort(v.begin(), v.end());
  if (v.size() < k) return 0;
  for (long long int i = 0; i < k; i++) {
    sum += v[i];
  }
  return sum <= t;
}
int main() {
  std::cin >> n >> t;
  for (long long int i = 0; i < n; i++) {
    std::cin >> a[i].first >> a[i].second;
  }
  long long int l = 0, r = 200005, m;
  while (l <= r) {
    m = l + (r - l) / 2;
    if (ok(m))
      l = m + 1;
    else
      r = m - 1;
  }
  printf("%lld\n%lld\n", r, r);
  std::vector<pair<long long int, long long int>> v;
  for (long long int i = 0; i < n; i++) {
    if (a[i].first >= r) v.push_back({a[i].second, i});
  }
  sort(v.begin(), v.end());
  for (long long int i = 0; i < r; i++) {
    printf("%lld ", v[i].second + 1);
  }
}
