#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> p1, pair<int, int> p2) {
  return abs(p1.first) + abs(p1.second) < abs(p2.first) + abs(p2.second);
}
vector<int> v, ans;
bool dfs(vector<int> t, int s1, int s2, int f, int m, int prev) {
  t.push_back(prev);
  if (m == 0) {
    ans = t;
    return true;
  }
  if (f == 1) {
    for (int i = 0; i < v.size(); i += 1) {
      if (s2 + v[i] > s1 && v[i] != prev) {
        f = 0;
        if (dfs(t, s1, s2 + v[i], f, m - 1, v[i])) return true;
      }
    }
  } else {
    for (int i = 0; i < v.size(); i += 1) {
      if (s1 + v[i] > s2 && v[i] != prev) {
        f = 1;
        if (dfs(t, s1 + v[i], s2, f, m - 1, v[i])) return true;
      }
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int m, s1 = 0, s2 = 0, cnt = 0, prev = -1, f = 0, curr;
  string s;
  cin >> s >> m;
  for (int i = 0; i < 10; i += 1)
    if ((int)(s[i] - '0')) v.push_back(i + 1);
  for (int i = 0; i < v.size(); i += 1) {
    int s1 = v[i], s2 = 0, f = 1, prev = v[i];
    vector<int> t;
    if (dfs(t, s1, s2, f, m - 1, prev)) {
      cout << "YES" << endl;
      for (int i = 0; i < ans.size(); i += 1) cout << ans[i] << " ";
      return 0;
    }
  }
  cout << "NO";
}
