#include <bits/stdc++.h>
using namespace std;
int n, t;
struct data {
  int ai, ti, num;
} a[200010];
bool cmp(data p, data q) { return p.ti < q.ti; }
bool check(int x, bool judge) {
  int cnt = 0, now = t;
  for (int i = 1; i <= n; i++) {
    if (a[i].ai < x) continue;
    if (a[i].ti > now) break;
    now -= a[i].ti;
    cnt++;
    if (cnt > x) return 1;
    if (judge) printf("%d ", a[i].num);
  }
  if (cnt < x) return 0;
  return 1;
}
int main() {
  scanf("%d%d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].ai, &a[i].ti);
    a[i].num = i;
  }
  sort(a + 1, a + n + 1, cmp);
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r + 1) / 2;
    if (check(mid, 0))
      l = mid;
    else
      r = mid - 1;
  }
  printf("%d\n%d\n", l, l);
  check(l, 1);
  return 0;
}
