#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a[10] = {0}, m, b[10000] = {0}, l = 0;
  int check = 0;
  bool ch;
  long long k1 = 0, k2 = 0;
  cin >> s >> m;
  for (int i = 0; i < 10; i++)
    if (s[i] == '1') a[l++] = i + 1;
  if (l == 1) {
    if (m > 1) {
      cout << "NO" << endl;
      return 0;
    }
    if (m == 1) {
      cout << "YES" << endl;
      cout << a[0] << endl;
      return 0;
    }
  }
  for (int i = 0; i < l; i++)
    for (int j = i + 1; j < l; j++) {
      ch = false;
      k1 = a[i];
      k2 = a[j];
      b[0] = a[i];
      b[1] = a[j];
      check = a[j];
      for (int g = 2; g < m && !ch; g++) {
        ch = true;
        if (g % 2 == 0) {
          for (int h = 0; h < l && ch; h++)
            if (a[h] > k2 - k1 && check != a[h]) {
              k1 += a[h];
              check = a[h];
              ch = false;
              b[g] = a[h];
            }
        } else {
          for (int h = 0; h < l && ch; h++)
            if (a[h] > k1 - k2 && check != a[h]) {
              k2 += a[h];
              check = a[h];
              ch = false;
              b[g] = a[h];
            }
        }
      }
      if (!ch) {
        cout << "YES" << endl;
        for (int i = 0; i < m; i++) cout << b[i] << " ";
        cout << endl;
        return 0;
      }
    }
  cout << "NO" << endl;
  return 0;
}
