#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k, sum = 0, curr = 0, j = 0;
  vector<long long int> a(100000), res;
  cin >> n >> k;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum % k) {
    cout << "No";
  } else {
    for (long long int i = 0; i < n; i++) {
      curr += a[i];
      if (curr == sum / k) {
        res.push_back(i + 1 - j);
        j = i + 1;
        curr = 0;
      }
    }
    if (res.size() == k) {
      cout << "Yes" << endl;
      for (long long int i = 0; i < k; i++) {
        cout << res[i] << " ";
      }
    } else
      cout << "No";
  }
  return 0;
}
