#include <bits/stdc++.h>
using namespace std;
string s;
int m;
vector<int> ans;
bool check(int cl, int b, int turn) {
  if (turn == m) return true;
  for (int i = 1; i <= 10; i++)
    if (s[i] == '1' && i > cl && i != b)
      if (check(i - cl, i, turn + 1)) {
        ans.push_back(i);
        return true;
      }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie();
  cin >> s;
  cin >> m;
  s = ' ' + s;
  if (check(0, 0, 0)) {
    cout << "YES\n";
    for (int i = ans.size() - 1; i > -1; i--) cout << ans[i] << ' ';
  } else
    cout << "NO\n";
  return 0;
}
