#include <bits/stdc++.h>
using namespace std;
vector<int> v;
bool f(int prev, int sum1, int sum2, int n, int k, vector<int>& a) {
  if (n == 0) return true;
  if (k == 1) {
    for (auto i = 0; i != v.size(); i++) {
      if (v[i] + sum1 > sum2 && v[i] != prev) {
        a.push_back(v[i]);
        if (f(v[i], sum1 + v[i], sum2, n - 1, 2, a)) {
          return true;
        } else {
          a.pop_back();
        }
      }
    }
    return false;
  } else {
    for (auto i = 0; i != v.size(); i++) {
      if (v[i] + sum2 > sum1 && v[i] != prev) {
        a.push_back(v[i]);
        if (f(v[i], sum1, sum2 + v[i], n - 1, 1, a)) {
          return true;
        } else {
          a.pop_back();
        }
      }
    }
    return false;
  }
  return false;
}
void Solve() {
  string s;
  cin >> s;
  int n;
  cin >> n;
  for (auto i = 0; i != s.size(); i++) {
    if (s[i] == '1') v.push_back(i + 1);
  }
  for (auto i = 0; i != v.size(); i++) {
    vector<int> a;
    a.push_back(v[i]);
    if (f(v[i], v[i], 0, n - 1, 2, a)) {
      cout << "YES\n";
      for (auto i = 0; i != a.size(); i++) {
        cout << a[i] << " ";
      }
      return;
    }
  }
  cout << "NO";
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T = 1;
  while (T--) Solve();
  return 0;
}
