Problem: The farmer Polycarp has a warehouse with hay, which can be represented as an n × m rectangular table, where n is the number of rows, and m is the number of columns in the table. Each cell of the table contains a haystack. The height in meters of the hay located in the i-th row and the j-th column is equal to an integer ai, j and coincides with the number of cubic meters of hay in the haystack, because all cells have the size of the base 1 × 1. Polycarp has decided to tidy up in the warehouse by removing an arbitrary integer amount of cubic meters of hay from the top of each stack. You can take different amounts of hay from different haystacks. Besides, it is allowed not to touch a stack at all, or, on the contrary, to remove it completely. If a stack is completely removed, the corresponding cell becomes empty and no longer contains the stack.

Polycarp wants the following requirements to hold after the reorganization:

  * the total amount of hay remaining in the warehouse must be equal to k, 
  * the heights of all stacks (i.e., cells containing a non-zero amount of hay) should be the same, 
  * the height of at least one stack must remain the same as it was, 
  * for the stability of the remaining structure all the stacks should form one connected region. 



The two stacks are considered adjacent if they share a side in the table. The area is called connected if from any of the stack in the area you can get to any other stack in this area, moving only to adjacent stacks. In this case two adjacent stacks necessarily belong to the same area.

Help Polycarp complete this challenging task or inform that it is impossible.

Input

The first line of the input contains three integers n, m (1 ≤ n, m ≤ 1000) and k (1 ≤ k ≤ 1018) — the number of rows and columns of the rectangular table where heaps of hay are lain and the required total number cubic meters of hay after the reorganization. 

Then n lines follow, each containing m positive integers ai, j (1 ≤ ai, j ≤ 109), where ai, j is equal to the number of cubic meters of hay making the hay stack on the i-th row and j-th column of the table.

Output

In the first line print "YES" (without quotes), if Polycarpus can perform the reorganisation and "NO" (without quotes) otherwise. If the answer is "YES" (without quotes), then in next n lines print m numbers — the heights of the remaining hay stacks. All the remaining non-zero values should be equal, represent a connected area and at least one of these values shouldn't be altered.

If there are multiple answers, print any of them.

Examples

Input

2 3 35
10 4 9
9 9 7


Output

YES
7 0 7 
7 7 7 


Input

4 4 50
5 9 1 1
5 1 1 5
5 1 5 5
5 5 7 1


Output

YES
5 5 0 0 
5 0 0 5 
5 0 5 5 
5 5 5 0 


Input

2 4 12
1 1 3 1
1 6 2 4


Output

NO

Note

In the first sample non-zero values make up a connected area, their values do not exceed the initial heights of hay stacks. All the non-zero values equal 7, and their number is 5, so the total volume of the remaining hay equals the required value k = 7·5 = 35. At that the stack that is on the second line and third row remained unaltered.

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;
public class F {
	static int n,m;
	public static void main(String[] args) throws IOException {
		
		FastScanner qwe = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		 n= qwe.nextInt();
		 m = qwe.nextInt();
		long k = qwe.nextLong();
		
		ArrayList<pos> pnts = new ArrayList<pos>();
		
		int[][] hay= new int[n][m];
		for (int i = 0; i < hay.length; i++) {
			for (int j = 0; j < hay[0].length; j++) {
				hay[i][j] = qwe.nextInt();
				
				pnts.add(new pos(i,j,hay[i][j]));
			}
		}
		
		Collections.sort(pnts);
		
		DisjointSet ds = new DisjointSet(n*m);
		boolean[][] putdown = new boolean[n][m];
		
		int[] dr = {-1,1,0,0};
		int[] dc = {0,0,-1,1};
		int[][] ans = null;
		for(pos p : pnts){
			
				putdown[p.r][p.c] = true;
				
				for(int t = 0; t < dr.length; t++){
					int nr = p.r +dr[t];
					int nc = p.c +dc[t];
					
					if(nr >= 0 && nc >=0 && nr < n && nc < m && putdown[nr][nc]){
						ds.union(p.gethash(), m*nr+nc);
					}
					
					
				}
				
				if(k % p.size == 0 && ds.getsize(p.gethash()) >= k/p.size){
					ans = setans(p.r,p.c,p.size,putdown,k/p.size);
					break;
				}
				
				
			
			
		}
		
		if(ans == null) out.println("NO");
		else{
			out.println("YES");
			for (int i = 0; i < ans.length; i++) {
				StringBuilder str = new StringBuilder("");
				for (int j = 0; j < ans[0].length; j++) {
					str.append(ans[i][j]+" ");
				}
				out.println(str);
			}
		}
		
		
		out.close();
	}
	
