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.awt.List;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

public class Watermelon {
	public static void main(String[] args) throws IOException{
		Main m=new Main();
		m.solve();
	}
	}
class Main{
	
	 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	 private int[] array;
	    private int[] tempMergArr;
	    private int length;
	
	    BigInteger[] temp=new BigInteger[31];
		BigInteger x,y,z;
	    StringTokenizer stringTokenizer;

	     String next() throws IOException {
	        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
	            stringTokenizer = new StringTokenizer(reader.readLine());
	        }
	        return stringTokenizer.nextToken();
	    }

	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException {
	        return Long.parseLong(next());
	    }
	    int[] marr=null;
	    int[] BIT=new int[9];
	    int[] arr=null;
	    int[][] lcsarr=null;
	    BigInteger sum=BigInteger.ZERO;
	    void solve() throws IOException  {
	      int n=this.nextInt();
	      int k=this.nextInt();
	      int p=this.nextInt();
	      int[] arr=new int[n];
	      for(int i=0;i<n;i++)
	      {
	    	  arr[i]=this.nextInt();
	      }
             
	        int ecount=0;
	      int ocount=0;
	      ArrayList<Integer> elist=new ArrayList<>();
	      ArrayList<Integer> olist=new ArrayList<>();
	      for(int i=0;i<n;i++){
	    	  if(arr[i]%2==0)
	    	  {ecount++;elist.add(arr[i]);}
	    	  else
	    	  {ocount++;olist.add(arr[i]);}
	    }
	      Extra[] err=new Extra[k];
	      for(int i=0;i<err.length;i++)
	    	  err[i]=new Extra();
	      for(int i=0;i<p;i++){
	    	  if(ecount>0)
	    	  { ecount--;}
	    	  else
	    		  ocount-=2;
	      }
	      for(int i=0;i<k-p;i++){
	    	  ocount-=1;
	      }
	      if(ocount<0||ocount%2!=0){
	    	  System.out.println("NO");
	    	  System.exit(0);
	      }
	      
	      System.out.println("YES");
	      ecount=elist.size();
	      ocount=olist.size();
	      int x=-1;
	      for(int i=0;i<p;i++){
	    	  if(ecount>0)
	    	  { 
	    		 err[i].list.add(elist.get(elist.size()-1));
	    	     elist.remove(elist.size()-1);
		         ecount--;
		     }
	    	  else{
	    			 err[i].list.add(olist.get(olist.size()-1));
		    	     olist.remove(olist.size()-1);
		    	     err[i].list.add(olist.get(olist.size()-1));
		    	     olist.remove(olist.size()-1);
			         ocount-=2;
			      
	    	  }
	    	  x=i;
	    	}
	      int temp=x+1;
	      for(int i=0;i<k-p;i++){
	    	   x++;
	    	   err[x].list.add(olist.get(olist.size()-1));
	    	   olist.remove(olist.size()-1);
	    	   ocount-=1;
	    	}
	      
	      if(elist.size()!=0&&p!=0)
	      {
	    	  for(int i=0;i<elist.size();i++){
	    		  err[0].list.add(elist.get(i));
	    	  }
	      }
	      if(elist.size()!=0&&p==0)
	      {
	    	  for(int i=0;i<elist.size();i++){
	    		  err[temp].list.add(elist.get(i));
	    	  }
	      }
	      if(olist.size()!=0&&p!=0&&olist.size()%2==0)
	      {
	    	  for(int i=0;i<olist.size();i++){
	    		  err[0].list.add(olist.get(i));
	    	  }
	      }
	      if(olist.size()!=0&&p==0&&olist.size()%2==0)
	      {
	    	  for(int i=0;i<olist.size();i++){
	    		  err[temp].list.add(olist.get(i));
	    	  }
	      }
	      if(olist.size()!=0&&(k-p)!=0&&olist.size()%2!=0)
	      {
	    	  for(int i=0;i<olist.size();i++){
	    		  err[temp].list.add(olist.get(i));
	    	  }
	      }
	       
	      for(int i=0;i<k;i++)
	    	  err[i].display();
	      
	   }
	    void recurs(int[] arr,int x){
	    	if(x>arr.length)
	    		return;
            for(int i=arr.length-x;i<arr.length;i++)
            	sum=sum.add(BigInteger.valueOf(arr[i]));
            recurs(arr,x*4);
	    }
	    static int max_LIS=0;
	   
	    public int LIS(int[] arr,int n){
	    	if(n==0)
	    		{
	    		marr[0]=1;
	    		return 1;
	    		}
	    	
	    	int current =1;
	    	for(int i=0;i<n;i++){
	    		int subproblem=0;
	    		if(marr[i]==0)
	    		{
	    			subproblem=LIS(arr,i);
	    			marr[i]=subproblem;
	    		}
	    		else{
	    		//	System.out.println("Hey");
	    			subproblem=marr[i];
	    		}
	    		
	    		System.out.println(current+" "+subproblem+" "+i);
	    		if(arr[i]<arr[n]&&current<(1+subproblem)){
	    			current=(1+subproblem);
	    		}
	    	}
	    	if(max_LIS<current)
	    		max_LIS=current;
	    	return current;
	    }
	    public int LCS1(int i,int j){
	    	System.out.println(i+" "+j+"hey");
	    	int n=0;
	    	if(i==-1||j==-1)
	    		return 0;
	    	if(arr[i]==marr[j])
	    		n=1+LCS1(i-1,j-1);
	    	else{
	    		n=Math.max(LCS1(i-1,j), LCS1(i,j-1));
	    	}
	    	return n;
	    }
	    public int LCS(int i,int j){
	    	System.out.println(i+" "+j);
	    	int n=0;
	    	if(i==-1||j==-1)
	    		return 0;
	    	if(arr[i]==marr[j])
	    		{
	    		if(i!=0&&j!=0){
	    		if(lcsarr[i-1][j-1]==0){
	    		n=1+LCS(i-1,j-1);
	    		lcsarr[i-1][j-1]=n-1;
	    		}
	    		else{
	    			n=1+lcsarr[i-1][j-1];
	    		}
	    		}
	    	else
	    		n=1+LCS(i-1,j-1);
	    		}
	    	else{
	    		int x,y=0;
	    		if(i!=0){
	    		
	    		if(lcsarr[i-1][j]==-1)
	    		{
	    			x=LCS(i-1,j);
	    			lcsarr[i-1][j]=x;
	    		}
	    		else{
	    			x=lcsarr[i-1][j];
	    		}
	    		}
	    		else
	    			x=LCS(i-1,j);
	    		if(j!=0){
	    		if(lcsarr[i][j-1]==-1){
	    		y=LCS(i,j-1);
	    		lcsarr[i][j-1]=y;
	    		}
	    		else{
	    			y=lcsarr[i][j-1];
	    		}
	    		}
	    		else
	    			y=LCS(i,j-1);
	    		n=Math.max(x, y);
	    	}
	    	return n;
	    }
	public BigInteger comb(int n,int r){
	     x=this.temp[n];
		 y=this.temp[r];
		 z=this.temp[n-r];
	//	 System.out.println(x+" "+y+" "+z);
		 BigInteger ret=x.divide(y.multiply(z));
		 return ret;
		 
	}
	public void fact(){
		this.temp[0]=BigInteger.ONE;
		this.temp[1]=BigInteger.ONE;
		for(int i=2;i<this.temp.length;i++){
			temp[i]=(temp[i-1].multiply(BigInteger.valueOf(i)));
		}
	}
	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}
   
	static void display(int[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
		}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){
				System.out.println(arr[i]+" ");
			}	
			//System.out.println();
		
	 }
	 static void display(int[] arr){
		 for(int i=0;i<arr.length;i++)
				System.out.print(arr[i]+" ");
		System.out.println();
		 }
		 static void display(double[] arr){
		 	   for(int i=0;i<arr.length;i++){
		 		   System.out.print(arr[i]+" ");
		 	   }
		 	   System.out.println();
	    }
	 static void display(char[] arr){
		// System.out.println();
		 int t=0;
			for(int i=0;i<arr.length;i++){
				if(arr[i]!='0'){t=i;break;}
			}	
			while(t!=arr.length){
				System.out.print(arr[t]);
				t++;
			}
			System.out.println();
		
		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }
	    public void sort(int inputArr[]) {
	        this.array = inputArr;
	        this.length = inputArr.length;
	        this.tempMergArr = new int[length];
	        doMergeSort(0, length - 1);
	    }
	 
	    private void doMergeSort(int lowerIndex, int higherIndex) {
	         
	        if (lowerIndex < higherIndex) {
	            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
	            // Below step sorts the left side of the array
	            doMergeSort(lowerIndex, middle);
	            // Below step sorts the right side of the array
	            doMergeSort(middle + 1, higherIndex);
	            // Now merge both sides
	            mergeParts(lowerIndex, middle, higherIndex);
	        }
	    }
	 
	    private void mergeParts(int lowerIndex, int middle, int higherIndex) {
	 
	        for (int i = lowerIndex; i <= higherIndex; i++) {
	            tempMergArr[i] = array[i];
	        }
	        int i = lowerIndex;
	        int j = middle + 1;
	        int k = lowerIndex;
	        while (i <= middle && j <= higherIndex) {
	            if (tempMergArr[i] <= tempMergArr[j]) {
	                array[k] = tempMergArr[i];
	                i++;
	            } else {
	                array[k] = tempMergArr[j];
	                j++;
	            }
	            k++;
	        }
	        while (i <= middle) {
	            array[k] = tempMergArr[i];
	            k++;
	            i++;
	        }
	 
	    }
}


 class  Count implements Comparable {
    	    Integer i;
    	    Integer j;
            Integer k;
    	    Count(int i,int j){
    	        this.i=i;
    	        this.j=j;
    	        this.k=j-i;
    	    }
    	    public Count() {
				// TODO Auto-generated constructor stub
			}
			void display(){
    	    	System.out.println(i+" "+j+" "+k);
    	    }
    	    
    	    	@Override
    		public int compareTo(Object o) {
    			// TODO Auto-generated method stub
    			Count c=(Count)o;
    			if(j.compareTo(c.j)>0)
    				return 1;
    			else if(j.compareTo(c.j)<0)
    				return -1;
    			else{
    				return 0;
    				
    			}
    		}
    		
    	}

 class  Counti implements Comparable {
    	    Integer i;
    	    int j;
    	    int k;
    	    Counti(int i,int j,int k){
    	        this.j=j;
    	        this.i=i;
    	        this.k=k;
    	    }
    	    void display(){
    	    	System.out.println(i+" "+j+" "+k);
    	    }
    	    
    	    	@Override
    		public int compareTo(Object o) {
    			// TODO Auto-generated method stub
    			Counti c=(Counti)o;
    			if(i.compareTo(c.i)>0)
    				return 1;
    			else if(i.compareTo(c.i)<0)
    	    		return -1;
    			else
    				return 0;
    		}
    	}
		
 class Extra{
	 ArrayList<Integer> list=new ArrayList<>();
	 Extra(int i){
		 
	 }
	 public Extra() {
		// TODO Auto-generated constructor stub
	}
	void display(){
		 System.out.print(list.size()+" ");
		 for(int i=0;i<list.size();i++){
			 System.out.print(list.get(i)+" ");
		 }
		 System.out.println();
	 }
 }