#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long arr[1005][2] = {0};
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  long long m;
  string s;
  cin >> s;
  cin >> m;
  vector<long long> coin;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      coin.push_back(i + 1);
    }
  }
  long long sz = coin.size();
  if (sz == 0) {
    cout << "NO" << endl;
    return 0;
  }
  if (sz == 1) {
    if (m > 1) {
      cout << "NO" << endl;
      return 0;
    } else {
      cout << "YES\n" << coin[0] << endl;
      return 0;
    }
  }
  if (m == 1) {
    cout << "YES" << endl;
    cout << coin[0] << endl;
    return 0;
  }
  long long so = 0;
  long long se = 0;
  for (int i = 1; i <= m; i++) {
    arr[i + 1][1] = 0;
    arr[i + 1][0] = 0;
    if (i % 2 == 0) {
      se -= arr[i][0];
      for (int j = arr[i][1]; j < sz; j++) {
        if (coin[j] == arr[i - 1][0]) continue;
        if (se + coin[j] > so) {
          se += coin[j];
          arr[i][0] = coin[j];
          arr[i][1] = j + 1;
          break;
        }
      }
      if (arr[1][1] >= sz) {
        cout << "NO" << endl;
        return 0;
      }
      if (se < so) {
        i -= 2;
        continue;
      }
    }
    if (i % 2 == 1) {
      so -= arr[i][0];
      for (int j = arr[i][1]; j < sz; j++) {
        if (coin[j] == arr[i - 1][0]) continue;
        if (so + coin[j] > se) {
          so += coin[j];
          arr[i][0] = coin[j];
          arr[i][1] = j + 1;
          break;
        }
      }
      if (arr[1][1] >= sz) {
        cout << "NO" << endl;
        return 0;
      }
      if (so < se) {
        i -= 2;
        continue;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= m; i++) {
    cout << arr[i][0] << " ";
  }
  cout << endl;
  return 0;
}
