#include <bits/stdc++.h>
int main() {
  int n, k;
  std::cin >> n >> k;
  int sum = 0;
  std::vector<int> duration(n);
  for (int i = 0; i < n; i++) {
    std::cin >> duration[i];
    sum += duration[i];
  }
  if (sum % k != 0) {
    std::cout << "No" << std::endl;
    return 0;
  }
  std::stringstream ans;
  ans << "Yes" << std::endl;
  int block_size = sum / k;
  int block_sum = 0;
  int block_count = 0;
  for (int i = 0; i < n; i++) {
    block_sum += duration[i];
    ++block_count;
    if (block_sum == block_size) {
      ans << block_count << " ";
      block_count = 0;
      block_sum = 0;
    } else if (block_sum > block_size) {
      std::cout << "No" << std::endl;
      return 0;
    }
  }
  std::cout << ans.str() << std::endl;
  return 0;
}
