#include <bits/stdc++.h>
using namespace std;
int dp[10001];
int instruments[100];
vector<int> lists[10001];
int main() {
  int n, k;
  while (cin >> n >> k) {
    for (int i = int(0); i < int(n); i++) {
      cin >> instruments[i];
    }
    for (int i = int(0); i < int(10001); i++) lists[i].clear();
    memset(dp, 0, sizeof(dp));
    for (int i = int(0); i < int(n); i++) {
      for (int j = k; j >= instruments[i]; j--) {
        if (dp[j] < dp[j - instruments[i]] + 1) {
          dp[j] = dp[j - instruments[i]] + 1;
          lists[j] = lists[j - instruments[i]];
          lists[j].push_back(i + 1);
        }
        dp[j] = max(dp[j], dp[j - instruments[i]] + 1);
      }
    }
    cout << lists[k].size() << endl;
    for (int i = int(0); i < int(lists[k].size()); i++) {
      cout << lists[k][i] << " \n"[i == lists[k].size() - 1];
    }
  }
  return 0;
}
