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.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;

public class R346D2P6 {

	public static void main(String[] args) throws Exception {

		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String[] line = bf.readLine().split(" ");
		int n = Integer.parseInt(line[0]);
		int m = Integer.parseInt(line[1]);
		long k = Long.parseLong(line[2]);

		long[][] stacks = new long[n][m];
		ArrayList<WeightedCell> sortedCells = new ArrayList<>(n * m);
		for (int i = 0; i < n; i++) {
			StringTokenizer st = new StringTokenizer(bf.readLine());
			for (int j = 0; j < m; j++) {
				stacks[i][j] = Long.parseLong(st.nextToken());
				sortedCells
						.add(i * m + j, new WeightedCell(i, j, stacks[i][j]));
			}
		}
		// System.out.println("sorting...");
		Collections.sort(sortedCells);
		// System.out.println("sorted.");

		// System.out.println(sortedCells);

		boolean isPossible = false;

		// each disjoint "set" is actually just a list
		List[][] setAssignments = new List[n][m];

		// System.out.println("searching...");
		Iterator<WeightedCell> curCellIter = sortedCells.iterator();
		WeightedCell constraintCell = null;
		// int foo = 0;
		while (curCellIter.hasNext()) {
			// if (foo % 1000 == 0)
			// System.out.println(foo);
			// foo++;
			WeightedCell cur = curCellIter.next();

			// check adjacent cells for already present disjoint sets
			// unfortunately we can't use a hashset here, because java sets
			// evaluate equality using .equals() instead of ==, and
			// List.equals() runs in O(n)
			List<List<WeightedCell>> adjacentSets = new LinkedList<>();
			if (cur.row > 0 && setAssignments[cur.row - 1][cur.col] != null) {
				if (!listContainsList(adjacentSets,
						setAssignments[cur.row - 1][cur.col])) {
					adjacentSets.add(setAssignments[cur.row - 1][cur.col]);
				}
			}
			if (cur.row < n - 1 && setAssignments[cur.row + 1][cur.col] != null) {
				if (!listContainsList(adjacentSets,
						setAssignments[cur.row + 1][cur.col])) {
					adjacentSets.add(setAssignments[cur.row + 1][cur.col]);
				}
			}
			if (cur.col > 0 && setAssignments[cur.row][cur.col - 1] != null) {
				if (!listContainsList(adjacentSets,
						setAssignments[cur.row][cur.col - 1])) {
					adjacentSets.add(setAssignments[cur.row][cur.col - 1]);
				}
			}
			if (cur.col < m - 1 && setAssignments[cur.row][cur.col + 1] != null) {
				if (!listContainsList(adjacentSets,
						setAssignments[cur.row][cur.col + 1])) {
					adjacentSets.add(setAssignments[cur.row][cur.col + 1]);
				}
			}

			List<WeightedCell> curDisjointSet = null;
			if (adjacentSets.size() == 0) {
				// System.out.println("new set");
				// create a new set
				curDisjointSet = new LinkedList<>();
			} else if (adjacentSets.size() == 1) {
				// System.out.println("adjacent set");
				// add to the current set
				curDisjointSet = adjacentSets.iterator().next();
			} else {
				// System.out.println("multiple adjacent sets");
				// merge the smaller ones into the bigger ones

				// first find the biggest one
				for (List<WeightedCell> otherSet : adjacentSets) {
					if (curDisjointSet == null
							|| curDisjointSet.size() < otherSet.size()) {
						curDisjointSet = otherSet;
					}
				}

				for (List<WeightedCell> otherSet : adjacentSets) {
					if (otherSet == curDisjointSet) {
						continue;
					}

					curDisjointSet.addAll(otherSet);
					for (WeightedCell element : otherSet) {
						// update set reference
						setAssignments[element.row][element.col] = curDisjointSet;
					}
				}
			}

			curDisjointSet.add(cur);
			setAssignments[cur.row][cur.col] = curDisjointSet;

			// System.out.println();
			// for (int i = 0; i < n; i++) {
			// for (int j = 0; j < m; j++) {
			// if (j > 0) {
			// System.out.print(" ");
			// }
			// if (setAssignments[i][j] != null) {
			// System.out.print("" + setAssignments[i][j].hashCode());
			// } else {
			// System.out.print("" + "........");
			// }
			// }
			// System.out.println();
			// }

			// now that we have a contiguous set, see if it could satisfy the
			// problem
			// System.out.println();
			// System.out.println("k=" + k);
			// System.out.println("height of current stack: " + cur.height);
			// System.out.println("k is divisible by height: "
			// + (k % cur.height == 0));
			// System.out.println("number of stacks needed: " + (k /
			// cur.height));
			// System.out.println("number of stacks available: "
			// + curDisjointSet.size());
			if (k % cur.height == 0L
					&& k / cur.height <= (long) curDisjointSet.size()) {
				isPossible = true;
				constraintCell = cur;
				break;
			}
		}
		// System.out.println("done");

		if (isPossible) {
			StringBuilder output = new StringBuilder();
			output.append("YES\n");

			// just do a flood fill through cells in the set until we meet the
			// criteria
			long[][] result = new long[n][m];
			LinkedList<int[]> queue = new LinkedList<>();
			queue.add(new int[] { constraintCell.row, constraintCell.col });
			if (k % constraintCell.height != 0L) {
				throw new AssertionError();
			}
			long numRemaining = k / constraintCell.height - 1;
			result[constraintCell.row][constraintCell.col] = constraintCell.height;
			while (!queue.isEmpty() && numRemaining > 0) {
				int[] cur = queue.removeFirst();

				LinkedList<int[]> neighbors = new LinkedList<int[]>();
				if (cur[0] > 0) {
					neighbors.add(new int[] { cur[0] - 1, cur[1] });
				}
				if (cur[0] < n - 1) {
					neighbors.add(new int[] { cur[0] + 1, cur[1] });
				}
				if (cur[1] > 0) {
					neighbors.add(new int[] { cur[0], cur[1] - 1 });
				}
				if (cur[1] < m - 1) {
					neighbors.add(new int[] { cur[0], cur[1] + 1 });
				}

				for (int[] neighbor : neighbors) {
					if (setAssignments[neighbor[0]][neighbor[1]] != setAssignments[cur[0]][cur[1]]) {
						continue;
					}
					if (result[neighbor[0]][neighbor[1]] != 0) {
						continue;
					}
					result[neighbor[0]][neighbor[1]] = constraintCell.height;
					numRemaining--;
					if (numRemaining == 0L) {
						break;
					}
					queue.add(neighbor);
				}

			}

			if (numRemaining != 0) {
				throw new AssertionError();
			}

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					if (j > 0) {
						output.append(" ");
					}
					output.append("" + result[i][j]);
				}
				output.append("\n");
			}

			System.out.println(output.toString());
		} else {
			System.out.println("NO");
		}
	}

	private static boolean listContainsList(
			List<List<WeightedCell>> adjacentSets, List curAssignment) {
		for (List<WeightedCell> alreadyPresent : adjacentSets) {
			if (curAssignment == alreadyPresent) {
				return true;
			}
		}
		return false;
	}

	private static class WeightedCell implements Comparable<WeightedCell> {
		public int row, col;
		public long height;

		public WeightedCell(int row, int col, long height) {
			this.row = row;
			this.col = col;
			this.height = height;
		}

		@Override
		public int compareTo(WeightedCell that) {
			return Long.signum(that.height - this.height);
		}

		@Override
		public String toString() {
			return "[" + row + ", " + col + ": " + height + "]";
		}
	}
}