#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  vector<long long> A(n);
  for (int i = 0; i < n; ++i) cin >> A[i];
  long long sum = accumulate(A.begin(), A.end(), 0ll);
  if (sum % k != 0) cout << "No\n", exit(0);
  long long cur = 0, t = 0;
  vector<long long> ans;
  for (long long a : A) {
    ++t;
    cur += a;
    if (cur > sum / k)
      cout << "No\n", exit(0);
    else if (cur == sum / k)
      ans.push_back(t), t = cur = 0;
  }
  cout << "Yes\n";
  for (int i = 0; i < ans.size(); ++i)
    cout << ans[i] << " \n"[i == ans.size() - 1];
}
