#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long expo(long long x, long long y) {
  long long res = 1LL;
  while (y) {
    if (y & 1) res = (res * x) % 1000000007;
    x = (x * x) % 1000000007;
    y /= 2;
  }
  return res;
}
class matrix {
 public:
  long long a[3][3];
  matrix() { memset(a, 0, sizeof a); }
  long long *operator[](long long i) { return a[i]; }
  matrix operator*(matrix b) {
    matrix c;
    long long i, j, k;
    for (i = 0; i < 3; i++)
      for (j = 0; j < 3; j++)
        for (k = 0; k < 3; k++)
          c[i][j] = (c[i][j] + (a[i][k] * b[k][j]) % 1000000007) % 1000000007;
    return c;
  }
};
matrix expo(matrix x, long long y) {
  matrix res;
  long long i;
  for (i = 0; i < 3; i++) res[i][i] = 1;
  while (y) {
    if (y & 1) res = (res * x);
    x = (x * x);
    y /= 2;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k, i, a[100005], x, y, s = 0;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    s += a[i];
  }
  if (s % k) {
    return cout << "No", 0;
  }
  x = s / k;
  y = 0;
  s = 0;
  vector<long long> v;
  for (i = 0; i < n; i++) {
    s += a[i];
    y++;
    if (s == x) {
      v.push_back(y);
      y = 0;
      s = 0;
    } else if (s > x)
      return cout << "No", 0;
  }
  cout << "Yes\n";
  for (auto it : v) cout << it << " ";
}
