#include <bits/stdc++.h>
using namespace std;
string str;
int m, arr[1005], dp[1005][12][12];
bool fun(int idx, int prev, int reqd) {
  if (idx == m) return true;
  if (dp[idx][prev][reqd] != -1) return dp[idx][prev][reqd];
  bool temp = 0;
  for (int i = reqd + 1; i <= 10; i++) {
    if (i != prev && str[i - 1] == '1') temp = fun(idx + 1, i, i - reqd);
    if (temp) {
      arr[idx] = i;
      break;
    }
  }
  return dp[idx][prev][reqd] = temp;
}
int main() {
  memset(dp, -1, sizeof dp);
  memset(arr, 0, sizeof arr);
  cin >> str;
  cin >> m;
  if (fun(0, 0, 0)) {
    cout << "YES\n";
    for (int i = 0; i < m; i++) cout << arr[i] << " ";
  } else
    cout << "NO";
  return 0;
}
