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

public class Main {
    private static int[] id;
    private static int[] size;

    public static void main(String[] args) {
        InputReader inputReader = new InputReader(System.in);
        PrintWriter printWriter = new PrintWriter(System.out, true);

        int n = inputReader.nextInt();
        int m = inputReader.nextInt();
        long k = inputReader.nextLong();
        Site[] sites = new Site[n * m];
        ArrayList<Site>[] adj = new ArrayList[n * m];
        for (int i = 0; i < n * m; i++) {
            adj[i] = new ArrayList<>();
        }

        int currentIndex;
        int prevXIndex;
        int prevYIndex;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                currentIndex = i * m + j;
                prevXIndex = (i - 1) * m + j;
                prevYIndex = i * m + j - 1;
                sites[currentIndex] = new Site(inputReader.nextInt(), i, j);
                if (i > 0 && sites[prevXIndex].value != 0) {
                    adj[currentIndex].add(sites[prevXIndex]);
                    adj[prevXIndex].add(sites[currentIndex]);
                }
                if (j > 0 && sites[prevYIndex].value != 0) {
                    adj[currentIndex].add(sites[prevYIndex]);
                    adj[prevYIndex].add(sites[currentIndex]);
                }
            }
        }

        Arrays.sort(sites, (s1, s2) -> s2.value - s1.value);

        id = new int[n * m];
        size = new int[n * m];
        for (int i = 0; i < n * m; i++) {
            id[i] = i;
            size[i] = 1;
        }

        long sizeNeeded;
        int u, v;

        boolean[] isVisited = new boolean[n * m];
        ArrayDeque<Integer> stack = new ArrayDeque<>();
        int resValue;
        for (int i = 0; i < n * m; i++) {
            sizeNeeded = k / sites[i].value;
            if (k % sites[i].value == 0) {
                u = sites[i].x * m + sites[i].y;
                isVisited[u] = true;
                stack.add(u);
                sizeNeeded--;
                resValue = sites[i].value;

                while (!stack.isEmpty() && sizeNeeded > 0) {
                    u = stack.poll();
                    for (Site site : adj[u]) {
                        v = site.x * m + site.y;
                        if (sizeNeeded <= 0) {
                            break;
                        } else if (site.value >= sites[i].value) {
                            if (!isVisited[v]) {
                                isVisited[v] = true;
                                stack.push(v);
                                sizeNeeded--;
                                connectSites(u, v);
                            } else if (!isConnected(u, v)) {
                                sizeNeeded -= size[findRoot(v)];
                                connectSites(u, v);
                            }
                        }
                    }
                }

                if (sizeNeeded > 0) {
                    continue;
                }
                
                stack.clear();
                isVisited = new boolean[n * m];
                sizeNeeded = (k / sites[i].value) - 1;
                u = sites[i].x * m + sites[i].y;
                isVisited[u] = true;
                stack.push(u);
                
                int mainRoot = findRoot(u);

                while (!stack.isEmpty() && sizeNeeded > 0) {
                    u = stack.poll();
                    for (Site site : adj[u]) {
                        v = site.x * m + site.y;
                        if (sizeNeeded <= 0) {
                            break;
                        } else if (!isVisited[v] && mainRoot == findRoot(v)) {
                            isVisited[v] = true;
                            stack.push(v);
                            sizeNeeded--;
                        }
                    }
                }

                printWriter.println("YES");
                for (int j = 0; j < n; j++) {
                    for (int l = 0; l < m; l++) {
                        if (isVisited[j * m + l]) {
                            printWriter.print(resValue + " ");
                        } else {
                            printWriter.print(0 + " ");
                        }
                    }
                    printWriter.println();
                }
                printWriter.close();
                return;
            }
        }
        printWriter.print("NO");

        printWriter.close();
    }

    private static class Site {
        private int value;
        private int x;
        private int y;

        public Site(int value, int i, int j) {
            this.value = value;
            this.x = i;
            this.y = j;
        }
    }

    private static boolean isConnected(int i, int j) {
        return findRoot(i) == findRoot(j);
    }

    private static int findRoot(int i) {
        while (i != id[i]) {
            id[i] = id[id[i]];
            i = id[i];
        }
        return i;
    }

    private static void connectSites(int i, int j) {
        int rootI = findRoot(i);
        int rootJ = findRoot(j);
        if (rootI == rootJ) return;

        if (size[rootI] < size[rootJ]) {
            id[rootI] = rootJ;
            size[rootJ] += size[rootI];
        } else {
            id[rootJ] = rootI;
            size[rootI] += size[rootJ];
        }
    }

    private static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextInt();
            }
            return array;
        }

        public long[] nextLongArray(int size) {
            long[] array = new long[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextLong();
            }
            return array;
        }

        public double[] nextDoubleArray(int size) {
            double[] array = new double[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextDouble();
            }
            return array;
        }

        public String[] nextStringArray(int size) {
            String[] array = new String[size];
            for (int i = 0; i < size; ++i) {
                array[i] = next();
            }
            return array;
        }

        public boolean[][] nextBooleanTable(int rows, int columns, char trueCharacter) {
            boolean[][] table = new boolean[rows][columns];
            for (int i = 0; i < rows; ++i) {
                String row = next();
                assert row.length() == columns;
                for (int j = 0; j < columns; ++j) {
                    table[i][j] = (row.charAt(j) == trueCharacter);
                }
            }
            return table;
        }

        public char[][] nextCharTable(int rows, int columns) {
            char[][] table = new char[rows][];
            for (int i = 0; i < rows; ++i) {
                table[i] = next().toCharArray();
                assert table[i].length == columns;
            }
            return table;
        }

        public int[][] nextIntTable(int rows, int columns) {
            int[][] table = new int[rows][columns];
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < columns; j++) {
                    table[i][j] = nextInt();
                }
            }
            return table;
        }

        public long[][] nextLongTable(int rows, int columns) {
            long[][] table = new long[rows][columns];
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < columns; j++) {
                    table[i][j] = nextLong();
                }
            }
            return table;
        }

        public double[][] nextDoubleTable(int rows, int columns) {
            double[][] table = new double[rows][columns];
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < columns; j++) {
                    table[i][j] = nextDouble();
                }
            }
            return table;
        }

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

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

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

        public BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

        public boolean hasNext() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String line = readLine();
                if (line == null) {
                    return false;
                }
                tokenizer = new StringTokenizer(line);
            }
            return true;
        }

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

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }
    }
}