#include <bits/stdc++.h>
using namespace std;
int const maxn = (int)2e6 + 1, inf = (int)1e9 + 1, mod = (int)1e9 + 7;
long long pos, n, m, r;
bool used[55][55], ok;
int T, ans, t[maxn], a[maxn];
long long poz(int e, int r) {
  long long art = 1;
  for (int i = 1; i <= r; i++) art *= e;
  return art;
}
pair<int, int> can[maxn];
int dp[maxn];
bool solve(int k) {
  int g = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] >= k) {
      g++;
      can[g] = make_pair(t[i], i);
    }
  }
  sort(can + 1, can + g + 1);
  dp[1] = can[1].first;
  for (int i = 2; i <= g; i++) dp[i] = can[i].first + dp[i - 1];
  return dp[k] <= T && g >= k;
}
void prin(int k) {
  int g = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] >= k) {
      g++;
      can[g] = make_pair(t[i], i);
    }
  }
  sort(can + 1, can + g + 1);
  dp[1] = can[1].first;
  cout << k << endl << k << endl;
  for (int i = 1; i <= k; i++) cout << can[i].second << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> T;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> t[i];
  }
  int ans = 0;
  int l = 1, r = n;
  while (l <= r) {
    int m = (l + r) / 2;
    if (solve(m)) {
      l = m + 1;
      ans = m;
    } else
      r = m - 1;
  }
  prin(ans);
  return 0;
}
