#include <bits/stdc++.h>
long long pow(int a, int b) {
  if (b == 0 || a == 1) return 1;
  if (b % 2 == 0)
    return pow(a, b / 2) * pow(a, b / 2);
  else
    return pow(a, b / 2) * pow(a, b / 2) * a;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a > b)
    return gcd(a % b, b);
  else
    return gcd(b % a, a);
}
using namespace std;
int m, q[10000];
char s[100];
int r(int n, int d) {
  for (int &w = q[n] = d + 1; n <= m && w < 11; w++)
    if (w != q[n - 1] && (s[w - 1] != '0') && r(n + 1, w - d) != 0) return 1;
  return n > m;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s >> m;
  if (r(1, 0) == 1)
    cout << "YES\n";
  else
    cout << "NO";
  for (int i = 0; q[m + 1] != 0 && i < m; i++) cout << q[i + 1] << " ";
  return 0;
}
