#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return ((a * b) / gcd(a, b)); }
vector<long long> ans;
string str;
long long m;
vector<long long> previous(1011, 0);
bool solve(long long current, long long diff) {
  if (current > m) {
    return true;
  }
  for (long long i = diff + 1; i < 11; i++) {
    if (str[i] == '1' && previous[current - 1] != i) {
      previous[current] = i;
      if (solve(current + 1, i - diff) == true) {
        return true;
      }
    }
  }
  return false;
}
int main() {
  previous[0] = 0;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> str;
  str = '#' + str;
  cin >> m;
  if (solve(1, 0)) {
    cout << "YES\n";
    for (long long i = 1; i < m + 1; i++) {
      cout << previous[i] << " ";
    }
  } else {
    cout << "NO";
  }
  return 0;
}
