#include <bits/stdc++.h>
using namespace std;
string s;
int m;
bool solve(int d, int prev, int n, vector<int>& list) {
  if (n == m) {
    cout << "YES" << endl;
    for (auto x : list) cout << x << " ";
    return true;
  } else {
    for (int i = d + 1; i <= 10; i++) {
      if (i != prev && s[i - 1] == '1') {
        list.push_back(i);
        if (solve(i - d, i, n + 1, list)) return true;
        list.pop_back();
      }
    }
    return false;
  }
}
int main() {
  cin >> s;
  cin >> m;
  vector<int> list;
  if (!solve(0, 0, 0, list)) cout << "NO" << endl;
}
