#include <bits/stdc++.h>
using namespace std;
int soma[100100];
int seq[100100];
int n, k;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int i;
  cin >> n >> k;
  int sum = 0;
  for (i = 1; i <= n; i++) {
    cin >> seq[i];
    sum += seq[i];
  }
  if (sum % k != 0) {
    cout << "No" << endl;
    return 0;
  }
  int fatia = sum / k;
  int ax = 0;
  int qtd = 0;
  vector<int> res;
  for (i = 1; i <= n; i++) {
    ax += seq[i];
    qtd++;
    if (ax == fatia) {
      res.push_back(qtd);
      ax = 0;
      qtd = 0;
    }
  }
  if ((int)res.size() == k) {
    cout << "Yes" << endl;
    for (i = 0; i < (int)res.size(); i++) {
      cout << res[i];
      if (i != (int)res.size() - 1) cout << " ";
    }
    cout << endl;
  } else {
    cout << "No" << endl;
  }
}
