#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int INF = 1e9 + 7;
const int N = 2e5 + 7;
const int M = 1e6 + 7;
int n, T;
struct node {
  int id, ai, ti;
  node(int id = 0, int ai = 0, int ti = 0) : id(id), ai(ai), ti(ti) {}
  bool operator<(const node& A) const { return ti < A.ti; }
} a[N];
bool judge(int p) {
  int _T = 0, cnt = 0;
  for (int i = 1; i <= n && _T < T; i++)
    if (a[i].ai >= p) _T += a[i].ti, cnt += (_T <= T);
  return cnt >= p;
}
int b[N];
void print(int p) {
  int _T = 0, cnt = 0;
  for (int i = 1; i <= n && _T < T; i++)
    if (a[i].ai >= p) {
      _T += a[i].ti;
      if (_T <= T) b[++cnt] = a[i].id;
    }
  cout << p << endl << p << endl;
  for (int i = 1; i <= p; i++) cout << b[i] << " ";
  cout << "\n";
}
signed main() {
  cin >> n >> T;
  int L = 0, R = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].ai >> a[i].ti;
    a[i].id = i;
    R = max(R, a[i].ai);
  }
  sort(a + 1, a + n + 1);
  int mid, ans = 0;
  while (L <= R) {
    int mid = L + R >> 1;
    if (judge(mid))
      ans = mid, L = mid + 1;
    else
      R = mid - 1;
  }
  print(ans);
  return 0;
}
