#include <bits/stdc++.h>
using namespace std;
int bs(int a[], int l, int u, int x) {
  int m, p = -1;
  while (l <= u) {
    m = (l + u) / 2;
    if (a[m] == x || (a[m] < x && m + 1 <= u && a[m + 1] >= x))
      return m;
    else if (a[m] < x) {
      p = m;
      l = m + 1;
    } else {
      u = m - 1;
    }
  }
  return p;
}
int gc(int a, int b) {
  if (!a) return b;
  return gc(b % a, a);
}
bool isP(unsigned long long int x) {
  if (x == 2) return true;
  if (x % 2 == 0 || x <= 1) return false;
  for (int i = 3; i <= sqrt(x); i += 2) {
    if ((x % i) == 0) return false;
  }
  return true;
}
int main() {
  int n, j, g, g1, pre, i, uc, f4, l, v, li, ri, a4, e1, ind, t3, n9, t, r, f,
      c1, p, p1, p3, y, x, z, t1, t2, t3n, m, k;
  int a[100000];
  unordered_map<string, int> mp;
  priority_queue<pair<int, int>> pq;
  int ty = 0, ty1;
  set<int> st;
  set<int> sto;
  ty = INT_MAX;
  g = 0;
  vector<int> ar;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    g += a[i];
  }
  f = 1;
  if (g % k != 0)
    cout << "No\n";
  else {
    g1 = 0;
    ind = 0;
    for (i = 0; i < n; i++) {
      g1 += a[i];
      ind++;
      if (g1 == (g / k)) {
        ar.push_back(ind);
        g1 = 0;
        ind = 0;
      } else if (g1 > (g / k)) {
        f = 0;
        cout << "No\n";
        break;
      }
    }
    if (f) {
      cout << "Yes\n";
      for (i = 0; i < ar.size(); i++) cout << ar[i] << " ";
      cout << "\n";
    }
  }
  return 0;
}
