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.math.*;
import java.io.*;

public class CF659F {
	class DSU {
		int[] parents;
		int[] cmpSize;

		public DSU(int n) {
			parents = new int[n];
			for(int i = 0 ; i < n ; i++)
				parents[i] = i;

			cmpSize = new int[n];
			Arrays.fill(cmpSize, 1);
		}

		public int find(int node) {
			if(parents[node] == node)
				return node;
			return parents[node] = find(parents[node]);
		}

		public void union(int node1, int node2) {
			int par1 = find(node1);
			int par2 = find(node2);
			if(par1 != par2) {
				parents[par1] = par2;
				cmpSize[par2] += cmpSize[par1];
			}
		}

		public int cmpSize(int node) {return cmpSize[find(node)];}
	}

	class Position implements Comparable<Position> {
		int row, col;
		long hayStack;
		public Position(int rr, int cc, long hh) {row = rr; col = cc; hayStack = hh;}
		public int compareTo(Position p) {return Long.compare(p.hayStack, hayStack);}
	}

	final long MAX = (long) 1e15;
	int[][] grid;
	int r, c;
	long k;
	int[] d = {1, -1, 0, 0};

	public CF659F(FastScanner scan, PrintWriter out) { // silly, k needs to be a long
		r = scan.nextInt(); c = scan.nextInt(); k = scan.nextLong();
		grid = new int[r][c];
		for(int i = 0 ; i < r ; i++)
			for(int j = 0 ; j < c ; j++)
				grid[i][j] = scan.nextInt();
		if(k > MAX) { // max possible value is 1e3 * 1e3 * 1e9 = 1e15
			out.println("NO");
		} else {
			Set<Long> factors = f(k);

			Position[] p = new Position[r * c];
			for(int i = 0 ; i < r ; i++) {
				for(int j = 0 ; j < c ; j++) {
					int k = (i * c) + j;
					p[k] = new Position(i, j, grid[i][j]);
				}
			}

			Arrays.sort(p);

			DSU dsu = new DSU(r * c);

			for(int i = 0 ; i < r * c ; i++) {
				int row = p[i].row, col = p[i].col;
				long hayStack = p[i].hayStack;
				int cell = (row * c) + col;
				for(int k = 0 ; k < 4 ; k++) {
					int dr = row + d[k], dc = col + d[3 - k];
					int dCell = (dr * c) + dc;
					if(inbounds(dr, dc) && grid[dr][dc] >= hayStack) {
						dsu.union(dCell, cell);
					}
				}
				long cellsNeeded = k / hayStack;
				// if the number of cells in our component is enough for our demand of cells needed, solution found
				if(dsu.cmpSize(cell) >= cellsNeeded && factors.contains(hayStack)) {
					long[][] res = new long[r][c];
					Deque<Integer> q = new ArrayDeque<>();
					q.add(row); q.add(col);
					int cellsUsed = 0;
					boolean[][] visited = new boolean[r][c];
					visited[row][col] = true; // silly to not include this
					while(!q.isEmpty()) {
						int R = q.pop(), C = q.pop();
						if(cellsUsed == cellsNeeded)
							break;
						cellsUsed++;
						res[R][C] = hayStack;
						for(int k = 0 ; k < 4 ; k++) {
							int dr = R + d[k], dc = C + d[3 - k];
							if(inbounds(dr, dc) && !visited[dr][dc] && grid[dr][dc] >= hayStack) {
								visited[dr][dc] = true;
								q.add(dr); q.add(dc);
							}
						}
					}
					out.println("YES");
					for(int ii = 0 ; ii < r ; ii++) {
						for(int jj = 0 ; jj < c ; jj++) {
							out.print(res[ii][jj] + " ");
						}
						out.println();
					}
					return;
				}
			}
			out.println("NO");
		}
	}

	Set<Long> f(long n) {
		Set<Long> res = new HashSet<>();
		for(long i = 1 ; i <= Math.sqrt(n) ; i++) {
			if(n % i == 0) {
				res.add(n / i);
				if(n / i != i)
					res.add(i);
			}
		}
		return res;
	}

	boolean inbounds(int row, int col) {
		return 0 <= row && row < r && 0 <= col && col < c;
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try {
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		public String next() {
			if (st.hasMoreTokens())
				return st.nextToken();
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				e.printStackTrace();
			}
			return st.nextToken();
		}

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

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			String line = "";
			if (st.hasMoreTokens())
				line = st.nextToken();
			else
				try {
					return br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
			while (st.hasMoreTokens())
				line += " " + st.nextToken();
			return line;
		}
	}

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		new CF659F(scan, out);
		out.close();
	}
}