#include <bits/stdc++.h>
using namespace std;
vector<int> v, path;
int m;
bool dfs(int x, int d, int cnt) {
  path.push_back(x);
  if (cnt >= m) {
    return true;
  }
  if (d > 0) {
    for (int c1 = 0; c1 < v.size(); c1++) {
      if (v[c1] != x && (d - v[c1]) < 0 && dfs(v[c1], d - v[c1], cnt + 1))
        return true;
    }
    path.erase(path.begin() + (path.size() - 1));
    return false;
  } else if (d < 0) {
    for (int c1 = 0; c1 < v.size(); c1++) {
      if (v[c1] != x && (d + v[c1]) > 0 && dfs(v[c1], d + v[c1], cnt + 1))
        return true;
    }
    path.erase(path.begin() + (path.size() - 1));
    return false;
  } else {
    path.erase(path.begin() + (path.size() - 1));
    return false;
  }
}
int main() {
  string s;
  cin >> s;
  for (int c1 = 1; c1 < 11; c1++) {
    if (s[c1 - 1] == '1') {
      v.push_back(c1);
    }
  }
  cin >> m;
  if (v.size() == 1) {
    if (m == 1) {
      cout << "YES" << endl;
      cout << v[0] << endl;
    } else
      cout << "NO" << endl;
  } else {
    for (int c1 = 1; c1 < v.size(); c1++) {
      if (dfs(v[v.size() - 1 - c1], v[v.size() - 1 - c1], 1)) {
        cout << "YES" << endl;
        for (int c2 = 0; c2 < path.size(); c2++) {
          cout << path[c2] << ' ';
        }
        cout << endl;
        return 0;
      }
      path.clear();
    }
    cout << "NO" << endl;
  }
  return 0;
}
