#include <bits/stdc++.h>
using namespace std;
int N, K, arr[100005];
int s = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N >> K;
  for (int i = 0; i < N; i++) {
    cin >> arr[i];
    s += arr[i];
  }
  if (s % K != 0) {
    cout << "No" << endl;
    return 0;
  }
  int avg = s / K;
  vector<int> ans;
  int idx = 0, currs = 0;
  for (int i = 0; i < K; i++) {
    currs = 0;
    int j = idx;
    while (j < N) {
      currs += arr[j];
      if (currs == avg) {
        break;
      }
      j++;
    }
    if (j == N + 1) {
      cout << "No" << endl;
      return 0;
    }
    ans.push_back(j - idx + 1);
    idx = j + 1;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << (i == ans.size() - 1 ? "\n" : " ");
  }
  return 0;
}
