#include <bits/stdc++.h>
using namespace std;
;
const double eps = 1e-8;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 7;
const double pi = acos(-1);
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
int m, vis[15];
bool dp[1007][15][105];
char s[15];
vector<int> vec;
int main() {
  scanf("%s%d", s, &m);
  for (int i = 0; i < 10; ++i) {
    if (s[i] == '1') vis[i + 1] = 1;
  }
  for (int i = 1; i <= 10; ++i) {
    if (vis[i]) dp[1][i][i] = 1;
  }
  for (int i = 2; i <= m; ++i) {
    for (int j = 1; j <= 10; ++j) {
      if (!vis[j]) continue;
      for (int k = 1; k <= 10; ++k) {
        if (!vis[k] || j == k) continue;
        for (int t = 1; t <= k; ++t) {
          if (!dp[i - 1][k][t]) continue;
          if (j >= t) dp[i][j][j - t] = 1;
        }
      }
    }
  }
  int flag = 0;
  for (int i = 1; i <= 10; ++i) {
    for (int j = 1; j <= 10; ++j) {
      if (dp[m][i][j]) {
        flag = 1;
        break;
      }
    }
    if (flag) break;
  }
  if (!flag)
    puts("NO");
  else {
    puts("YES");
    int num1 = 0, num2 = 0;
    for (int i = 1; i <= 10; ++i) {
      for (int j = 1; j <= 10; ++j) {
        if (dp[m][i][j]) {
          num1 = i, num2 = j;
          break;
        }
      }
      if (num1) break;
    }
    vec.push_back(num1);
    for (int i = m - 1; i >= 1; --i) {
      for (int j = 1; j <= 10; ++j) {
        if (dp[i][j][num1 - num2] && j != num1) {
          vec.push_back(j);
          num2 = num1 - num2;
          num1 = j;
          break;
        }
      }
    }
    for (int i = (int)vec.size() - 1; i >= 0; --i) {
      printf("%d%c", vec[i], i == 0 ? '\n' : ' ');
    }
  }
  return 0;
}
