#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int b;
  vector<pair<int, int> > a;
  for (int i = 0; i < n; i++) {
    cin >> b;
    a.push_back(pair<int, int>(b, i + 1));
  }
  sort(a.begin(), a.end());
  int ans = 0;
  for (int i = 0; i < n; i++) {
    k = k - a[i].first;
    if (k < 0) {
      ans = i;
      break;
    }
    if (k == 0) {
      ans = i + 1;
      break;
    }
  }
  if (k > 0) ans = n;
  cout << ans << endl;
  for (int i = 0; i < ans; i++) cout << a[i].second << " ";
  cout << endl;
  return 0;
}
