#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long a[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum % k != 0) {
    cout << "No";
    return 0;
  }
  int p = 0;
  long long c = sum / k;
  long long cur = 0;
  bool flag = true;
  vector<int> v;
  long long lp = 0;
  while (p < n) {
    cur += a[p];
    if (cur == c) {
      v.push_back(p + 1 - lp);
      cur = 0;
      lp = p + 1;
    } else if (cur > c) {
      flag = false;
      cur = 0;
      break;
    }
    p++;
  }
  if (cur == 0 && flag) {
    cout << "Yes" << endl;
    for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  } else {
    cout << "No";
  }
}
