#include <bits/stdc++.h>
using namespace std;
string s;
int m;
vector<int> gt(int bal, int prv, int st) {
  if (st == m) {
    vector<int> q;
    q.push_back(prv);
    return q;
  }
  if (bal <= 0) {
    for (int i = 1; i <= 10; i++) {
      if (i != prv && s[i] != '0' && bal + i > 0) {
        vector<int> q = gt(bal + i, i, st + 1);
        if (q.size()) {
          q.push_back(i);
          return q;
        }
      }
    }
  } else {
    for (int i = 1; i <= 10; i++) {
      if (i != prv && s[i] != '0' && bal - i < 0) {
        vector<int> q = gt(bal - i, i, st + 1);
        if (q.size()) {
          q.push_back(i);
          return q;
        }
      }
    }
  }
  return {};
}
int main() {
  cin >> s >> m;
  s = " " + s;
  vector<int> a = gt(0, 0, 0);
  if (!a.size())
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = a.size() - 1; i > 0; i--) cout << a[i] << " ";
  }
  return 0;
}
