#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const long long INF = 2e18;
void print(int a[], int n) {
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << "\n";
}
int biton(int N, int pos) { return N = N | (1 << pos); }
int bitoff(int N, int pos) { return N = N & ~(1 << pos); }
bool bitcheck(int N, int pos) { return (bool)(N & (1 << pos)); }
long long const mx = 1000 + 5;
long long n, m;
long long a[mx];
vector<long long> v;
long long dp[mx][15][15];
long long f(long long done, long long last, long long need) {
  if (done == m) return 0;
  if (dp[done][last][need] != -1) return dp[done][last][need];
  long long ans = 0;
  for (long long x : v) {
    if (need < x and x != last) {
      ans = 1 + f(done + 1, x, x - need);
      if (ans == m - done) {
        a[done] = x;
        break;
      }
    }
  }
  return dp[done][last][need] = ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tc = 1;
  while (tc--) {
    memset(dp, -1, sizeof(dp));
    string s;
    cin >> s >> m;
    for (int i = 0; i < (s.size()); i++)
      if (s[i] == '1') v.push_back(i + 1);
    bool ok = 0;
    for (long long t : v) {
      a[0] = t;
      long long step = 1 + f(1, t, t);
      if (step == m) {
        ok = 1;
        break;
      }
    }
    if (ok) {
      cout << "YES\n";
      for (int i = 0; i < (m); i++) cout << a[i] << " ";
    } else
      cout << "NO\n";
  }
}
