#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, k, a[N];
vector<int> ans;
int main() {
  cin >> n >> k;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  if (sum % k != 0) {
    cout << "No";
    return 0;
  } else
    sum = sum / k;
  int have = 0, took = 0;
  for (int i = 0; i < n; i++) {
    have += a[i];
    took++;
    if (have > sum) {
      cout << "No" << endl;
      return 0;
    }
    if (have == sum) {
      ans.push_back(took);
      took = 0;
      have = 0;
    }
  }
  if (took == 0 && have == 0) {
    cout << "Yes" << endl;
    for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  } else
    cout << "No" << endl;
  return 0;
}
