#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool chkmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 10;
int a[N], ans[N];
inline int read() {
  int x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') flag = -1, ch = getchar();
  while (isdigit(ch)) x = (x << 3) + (x << 1) + (ch - '0'), ch = getchar();
  return x * flag;
}
int main() {
  int n = read(), k = read(), sum = 0;
  for (int i = (1), iend = (n); i <= iend; i++) a[i] = read(), sum += a[i];
  if (sum % k) return puts("No"), 0;
  int cur = 1, lim = sum / k;
  sum = 0;
  for (int i = (1), iend = (n); i <= iend; i++) {
    sum += a[i], ans[cur]++;
    if (sum == lim) cur++, sum = 0;
    if (sum > lim) return puts("No"), 0;
  }
  puts("Yes");
  for (int i = (1), iend = (cur - 1); i <= iend; i++)
    printf("%d%c", ans[i], i == iend ? '\n' : ' ');
  return 0;
}
