#include <bits/stdc++.h>
using namespace std;
const long long lt = 100005;
long long mod = 1000000007;
vector<pair<long long, long long> > x;
vector<long long> a, t;
long long n, T;
long long check(long long m) {
  long long i;
  for (i = 0; i < n; i++)
    if (a[i] >= m) x.push_back(make_pair(t[i], i));
  sort(x.begin(), x.end());
  long long k = 0;
  if ((long long)(x).size() < m) return LLONG_MAX;
  for (i = 0; i < m; i++) k += x[i].first;
  return k;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> T;
  long long i, val1, val2;
  for (i = 0; i < n; i++) {
    cin >> val1 >> val2;
    a.push_back(val1);
    t.push_back(val2);
  }
  long long l = 0;
  long long r = n;
  long long mid = (l + r) / 2;
  long long k = 0;
  while (l < r) {
    x.clear();
    mid = (l + r) / 2;
    k = check(mid);
    if (k < T)
      l = mid + 1;
    else if (k > T)
      r = mid - 1;
    else
      break;
  }
  while (k <= T) {
    x.clear();
    mid++;
    k = check(mid);
  }
  while (k > T) {
    x.clear();
    mid--;
    k = check(mid);
  }
  cout << mid << endl << mid << endl;
  if (mid == 0) return 0;
  for (i = 0; i < mid; i++) cout << x[i].second + 1 << " ";
  cout << endl;
  return 0;
}
