#include <bits/stdc++.h>
using namespace std;
long long int const mod = 1e9 + 7;
int dp[1002][11][11];
string s;
int solution[1002], m;
int solve(int index, int diffpan, int pre) {
  if (index > 0 && diffpan <= 0 || diffpan > 10) {
    return 0;
  }
  if (index == m) {
    cout << "YES\n";
    for (int i = 0; i < m; i++) {
      cout << solution[i] << " ";
    }
    cout << "\n";
    return 1;
  }
  if (index == m) {
    return 0;
  }
  if (dp[index][diffpan][pre]) {
    return 0;
  }
  dp[index][diffpan][pre] = 1;
  for (int i = 0; i < 10; i++) {
    if (s[i] == '1' && i + 1 != pre) {
      solution[index] = i + 1;
      if (solve(index + 1, i + 1 - diffpan, i + 1)) {
        return 1;
      }
    }
  }
  return 0;
}
int main() {
  cin >> s;
  cin >> m;
  if (!solve(0, 0, 11)) {
    cout << "NO"
         << "\n";
  }
  return 0;
}
