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 tr0 {
	static PrintWriter out;
	static StringBuilder sb;
	static int mod = 1000000007;
	static int inf = (int) 1e15;
	static ArrayList<Integer>[] ad;
	static int n, m;
	static int[][][] memo;
	static int[][] a, vis, trace;
	static long k;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		n = sc.nextInt();
		m = sc.nextInt();
		k = sc.nextLong();
		a = new int[n][m];
		vis = new int[n][m];
		PriorityQueue<pair> pq = new PriorityQueue<>();
		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++) {
				a[i][j] = sc.nextInt();
				vis[i][j] = -1;
				pq.add(new pair(a[i][j], i * m + j));
			}
		int[] dx = { 1, -1, 0, 0 };
		int[] dy = { 0, 0, 1, -1 };
		unionfind uf = new unionfind(n * m);
		int[][] size = new int[n][m];
		while (!pq.isEmpty()) {
			pair cur = pq.poll();
			int sx = cur.id / m;
			int sy = cur.id % m;
		//	System.out.println(sx + " " + sy + " " + cur.v);
			Queue<Integer> xs = new LinkedList<>();
			Queue<Integer> ys = new LinkedList<>();
			xs.add(sx);
			ys.add(sy);
			int reach = 0;
			while (!xs.isEmpty()) {
				int x = xs.poll();
				int y = ys.poll();
				if (vis[x][y] != -1) {
					uf.combine(vis[x][y], cur.id);
					continue;
				}
				reach++;
				vis[x][y] = cur.id;
				for (int i = 0; i < 4; i++) {
					int X = x + dx[i];
					int Y = y + dy[i];
					if (v(X, Y) && a[X][Y] >= a[sx][sy]) {
						xs.add(X);
						ys.add(Y);
					}
				}
			}
			size[sx][sy] = uf.ans[uf.findSet(cur.id)] += reach;
		}
		trace = new int[n][m];
		in = new boolean[n][m];
		boolean f = false;
//		for(int []a:size)
	//		System.out.println(Arrays.toString(a));
		all:for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (a[i][j] != 0 && k % a[i][j] == 0 && k / a[i][j] <= size[i][j]) {
					f = true;
					fin = false;
	//				System.out.println(i+" "+j+" "+k/a[i][j]);
					count= (int) (k / a[i][j]);
					dfs(i, j, a[i][j]);
					break all;
				}
			}
		}
		if (f) {
			out.println("YES");
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++)
					out.print(trace[i][j]+" ");
			out.println();
			}
		} else
			out.print("NO");

		out.close();
	}

	static boolean[][] in;
	static boolean fin;
    static int count;
	static void dfs(int i, int j, int v) {
		if (count == 0) {
			fin = true;
			return;
		}
		trace[i][j] = v;
		count--;
		in[i][j] = true;
		int[] dx = { 1, -1, 0, 0 };
		int[] dy = { 0, 0, 1, -1 };
		if (fin)
			return;
		for (int o = 0; o < 4; o++) {
			int X = i + dx[o];
			int Y = j + dy[o];
			if (v(X, Y) && a[X][Y] >= v && !in[X][Y]) {
				dfs(X, Y, v);
				if (fin)
					return;
			}
		}
	}

	static boolean v(int x, int y) {
		return x >= 0 && x < n && y >= 0 && y < m;
	}

	static class unionfind {
		int[] p;
		int[] size;
		int[] max;
		int num;
		int[] ans;

		unionfind(int n) {
			p = new int[n];
			size = new int[n];
			max = new int[n];
			ans = new int[n];
			for (int i = 0; i < n; i++) {
				p[i] = i;
				max[i] = i;
			}
			Arrays.fill(size, 1);
			num = n;
		}

		int findSet(int v) {
			if (v == p[v])
				return v;

			max[v] = Math.max(max[v], max[p[v]]);

			p[v] = findSet(p[v]);

			max[v] = Math.max(max[v], max[p[v]]);

			return p[v];
		}

		boolean sameSet(int a, int b) {
			a = findSet(a);
			b = findSet(b);
			if (a == b)
				return true;
			return false;
		}

		int max() {
			int max = 0;
			for (int i = 0; i < size.length; i++)
				if (size[i] > max)
					max = size[i];
			return max;
		}

		boolean combine(int a, int b) {
			a = findSet(a);
			b = findSet(b);
			if (a == b)
				return true;
			// System.out.println(num+" ppp");
			num--;
			if (size[a] > size[b]) {
				p[b] = a;
				max[a] = Math.max(max[a], max[b]);
				size[a] += size[b];
				ans[a] += ans[b];
			} else {
				p[a] = b;
				max[b] = Math.max(max[a], max[b]);
				size[b] += size[a];
				ans[b] += ans[a];
			}
			return false;
		}
	}

	static class pair implements Comparable<pair> {
		long v;
		int id;

		pair(long val, int i) {
			v = val;
			id = i;
		}

		public String toString() {
			return v + " " + id;
		}

		@Override
		public int compareTo(pair o) {
			// TODO Auto-generated method stub
			return Long.compare(o.v, v);
		}

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

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

		public String nextLine() throws IOException {
			return br.readLine();
		}

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

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

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

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

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}