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.*;

public class F {

    final int[] di = {0, 0, -1, 1};
    final int[] dj = {-1, 1, 0, 0};

    class State {
        int i, j;

        public State(int i, int j) {
            this.i = i;
            this.j = j;
        }
    }
    ArrayDeque<State> queue = new ArrayDeque<>();

    void solve() throws IOException {
        in = new InputReader("__std");
        out = new OutputWriter("__std");

        int n = in.readInt();
        int m = in.readInt();
        long k = in.readLong();

        int[][] a = new int[n][m];
        int[] all = new int[n * m];
        int count = 0;
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < m; ++j) {
                a[i][j] = in.readInt();
                all[count++] = a[i][j];
            }
        }
        Arrays.sort(all);

        int[][] color = new int[n][m];
        for (int cur = 0; cur < count; ++cur) {
            if (cur == 0 || all[cur] != all[cur - 1]) {
                int curHeight = all[cur];
                if (k % curHeight == 0) {
                    int curCount = count - cur;
                    if (k / curHeight > curCount) {
                        continue;
                    }
                    int needCount = (int) (k / all[cur]);

                    for (int i = 0; i < n; ++i) {
                        Arrays.fill(color[i], -1);
                    }
                    int colorCount = 0;
                    int bestColor = -1;
                    int bestArea = 0;
                    for (int i = 0; i < n; ++i) {
                        for (int j = 0; j < m; ++j) {
                            if (a[i][j] >= curHeight && color[i][j] == -1) {
                                int curArea = 0;
                                boolean sameHeight = false;
                                queue.clear();
                                queue.add(new State(i, j));
                                while (!queue.isEmpty()) {
                                    State s = queue.poll();
                                    if (color[s.i][s.j] == -1) {
                                        color[s.i][s.j] = colorCount;
                                        if (a[s.i][s.j] == curHeight) {
                                            sameHeight = true;
                                        }
                                        ++curArea;
                                        for (int t = 0; t < 4; ++t) {
                                            int ii = s.i + di[t];
                                            int jj = s.j + dj[t];
                                            if (ii >= 0 && ii < n && jj >= 0 && jj < m) {
                                                if (a[ii][jj] >= curHeight && color[ii][jj] == -1) {
                                                    queue.add(new State(ii, jj));
                                                }
                                            }
                                        }
                                    }
                                }
                                if (sameHeight && curArea > bestArea) {
                                    bestArea = curArea;
                                    bestColor = colorCount;
                                }
                                ++colorCount;
                            }
                        }
                    }

                    if (bestColor != -1 && bestArea < needCount) {
                        continue;
                    }

                    boolean keepSearch = true;
                    for (int i = 0; i < n && keepSearch; ++i) {
                        for (int j = 0; j < m && keepSearch; ++j) {
                            if (color[i][j] == bestColor && a[i][j] == curHeight) {
                                queue.clear();
                                queue.add(new State(i, j));
                                while (needCount > 0) {
                                    State s = queue.poll();
                                    if (color[s.i][s.j] == bestColor) {
                                        color[s.i][s.j] = -2;
                                        --needCount;
                                        for (int t = 0; t < 4; ++t) {
                                            int ii = s.i + di[t];
                                            int jj = s.j + dj[t];
                                            if (ii >= 0 && ii < n && jj >= 0 && jj < m) {
                                                if (color[ii][jj] == bestColor) {
                                                    queue.add(new State(ii, jj));
                                                }
                                            }
                                        }
                                    }
                                }
                                keepSearch = false;
                            }
                        }
                    }

                    out.println("YES");
                    for (int i = 0; i < n; ++i) {
                        for (int j = 0; j < m; ++j) {
                            if (color[i][j] == -2) {
                                out.print(curHeight + " ");
                            } else {
                                out.print("0 ");
                            }
                        }
                        out.println();
                    }

                    exit();
                }
            }
        }

        out.println("NO");

        exit();
    }

    void exit() {
        //System.err.println((System.currentTimeMillis() - startTime) + " ms");
        out.close();
        System.exit(0);
    }

    InputReader in;
    OutputWriter out;

    //long startTime = System.currentTimeMillis();

    public static void main(String[] args) throws IOException {
        new F().solve();
    }

    class InputReader {

        private InputStream stream;

        private byte[] buffer = new byte[1024];
        private int pos, len;

        private int cur;

        private StringBuilder sb = new StringBuilder(32);

        InputReader(String name) throws IOException {
            if (name.equals("__std")) {
                stream = System.in;
            } else {
                stream = new FileInputStream(name);
            }
            cur = read();
        }

        private int read() throws IOException {
            if (len == -1) {
                throw new EOFException();
            }
            if (pos >= len) {
                pos = 0;
                len = stream.read(buffer);
                if (len == -1) return -1;
            }
            return buffer[pos++];
        }

        private boolean whitespace() {
            return cur == ' ' || cur == '\t' || cur == '\r' || cur == '\n' || cur == -1;
        }

        char readChar() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            char res = (char) cur;
            cur = read();
            return res;
        }

        int readInt() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            while (whitespace()) {
                cur = read();
            }
            if (cur == -1) {
                throw new EOFException();
            }
            int sign = 1;
            if (cur == '-') {
                sign = -1;
                cur = read();
            }
            int res = 0;
            while (!whitespace()) {
                if (cur < '0' || cur > '9') {
                    throw new NumberFormatException();
                }
                res *= 10;
                res += cur - '0';
                cur = read();
            }
            return res * sign;
        }

        long readLong() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            return Long.parseLong(readToken());
        }

        double readDouble() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            return Double.parseDouble(readToken());
        }

        String readLine() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            sb.setLength(0);
            while (cur != -1 && cur != '\r' && cur != '\n') {
                sb.append((char) cur);
                cur = read();
            }
            if (cur == '\r') {
                cur = read();
            }
            if (cur == '\n') {
                cur = read();
            }
            return sb.toString();
        }

        String readToken() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            while (whitespace()) {
                cur = read();
            }
            if (cur == -1) {
                throw new EOFException();
            }
            sb.setLength(0);
            while (!whitespace()) {
                sb.append((char) cur);
                cur = read();
            }
            return sb.toString();
        }

        boolean eof() {
            return cur == -1;
        }
    }

    class OutputWriter {

        private PrintWriter writer;

        OutputWriter(String name) throws IOException {
            if (name.equals("__std")) {
                writer = new PrintWriter(System.out);
            } else {
                writer = new PrintWriter(name);
            }
        }

        void print(String format, Object ... args) {
            writer.print(new Formatter(Locale.US).format(format, args));
        }

        void println(String format, Object ... args) {
            writer.println(new Formatter(Locale.US).format(format, args));
        }

        void print(Object value) {
            writer.print(value);
        }

        void println(Object value) {
            writer.println(value);
        }

        void println() {
            writer.println();
        }

        void flush() {
            writer.flush();
        }

        void close() {
            writer.close();
        }
    }
}