	static int[][] setans(int sr, int sc, int value, boolean[][] putdown, long needed){
		int[][] ret = new int[putdown.length][putdown[0].length];
		
		boolean[][] seen = new boolean[ret.length][ret[0].length];
		int[] dr = {-1,1,0,0};
		int[] dc = {0,0,-1,1};
		
		ArrayDeque<Integer> dq = new ArrayDeque<Integer>();
		dq.add(sr);
		dq.add(sc);
		ret[sr][sc] = value;
		needed--;
		seen[sr][sc] = true;
		
		while(needed > 0){
			int r = dq.poll();
			int c = dq.poll();
			
			//System.out.println("at " + r + " " + c);
			
			for(int t = 0; t < dr.length; t++){
				int nr = r +dr[t];
				int nc = c +dc[t];
				
				if(nr >= 0 && nc >=0 && nr < n && nc < m && putdown[nr][nc] && !seen[nr][nc] && needed > 0){
					seen[nr][nc] = true;
					ret[nr][nc] = value;
					needed--;
					dq.add(nr);
					dq.add(nc);
				}
				
			}
			
		}
		
		
		return ret;
	}
	
	static class pos implements Comparable<pos>{
		int r, c, size;

		public pos(int r, int c, int size) {
			this.r = r;
			this.c = c;
			this.size = size;
		}
		
		public int gethash(){
			return m*r+c;
		}
		
		public int compareTo(pos o) {
			return o.size-size;
		}
		
	}
	
	static class DisjointSet {
		int[] p, r;
		int[] size;
		DisjointSet(int s) {
			p = new int[s];
			r = new int[s];
			size = new int[s];
			for (int i = 0; i < s; i++)
			{
				p[i] = i;
				size[i]= 1;
			}

		}
		
		void union(int x, int y) {
			int a = find(x);
			int b = find(y);
			if (a == b)
				return;
			if (r[a] == r[b])
			{
				size[a] += size[b];
				r[p[b] = a]++;
			}
			else
			{
				if(r[a] < r[b]) size[b] += size[a];  
				else size[a] += size[b];
				
				p[a] = p[b] = r[a] < r[b] ? b : a;
			}
		}
		
		int getsize(int x){
			return size[find(x)];
		}
		
		int find(int x) {
			return p[x] = p[x] == x ? x : find(p[x]);
		}
	}
	
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner(InputStream in) throws IOException{
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer(br.readLine().trim());
		}
		public int numTokens() throws IOException {
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return numTokens();
			}
			return st.countTokens();
		}
		public String next() throws IOException {
			if(!st.hasMoreTokens()){
				st = new StringTokenizer(br.readLine().trim());
				return next();
			}
			return st.nextToken();
		}
		public double nextDouble() throws IOException{
			return Double.parseDouble(next());
		}
		public float nextFloat() throws IOException{
			return Float.parseFloat(next());
		}
		public long nextLong() throws IOException{
			return Long.parseLong(next());
		}
		public int nextInt() throws IOException{
			return Integer.parseInt(next());
		}
		public String nextLine() throws IOException{
			return br.readLine().trim();
		}
	}

}