#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005], c[100005];
long long sum, n, k, now;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  if (sum % k) {
    cout << "No";
    return 0;
  }
  sum /= k;
  int m = 1;
  for (int i = 1; i <= n; i++) {
    now += a[i];
    if (now == sum) {
      c[m] = i;
      b[m] = i - c[m - 1];
      m++;
      now = 0;
    }
    if (now > sum) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes\n";
  for (int i = 1; i < m; i++) cout << b[i] << " ";
  return 0;
}
