#include <bits/stdc++.h>
using namespace std;
string s;
bool is[12];
int m;
bool ok = 0;
int a[1010];
bool vis[13][1010][13];
void go(int sum, int M, int last) {
  if (ok) return;
  if (m == M) {
    cout << "YES" << endl;
    for (int i = 0; i < M; i++) cout << a[i] << ((i + 1 == M) ? '\n' : ' ');
    ok = 1;
    return;
  }
  if (vis[sum][M][last]) return;
  vis[sum][M][last] = 1;
  for (int i = 1; i <= 10; i++)
    if (is[i] && i != last && i > sum) {
      a[M] = i;
      go(i - sum, M + 1, i);
    }
}
int main() {
  cin >> s;
  for (int i = 0; i < 10; i++)
    if (s[i] == '1') is[i + 1] = 1;
  cin >> m;
  go(0, 0, 0);
  if (!ok) cout << "NO" << endl;
  return 0;
}
