#include <bits/stdc++.h>
using namespace std;
map<long long, vector<long long>> mpp;
long long m;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long po(long long base, long long powerRaised) {
  if (powerRaised != 0)
    return (base * po(base, powerRaised - 1));
  else
    return 1;
}
long long dfs(long long sum, long long prev, long long cnt,
              vector<long long> res) {
  if (abs(sum) > 10 || (sum == 0 && cnt != 0)) return 0;
  if (cnt == m) {
    cout << "YES" << endl;
    for (int i : res) cout << i << " ";
    exit(0);
  }
  for (int i : mpp[prev]) {
    if (cnt % 2 == 0) {
      if (sum + i > 0) {
        res.push_back(i);
        dfs(sum + i, i, cnt + 1, res);
        res.erase(res.end() - 1);
      }
    } else {
      if (sum - i < 0) {
        res.push_back(i);
        dfs(sum - i, i, cnt + 1, res);
        res.erase(res.end() - 1);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  cin >> m;
  vector<long long> v;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1') v.push_back(i + 1);
  }
  for (int i : v) mpp[0].push_back(i);
  for (int i = 0; i < v.size(); i++) {
    for (int j = 0; j < v.size(); j++) {
      if (i != j) mpp[v[i]].push_back(v[j]);
    }
  }
  vector<long long> ans;
  dfs(0, 0, 0, ans);
  cout << "NO";
  return 0;
}
