Problem: Devu being a small kid, likes to play a lot, but he only likes to play with arrays. While playing he came up with an interesting question which he could not solve, can you please solve it for him?

Given an array consisting of distinct integers. Is it possible to partition the whole array into k disjoint non-empty parts such that p of the parts have even sum (each of them must have even sum) and remaining k - p have odd sum? (note that parts need not to be continuous).

If it is possible to partition the array, also give any possible way of valid partitioning.

Input

The first line will contain three space separated integers n, k, p (1 ≤ k ≤ n ≤ 105; 0 ≤ p ≤ k). The next line will contain n space-separated distinct integers representing the content of array a: a1, a2, ..., an (1 ≤ ai ≤ 109).

Output

In the first line print "YES" (without the quotes) if it is possible to partition the array in the required way. Otherwise print "NO" (without the quotes).

If the required partition exists, print k lines after the first line. The ith of them should contain the content of the ith part. Print the content of the part in the line in the following way: firstly print the number of elements of the part, then print all the elements of the part in arbitrary order. There must be exactly p parts with even sum, each of the remaining k - p parts must have odd sum.

As there can be multiple partitions, you are allowed to print any valid partition.

Examples

Input

5 5 3
2 6 10 5 9


Output

YES
1 9
1 5
1 10
1 6
1 2


Input

5 5 3
7 14 2 9 5


Output

NO


Input

5 3 1
1 2 3 7 5


Output

YES
3 5 1 3
1 7
1 2

Solution (in JAVA):

Solution:
//################################################################################################################
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.InputMismatchException;
import java.util.List;

