#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int a[100000];
int main() {
  int n, k;
  cin >> n >> k;
  int sum = 0;
  bool ok = false;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum % k != 0) {
    printf("No\n");
  } else {
    sum /= k;
    int temp = 0;
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      temp += a[i];
      cnt++;
      if (temp > sum) {
        printf("No\n");
        ok = true;
        break;
      } else if (temp == sum) {
        temp = 0;
        ans.push_back(cnt);
        cnt = 0;
      }
    }
    if (!ok) {
      printf("Yes\n");
      for (int i = 0; i < ans.size(); i++) {
        if (i > 0) printf(" ");
        printf("%d", ans[i]);
      }
      printf("\n");
    }
  }
  return 0;
}
