#include <bits/stdc++.h>
int x[100100][2];
int e[100100];
int o[100100];
int main() {
  int yes = 1;
  int n, k, p;
  scanf("%d%d%d", &n, &k, &p);
  int EVEN = 0, ODD = 0;
  int even = 0, odd = 0;
  for (int i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    if (tmp % 2) {
      odd++;
      o[++ODD] = tmp;
    } else {
      even++;
      e[++EVEN] = tmp;
    }
  }
  for (int i = p + 1; i <= k; i++) {
    x[i][1]++;
    odd--;
    if (odd < 0) yes = 0;
  }
  int t = 0;
  while (odd >= 2) {
    t++;
    if (t > p) t = 1;
    x[t][1] += 2;
    odd -= 2;
  }
  while (even > 0) {
    t++;
    if (t > k) t = 1;
    x[t][0]++;
    even--;
  }
  if (odd || even) yes = 0;
  for (int i = 1; i <= k; i++) {
    if (!x[i][0] && !x[i][1]) {
      yes = 0;
      break;
    }
  }
  if (!yes)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= k; i++) {
      printf("%d ", x[i][0] + x[i][1]);
      for (int j = 1; j <= x[i][0]; j++) printf("%d ", e[EVEN--]);
      for (int j = 1; j <= x[i][1]; j++) printf("%d ", o[ODD--]);
      printf("\n");
    }
  }
  return 0;
}
