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