//################################################################################################################
public class R251D2C {
	public static void main(String[] args) {
		R251D2C c = new R251D2C();
		InputReader1 reader = c.new InputReader1(System.in);
		OutputWriter writer = c.new OutputWriter(System.out);
		// put your code here
		int n = reader.readInt();
		int k = reader.readInt();
		int p = reader.readInt();
		int[] a = new int[n];
		int ec = 0;
		int oc = 0;
		List<Integer> evens = new ArrayList<Integer>();
		List<Integer> odds = new ArrayList<Integer>();
		List<List<Integer>> eparts = new ArrayList<List<Integer>>();
		List<List<Integer>> oparts = new ArrayList<List<Integer>>();
		for (int i = 0; i < a.length; i++) {
			a[i] = reader.readInt();
			if (a[i] % 2 == 0) {
				evens.add(a[i]);
			} else {
				odds.add(a[i]);
			}
		}
		ec = evens.size();
		oc = odds.size();
		boolean possible = true;
		if (oc < k - p) {
			possible = false;
			// writer.println("NO");
		} else if (p == 0) {
			// oc >= k - p
			int exo = oc - k;
			if (exo % 2 != 0) {
				possible = false;
			} else {
				for (int j = 0; j < (k - 1); j++) {
					List<Integer> opart = new ArrayList<Integer>();
					opart.add(odds.get(j));
					oparts.add(opart);
				}
				List<Integer> tepart = new ArrayList<Integer>();
				for (int j = k - 1; j < oc; j++) {
					tepart.add(odds.get(j));
				}
				for (int j = 0; j < ec; j++) {
					tepart.add(evens.get(j));
				}
				oparts.add(tepart);
			}
		} else {
			if (ec > p) {
				if (oc > k - p) {
					// reduce e & o
					int exo = oc - (k - p);
					if (exo % 2 != 0) {
						possible = false;
					} else {
						possible = true;
						// combine all extra odd nums in to a single even no
						for (int j = 0; j < (k - p); j++) {
							List<Integer> opart = new ArrayList<Integer>();
							opart.add(odds.get(j));
							oparts.add(opart);
						}
						List<Integer> tepart = new ArrayList<Integer>();
						for (int j = k - p; j < oc; j++) {
							tepart.add(odds.get(j));
						}
						// combine all extra even nums into a single even no and
						// merge with an even num
						for (int j = 0; j < p - 1; j++) {
							List<Integer> epart = new ArrayList<Integer>();
							epart.add(evens.get(j));
							eparts.add(epart);
						}
						for (int j = p - 1; j < ec; j++) {
							tepart.add(evens.get(j));
						}
						eparts.add(tepart);
					}
				} else if (oc == k - p) {
					possible = true;
					for (int j = 0; j < (k - p); j++) {
						List<Integer> opart = new ArrayList<Integer>();
						opart.add(odds.get(j));
						oparts.add(opart);
					}
					// reduce e
					List<Integer> epart;
					for (int j = 0; j < p - 1; j++) {
						epart = new ArrayList<Integer>();
						epart.add(evens.get(j));
						eparts.add(epart);
					}
					epart = new ArrayList<Integer>();
					for (int j = p - 1; j < ec; j++) {
						epart.add(evens.get(j));
					}
					eparts.add(epart);
				} else {
					// not possible
				}
			} else if (ec == p) {
				if (oc > k - p) {
					int exo = oc - (k - p);
					if (exo % 2 != 0) {
						possible = false;
					} else {
						possible = true;
						// combine all extra odd nums in to a single even no
						// merge 2 even nums
						for (int j = 0; j < (k - p); j++) {
							List<Integer> opart = new ArrayList<Integer>();
							opart.add(odds.get(j));
							oparts.add(opart);
						}
						List<Integer> tepart = new ArrayList<Integer>();
						for (int j = k - p; j < oc; j++) {
							tepart.add(odds.get(j));
						}
						for (int j = 0; j < p - 1; j++) {
							List<Integer> epart = new ArrayList<Integer>();
							epart.add(evens.get(j));
							eparts.add(epart);
						}
						tepart.add(evens.get(p - 1));
						eparts.add(tepart);
					}
				} else if (oc == k - p) {
					possible = true;
					for (int j = 0; j < (k - p); j++) {
						List<Integer> opart = new ArrayList<Integer>();
						opart.add(odds.get(j));
						oparts.add(opart);
					}
					for (int j = 0; j < p; j++) {
						List<Integer> epart = new ArrayList<Integer>();
						epart.add(evens.get(j));
						eparts.add(epart);
					}
				} else {
					// not possible
				}

			} else {
				int defe = p - ec;
				if (oc > k - p) {
					int exo = oc - (k - p);
					if (exo % 2 != 0) {
						possible = false;
					} else {
						if (exo / 2 < defe) {
							possible = false;
						} else {
							possible = true;
							for (int j = 0; j < (k - p); j++) {
								List<Integer> opart = new ArrayList<Integer>();
								opart.add(odds.get(j));
								oparts.add(opart);
							}
							for (int j = 0; j < ec; j++) {
								List<Integer> epart = new ArrayList<Integer>();
								epart.add(evens.get(j));
								eparts.add(epart);
							}
							int i = k - p;
							for (int j = 0; j < defe - 1; j++) {
								List<Integer> epart = new ArrayList<Integer>();
								epart.add(odds.get(i));
								epart.add(odds.get(i + 1));
								eparts.add(epart);
								i += 2;
							}
							List<Integer> epart = new ArrayList<Integer>();
							while (i < oc) {
								epart.add(odds.get(i));
								i++;
							}
							eparts.add(epart);
						}
					}
				} else if (oc == k - p) {
					possible = false;
				} else {
					// not possible
				}
			}
		}
		if (possible) {
			writer.println("YES");
			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < p; i++) {
				List<Integer> tmp = eparts.get(i);
				sb.delete(0, sb.length());
				sb.append(eparts.get(i).size());
				for (Integer integer : tmp) {
					sb.append(" " + integer);
				}
				writer.println(sb.toString());
			}
			for (int i = 0; i < k - p; i++) {
				List<Integer> tmp = oparts.get(i);
				sb.delete(0, sb.length());
				sb.append(oparts.get(i).size());
				for (Integer integer : tmp) {
					sb.append(" " + integer);
				}
				writer.println(sb.toString());
			}
		} else {
			writer.println("NO");
		}
		reader.close();
		writer.close();
	}

	class InputReader1 {
		// private final boolean finished = false;

		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader1(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int peek() {
			if (numChars == -1)
				return -1;
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					return -1;
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar];
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int length = readInt();
			if (length < 0)
				return null;
			byte[] bytes = new byte[length];
			for (int i = 0; i < length; i++)
				bytes[i] = (byte) read();
			try {
				return new String(bytes, "UTF-8");
			} catch (UnsupportedEncodingException e) {
				return new String(bytes);
			}
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private String readLine0() {
			StringBuffer buf = new StringBuffer();
			int c = read();
			while (c != '\n' && c != -1) {
				if (c != '\r')
					buf.appendCodePoint(c);
				c = read();
			}
			return buf.toString();
		}

		public String readLine() {
			String s = readLine0();
			while (s.trim().length() == 0)
				s = readLine0();
			return s;
		}

		public String readLine(boolean ignoreEmptyLines) {
			if (ignoreEmptyLines)
				return readLine();
			else
				return readLine0();
		}

		public BigInteger readBigInteger() {
			try {
				return new BigInteger(readString());
			} catch (NumberFormatException e) {
				throw new InputMismatchException();
			}
		}

		public char readCharacter() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			return (char) c;
		}

		public double readDouble() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.') {
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, readInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.') {
				c = read();
				double m = 1;
				while (!isSpaceChar(c)) {
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, readInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public boolean isExhausted() {
			int value;
			while (isSpaceChar(value = peek()) && value != -1)
				read();
			return value == -1;
		}

		public String next() {
			return readString();
		}

		public boolean readBoolean() {
			return readInt() == 1;
		}

		public void close() {
			try {
				stream.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream stream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
					stream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void println(String s) {
			writer.println(s);
		}

		public void println(int x) {
			writer.println(x);
		}

		public void print(int x) {
			writer.print(x);
		}

		public void println(long x) {
			writer.println(x);
		}

		public void printSpace() {
			writer.print(" ");
		}

		public void close() {
			writer.close();
		}
	}
}