#include <bits/stdc++.h>
using namespace std;
int n;
char s[12];
int dp[1009][11][11];
vector<int> ans;
bool dfs(int p, int ca, int la) {
  int &d = dp[p][ca][la];
  if (d + 1) return d;
  if (p == n + 1) {
    return d = 1;
  }
  for (int i = 1; i < 11; i++)
    if (s[i] == '1' && i != la && i > ca) {
      if (dfs(p + 1, i - ca, i)) {
        ans.push_back(i);
        return d = 1;
      }
    }
  return d = 0;
}
int main() {
  scanf("%s%d", s + 1, &n);
  memset(dp, -1, sizeof(dp));
  if (dfs(1, 0, 0)) {
    puts("YES");
    for (int i = ans.size() - 1; i >= 0; i--) cout << ans[i] << " ";
  } else
    puts("NO");
  return 0;
}
