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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.Queue;
import java.util.Comparator;
import java.util.ArrayDeque;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskF solver = new TaskF();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskF {
        private int n;
        private int m;
        private long k;
        private int[][] a;

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            n = in.readInt();
            m = in.readInt();
            k = in.readLong();
            a = IOUtils.readIntTable(in, n, m);

            List<IntIntPair> cellsByValue = new ArrayList<>(n * m);
            DSU dsu = new DSU(n, m);
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    cellsByValue.add(IntIntPair.makePair(i, j));
                    for (int dir = 0; dir < 4; dir++) {
                        int i1 = i + MiscUtils.DX4[dir];
                        int j1 = j + MiscUtils.DY4[dir];
                        if (MiscUtils.isValidCell(i1, j1, n, m) && a[i][j] == a[i1][j1]) {
                            dsu.join(i, j, i1, j1);
                        }
                    }
                }
            }
            Collections.sort(cellsByValue,
                    Comparator.<IntIntPair>comparingInt(cell -> a[cell.first][cell.second]).reversed());

            for (IntIntPair cell : cellsByValue) {
                int i0 = cell.first;
                int j0 = cell.second;
                int curValue = a[i0][j0];
                for (int dir = 0; dir < 4; dir++) {
                    int i1 = i0 + MiscUtils.DX4[dir];
                    int j1 = j0 + MiscUtils.DY4[dir];
                    if (MiscUtils.isValidCell(i1, j1, n, m) && a[i1][j1] >= curValue) {
                        dsu.join(i0, j0, i1, j1);
                    }
                }
                int curCount = dsu.getComponentSize(i0, j0);
                if (k % curValue != 0 || curValue * (long) curCount < k) {
                    continue;
                }
                printAns(out, i0, j0, (int) (k / curValue));
                return;
            }
            out.print("NO");
        }

        private void printAns(OutputWriter out, int i0, int j0, int countToPrint) {
            out.printLine("YES");
            for (int[] row : createAnswer(i0, j0, countToPrint)) {
                out.printLine(row);
            }
        }

        private int[][] createAnswer(int i0, int j0, int countToPrint) {
            int[][] result = new int[n][m];
            int numberToFill = a[i0][j0];
            result[i0][j0] = numberToFill;
            Queue<IntIntPair> q = new ArrayDeque<>();
            q.add(IntIntPair.makePair(i0, j0));
            int done = 1;
            while (done < countToPrint) {
                int i1 = q.peek().first;
                int j1 = q.poll().second;
                for (int dir = 0; dir < 4 && done < countToPrint; dir++) {
                    int i2 = i1 + MiscUtils.DX4[dir];
                    int j2 = j1 + MiscUtils.DY4[dir];
                    if (MiscUtils.isValidCell(i2, j2, n, m) && result[i2][j2] == 0 && a[i2][j2] >= numberToFill) {
                        result[i2][j2] = numberToFill;
                        done++;
                        q.add(IntIntPair.makePair(i2, j2));
                    }
                }
            }
            return result;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void print(int[] array) {
            for (int i = 0; i < array.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(array[i]);
            }
        }

        public void printLine(int[] array) {
            print(array);
            writer.println();
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

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

    }

    static class IntIntPair implements Comparable<IntIntPair> {
        public final int first;
        public final int second;

        public static IntIntPair makePair(int first, int second) {
            return new IntIntPair(first, second);
        }

        public IntIntPair(int first, int second) {
            this.first = first;
            this.second = second;
        }


        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }

            IntIntPair pair = (IntIntPair) o;

            return first == pair.first && second == pair.second;
        }


        public int hashCode() {
            int result = first;
            result = 31 * result + second;
            return result;
        }


        public String toString() {
            return "(" + first + "," + second + ")";
        }

        @SuppressWarnings({"unchecked"})
        public int compareTo(IntIntPair o) {
            int value = Integer.compare(first, o.first);
            if (value != 0) {
                return value;
            }
            return Integer.compare(second, o.second);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.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);

        }

    }

    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = in.readInt();
            }
            return array;
        }

        public static int[][] readIntTable(InputReader in, int rowCount, int columnCount) {
            int[][] table = new int[rowCount][];
            for (int i = 0; i < rowCount; i++) {
                table[i] = readIntArray(in, columnCount);
            }
            return table;
        }

    }

    static class MiscUtils {
        public static final int[] DX4 = {1, 0, -1, 0};
        public static final int[] DY4 = {0, -1, 0, 1};

        public static boolean isValidCell(int row, int column, int rowCount, int columnCount) {
            return row >= 0 && row < rowCount && column >= 0 && column < columnCount;
        }

    }

    static class DSU {
        private final int n;
        private final int m;
        private final int[] tree;
        private final int[] size;

        public DSU(int n, int m) {
            this.n = n;
            this.m = m;
            int nm = n * m;
            tree = new int[nm];
            size = new int[nm];
            tree[0] = -1;
            for (int i = 0; i < nm; i++) {
                tree[i] = i;
                size[i] = 1;
            }
        }

        public void join(int i0, int j0, int i1, int j1) {
            join(toTreeIndex(i0, j0), toTreeIndex(i1, j1));
        }

        public int getComponentSize(int i, int j) {
            return size[findParent(toTreeIndex(i, j))];
        }

        private int toTreeIndex(int i, int j) {
            return i * m + j;
        }

        private void join(int v1, int v2) {
            v1 = findParent(v1);
            v2 = findParent(v2);
            if (v1 == v2) {
                return;
            }
            tree[v1] = v2;
            size[v2] += size[v1];
        }

        private int findParent(int idx) {
            if (tree[idx] == idx) {
                return idx;
            }
            return tree[idx] = findParent(tree[idx]);
        }

    }
}