#include <bits/stdc++.h>
using namespace std;
int dp[1005][11][11];
pair<int, int> par[1005][11][11];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    string s;
    cin >> s;
    bool flag[11];
    int n, i, j, k;
    cin >> n;
    for (i = 0; i < 10; i++) flag[i + 1] = (s[i] == '1');
    for (i = 1; i <= 10; i++)
      if (flag[i]) dp[1][i][i] = 1, par[1][i][i] = make_pair(i, 0);
    for (i = 1; i < n; i++) {
      for (int diff = 1; diff < 11; diff++) {
        for (k = 1; k < 11; k++) {
          for (j = 1; j < 11; j++) {
            if (j != k && j > diff && dp[i][diff][k] && flag[j]) {
              dp[i + 1][j - diff][j] = 1;
              par[i + 1][j - diff][j] = make_pair(diff, k);
            }
          }
        }
      }
    }
    vector<int> v;
    for (i = 1; i < 11; i++) {
      for (j = 1; j < 11; j++) {
        if (dp[n][i][j]) {
          cout << "YES\n";
          int diff = i, dig = j;
          for (k = n; k > 0; k--) {
            v.push_back(dig);
            int x = diff, y = dig;
            diff = par[k][x][y].first, dig = par[k][x][y].second;
          }
          reverse((v).begin(), (v).end());
          for (auto k : v) cout << k << " ";
          return 0;
        }
      }
    }
    cout << "NO\n";
  }
  return 0;
}
