#include <bits/stdc++.h>
using namespace std;
vector<int> v, ans;
int m;
bool solve(int a, int b, int c) {
  if (c == m) return true;
  for (auto x : v) {
    if (x > a && x != b) {
      bool g = solve(x - a, x, c + 1);
      if (g) {
        ans.push_back(x);
        return true;
      }
    }
  }
  return false;
}
int main() {
  string s1;
  cin >> s1;
  cin >> m;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] == '1') v.push_back(i + 1);
  }
  if (solve(0, 0, 0)) {
    cout << "YES" << endl;
    for (int i = ans.size() - 1; i >= 0; i--) cout << ans[i] << " ";
  } else
    cout << "NO";
  return 0;
}
