#include <bits/stdc++.h>
using namespace std;
char s[15];
int a[1005];
int main() {
  scanf("%s", s + 1);
  int flag = 0, p;
  for (int i = 1; i <= 10; i++) {
    if (s[i] == '1' && flag == 0) {
      p = i;
      flag = 1;
    }
  }
  int m;
  scanf("%d", &m);
  int s1 = 0, s2 = 0;
  int t = 0, ans;
  int l = -5;
  flag = 0;
  for (int k = 1; k <= 10; k++) {
    if (s[k] == '1') {
      s1 = k;
      s2 = 0;
      l = k;
      t = 1;
      a[t] = k;
      for (int i = 2; i <= m; i++) {
        if (i % 2 != 0) {
          if (s1 >= s2) {
            for (int j = 1; j <= 10; j++) {
              if (s[j] == '1' && j != l) {
                s1 += j;
                t++;
                a[t] = j;
                l = j;
                break;
              }
            }
          } else {
            ans = s2 - s1;
            for (int j = ans + 1; j <= 10; j++) {
              if (s[j] == '1' && l != j) {
                s1 += j;
                t++;
                a[t] = j;
                l = j;
                break;
              }
            }
          }
        } else {
          if (s1 <= s2) {
            for (int j = 1; j <= 10; j++) {
              if (s[j] == '1' && l != j) {
                s2 += j;
                t++;
                a[t] = j;
                l = j;
                break;
              }
            }
          } else {
            ans = s1 - s2;
            for (int j = ans + 1; j <= 10; j++) {
              if (s[j] == '1' && l != j) {
                s2 += j;
                t++;
                a[t] = j;
                l = j;
                break;
              }
            }
          }
        }
      }
      if (t < m)
        continue;
      else {
        printf("YES\n");
        for (int i = 1; i <= t; i++) {
          if (i != t)
            printf("%d ", a[i]);
          else
            printf("%d\n", a[i]);
        }
        return 0;
      }
    }
  }
  printf("NO\n");
  return 0;
}
