#include <bits/stdc++.h>
using namespace std;
bool has[20];
int dp[1010][12][12];
int use[1010][12][12];
int main() {
  for (int i = 1; i <= 10; i++) {
    char c;
    cin >> c;
    if (c == '1') has[i] = true;
  }
  int m;
  cin >> m;
  if (m == 1) {
    for (int i = 1; i <= 10; i++)
      if (has[i]) {
        cout << "YES" << endl << i << endl;
        return 0;
      }
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 1; i <= 10; i++)
    for (int j = 1; j <= 10; j++) {
      use[m][i][j] = -1;
      dp[m][i][j] = true;
    }
  for (int i = m - 1; i >= 1; i--)
    for (int dif = 1; dif <= 10; dif++)
      for (int ls = 1; ls <= 10; ls++)
        for (int j = dif + 1; j <= 10; j++)
          if (j != ls && has[j]) {
            if (dp[i + 1][j - dif][j]) {
              dp[i][dif][ls] = true;
              use[i][dif][ls] = j;
              break;
            }
          }
  for (int i = 1; i <= 10; i++)
    if (has[i])
      if (dp[1][i][i]) {
        cout << "YES" << endl;
        cout << i << " ";
        int k = use[1][i][i];
        int diff = i;
        int lev = 1;
        while (k != -1) {
          cout << k << " ";
          lev++;
          diff = k - diff;
          k = use[lev][diff][k];
        }
        return 0;
      }
  cout << "NO" << endl;
}
