#include <bits/stdc++.h>
using namespace std;
stringstream ss;
long long mod = 1000000007LL;
int st[1010], sz;
int ans[1010], ok;
int dp[1010][10][10];
int m;
string s;
void f(int pos, int dif, int last) {
  if (pos == m) {
    ok = 1;
    for (int i = 0; i < m; i++) ans[i] = st[i];
    return;
  }
  if (dp[pos][dif][last] != -1) return;
  dp[pos][dif][last] = 1;
  for (int i = dif + 1; i <= 10; i++)
    if (s[i] == '1' && i != last) {
      st[sz++] = i;
      f(pos + 1, i - dif, i);
      sz--;
    }
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> s >> m;
  s = '0' + s;
  ok = 0;
  f(0, 0, 0);
  if (ok) {
    cout << "YES" << endl;
    for (int i = 0; i < m; i++) cout << ans[i] << " ";
    cout << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
