#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
long long a[100010];
long long sum, n, k, cnt, actualsum, avg;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum % k) {
    cout << "No" << '\n';
    return 0;
  }
  avg = sum / k;
  for (int i = 0; i < n; i++) {
    cnt++;
    actualsum += a[i];
    if (actualsum == avg) {
      ans.push_back(cnt);
      cnt = 0;
      actualsum = 0;
    } else {
      if (actualsum > avg) {
        cout << "No" << '\n';
        return 0;
      }
    }
  }
  cout << "Yes" << '\n';
  for (int h : ans) {
    cout << h << " ";
  }
  return 0;
}
