#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    a[i] = a[i - 1] + a[i];
  }
  bool ok = true;
  if (a[n] % k != 0)
    ok = false;
  else {
    b[0] = 0;
    int pos = 1, add = a[n] / k;
    for (int i = 1; i <= k; i++) {
      while (a[pos] < i * add) pos++;
      if (a[pos] != i * add) {
        ok = false;
        break;
      } else {
        b[i] = pos;
      }
    }
  }
  if (!ok)
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 1; i <= k; i++) {
      if (i != 1) printf(" ");
      printf("%d", b[i] - b[i - 1]);
    }
    printf("\n");
  }
  return 0;
}
