#include <bits/stdc++.h>
const int maxn = 1e5 + 1;
int num[maxn];
int jilu[maxn];
int main() {
  int n, k;
  int a;
  scanf("%d %d", &n, &k);
  scanf("%d", &a);
  num[1] = a;
  for (int i = 2; i <= n; ++i) {
    scanf("%d", &a);
    num[i] = num[i - 1] + a;
  }
  int d = num[n] / k;
  int p = num[n] % k;
  if (!p) {
    int cnt = 1;
    int pre = 0;
    for (int i = 1; i <= n; ++i) {
      if (num[i] == d * cnt) {
        jilu[cnt] = i - pre;
        pre = i;
        cnt++;
      }
    }
    if ((cnt - 1) != k)
      puts("No");
    else {
      puts("Yes");
      for (int i = 1; i < cnt; i++) printf("%d ", jilu[i]);
      puts("");
    }
  } else
    puts("No\n");
  return 0;
}
