#include <bits/stdc++.h>
using namespace std;
string s;
long long int m;
vector<long long int> v;
long long int res[1001];
long long int res2[1001];
bool dfs(long long int x, long long int tez, long long int br) {
  if (br == m) {
    for (int i = 0; i < m; i++) {
      res2[i] = res[i];
    }
    return true;
  }
  bool t = false;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] != tez) {
      if ((br % 2 == 0) && (x <= 0) && (x + v[i] > 0)) {
        res[br] = v[i];
        t = t || dfs(x + v[i], v[i], br + 1);
      } else if ((br % 2 == 1) && (x >= 0) && (x - v[i] < 0)) {
        res[br] = v[i];
        t = t || dfs(x - v[i], v[i], br + 1);
      }
    }
  }
  return t;
}
int main() {
  cin >> s;
  scanf("%lld", &m);
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '1') v.push_back(i + 1);
  }
  if (dfs(0, 0, 0)) {
    printf("YES\n");
    for (int i = 0; i < m; i++) {
      printf("%lld ", res2[i]);
    }
  } else
    printf("NO\n");
}
