#include <bits/stdc++.h>
const long long template_array_size = 1e6;
const long long INF = 9223372036854775807;
const long long MOD = 1e9 + 7;
using namespace std;
vector<long long> edges[500005];
bool visited[51][51];
long long n, m, k, x, a, b;
string s;
vector<long long> weights;
void dfs(long long last, long long balance) {
  if (weights.size() == m) {
    cout << "YES\n";
    for (auto i : weights) {
      cout << i << " ";
    }
    exit(0);
  }
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '1' && i + 1 != last) {
      if (balance > 0) {
        if (balance - (i + 1) < 0) {
          weights.push_back(i + 1);
          dfs(i + 1, balance - (i + 1));
          weights.pop_back();
        }
      } else {
        if (i + 1 + balance > 0) {
          weights.push_back(i + 1);
          dfs(i + 1, i + 1 + balance);
          weights.pop_back();
        }
      }
    }
  }
}
void solve() {
  cin >> s >> m;
  dfs(0, 0);
  cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
