#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int m;
  cin >> m;
  int n = (int)s.size();
  bool fl = 0;
  int ele = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '1') {
      ele = i + 1;
      fl = 1;
      int first = (i + 1);
      int second = 0;
      int last = i;
      int k = m - 1;
      bool flag = 1;
      vector<int> w;
      w.push_back(i + 1);
      for (int j = 0; j < k; ++j) {
        int val = -1;
        for (int l = 0; l < n; ++l) {
          if (l == last) continue;
          if (s[l] == '1') {
            if (j & 1) {
              if ((first + l + 1) > second) {
                first += (l + 1);
                last = l;
                w.push_back(l + 1);
                val = 1;
                break;
              }
            } else {
              if ((second + l + 1) > first) {
                w.push_back(l + 1);
                second += (l + 1);
                last = l;
                val = 1;
                break;
              }
            }
          }
        }
        if (val == -1) {
          flag = 0;
          break;
        }
      }
      if (flag) {
        cout << "YES\n";
        for (int i = 0; i < (int)w.size(); ++i) {
          cout << w[i] << " ";
        }
        cout << "\n";
        return 0;
      }
    }
  }
  if (m == 1 && fl) {
    cout << "YES\n";
    cout << ele << "\n";
    return 0;
  }
  cout << "NO\n";
  return 0;
}
