#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
long long power(long long a, long long b);
string s;
long long m;
bool solve(long long d, long long prev, long long n, vector<long long> list) {
  if (n == m) {
    cout << "YES"
         << "\n";
    for (auto x : list) cout << x << " ";
    return 1;
  } else {
    for (long long i = d + 1; i <= 10; i++) {
      if (i != prev && s[i - 1] == '1') {
        list.push_back(i);
        if (solve(i - d, i, n + 1, list)) return 1;
        list.pop_back();
      }
    }
    return false;
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1;
  while (t--) {
    cin >> s;
    cin >> m;
    vector<long long> list;
    if (!solve(0, 0, 0, list))
      cout << "NO"
           << "\n";
  }
  return 0;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b % 2)
      b--, res = res * a;
    else
      b = b / 2, a *= a;
  }
  return res;
}
