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.io.*;
import java.util.*;
import java.awt.Point;

public class Main {
	static int [][] grid;
	static Point [][] parent;
	static int [][] rank;
	static int [] dx = {-1, 1, 0, 0};
	static int [] dy = {0, 0, -1, 1};
	static final Point fix = new Point(-1, -1);
	public static Point find(Point p) {
		if(parent[p.x][p.y].equals(p))
			return p;
		return parent[p.x][p.y] = find(parent[p.x][p.y]);
	}
	public static void union(Point p, Point q) {
		Point qParent = find(q);
		Point pParent = find(p);
		if(qParent.equals(pParent))
			return;
		rank[pParent.x][pParent.y] += rank[qParent.x][qParent.y];
		rank[qParent.x][qParent.y] = 0;
		parent[qParent.x][qParent.y] = pParent;
	}
	public static void main(String[] args) throws IOException {
		InputReader ir = new InputReader(System.in);
		//ir = new InputReader(new FileInputStream("F.in"));
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		//out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream("F-mysol.txt"))));
		//while (true) {
			int n = ir.readInt();
			//if(n == -1)break;
			int m = ir.readInt();
			long k = ir.readLong();
			grid = new int[n][m];
			parent = new Point[n][m];
			rank = new int[n][m];
			Comparator <Point> comp = new Comparator<Point>() {
				public int compare(Point o1, Point o2) {
					if(grid[o1.x][o1.y] != grid[o2.x][o2.y])
						return grid[o2.x][o2.y]-grid[o1.x][o1.y];
					if(o2.x != o1.x)
						return o1.x-o2.x;
					return o1.y-o2.y;
				}
			};
			TreeSet<Point> st = new TreeSet<Point>(comp);
			for (int i = 0; i < grid.length; i++) {
				for (int j = 0; j < grid[i].length; j++) {
					parent[i][j] = new Point(i, j);
					rank[i][j] = 1;
					grid[i][j] = ir.readInt();
					st.add(new Point(i, j));
				}
			}
			Point answer = fix;
			boolean hasSolution = false;
			while(!hasSolution && !st.isEmpty()) {
				Point p = st.first();
				Point frst = null;
				ArrayList<Point> relevantPoints = new ArrayList<Point>();
				while(frst == null || (!st.isEmpty()  && grid[frst.x][frst.y] == grid[p.x][p.y])) {
					frst = st.pollFirst();
					relevantPoints.add(frst);
					for(int x = 0;x < dx.length;x++) {
						Point c = new Point(frst.x+dx[x], frst.y+dy[x]);
						if(c.x >= 0 && c.x < grid.length && c.y >= 0 && c.y < grid[0].length && grid[c.x][c.y] >= grid[frst.x][frst.y])
							union(frst, c);
					}
					if(!st.isEmpty())
						frst  = st.first();
				}
				if(k%grid[p.x][p.y] != 0)
					continue;
				for(Point curr:relevantPoints) {
					Point label = find(curr);
					if(rank[label.x][label.y] >= k/grid[curr.x][curr.y]) {
						//System.out.println(curr.x+" "+curr.y+" "+grid[curr.x][curr.y]+"-->"+rank[label.x][label.y]);
						answer = new Point(curr);
						hasSolution = true;
						break;
					}
				}
			}
			if(!hasSolution)
				out.println("NO");
			else {
				out.println("YES");
				int [][] solution = new int[grid.length][grid[0].length];
				LinkedList<Point> q = new LinkedList<Point>();
				long toFill = k/grid[answer.x][answer.y]-1;
				int val = grid[answer.x][answer.y]; 
				q.add(answer);
				solution[answer.x][answer.y] = val;
				grid[answer.x][answer.y] = -1;
				while(!q.isEmpty() && toFill > 0) {
					Point top = q.pollFirst();
					for(int x = 0;x < dx.length;x++) {
						Point neb = new Point(top.x+dx[x], top.y+dy[x]);
						if(neb.x >= 0 && neb.x < solution.length && neb.y >= 0 && neb.y < solution[0].length
								&& grid[neb.x][neb.y] >= val && toFill > 0) {
							grid[neb.x][neb.y]= -1;
							solution[neb.x][neb.y] = val;
							toFill--;
							q.add(neb);
						}
					}
				}
				for(int i = 0;i < solution.length;i++, out.println())
					for(int j = 0;j < solution[i].length;j++)
						out.print(solution[i][j]+" ");
			}
		//}
		out.close();
	}
	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(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 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 boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}
		public static boolean isWhitespace(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
}