#include <bits/stdc++.h>
using namespace std;
int n, k, a[100005], b[100005], s;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i), s += a[i];
  if (s % k)
    puts("No");
  else {
    s /= k;
    int p = 1, d = 0;
    for (int i = 1; i <= k; ++i) {
      d = 0;
      while (1) {
        d += a[p];
        if (d > s || p > n) return puts("No"), 0;
        ++p;
        if (d == s) {
          b[i] = p - 1;
          break;
        }
      }
    }
    puts("Yes");
    for (int i = 1; i <= k; ++i) printf("%d ", b[i] - b[i - 1]);
  }
}
