#include <bits/stdc++.h>
using namespace std;
void GO_FAST() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int n, t, a[100000], ans = 0;
vector<int> b[100000];
vector<int> v;
int main() {
  GO_FAST();
  cin >> n >> t;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    b[a[i]].push_back(i + 1);
  }
  int s = 0;
  sort(a, a + n);
  int d = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == a[i - 1])
      ++d;
    else
      d = 0;
    if (s + a[i] <= t) {
      s += a[i];
      ++ans;
      v.push_back(b[a[i]][d]);
    }
    if (s >= t) break;
  }
  cout << ans << endl;
  if (ans == 0) return 0;
  for (auto i : v) {
    cout << i << " ";
  }
}
