#include <bits/stdc++.h>
using namespace std;
vector<int> v;
bool sizecom(const vector<int>& v1, const vector<int>& v2) {
  return v1.size() > v2.size();
}
long long GCD(long long A, long long B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
bool dfs(int sum, int prev, int n, int m, string s) {
  bool check = 0;
  if (n == m) return true;
  for (int i = 0; i < 10; i++) {
    if (s[i] == '1') {
      if (i != prev && sum >= 0 && sum - i - 1 < 0)
        check = dfs(sum - i - 1, i, n + 1, m, s);
      else if (i != prev && sum < 0 && sum + i + 1 > 0)
        check = dfs(sum + i + 1, i, n + 1, m, s);
      if (check) {
        v.push_back(i + 1);
        return true;
      }
    }
  }
  return 0;
}
int main() {
  string s;
  cin >> s;
  int m, c = 0;
  cin >> m;
  c = dfs(0, -1, 0, m, s);
  if (c) {
    cout << "YES" << endl;
    for (int i = v.size() - 1; i >= 0; i--) {
      cout << v[i] << " ";
    }
  } else
    cout << "NO";
  cout << endl;
}
