#include <bits/stdc++.h>
using namespace std;
string s;
long long int m;
long long int dp[1005] = {0};
bool solve(long long int i, long long int prev, long long int diff) {
  if (i > 0 && (diff <= 0 || diff > 10)) return false;
  if (i == m) {
    cout << "YES"
         << "\n";
    for (long long int j = 0; j < m; j++) {
      cout << dp[j] << " ";
    }
    exit(0);
  }
  for (long long int j = 0; j < 10; j++) {
    if (s[j] == '1' && j != prev) {
      dp[i] = j + 1;
      if (solve(i + 1, j, j + 1 - diff)) {
        return true;
      }
    }
  }
  return false;
}
signed main() {
  cin >> s;
  cin >> m;
  if (!solve(0, -1, 0))
    cout << "NO"
         << "\n";
  return 0;
}
