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.PrintWriter;
import java.io.OutputStream;
import java.util.Arrays;
import java.io.IOException;
import java.util.Random;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Locale;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.io.InputStream;

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

    static class TaskF {
        final int[] dx = {0, 0, -1, 1};
        final int[] dy = {1, -1, 0, 0};

        public void solve(int testNumber, FastReader in, FastWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            long k = in.nextLong();
            int[][] a = in.nextArray2Int(n, m);
            PairIntInt[] cells = new PairIntInt[n * m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    cells[i * m + j] = new PairIntInt(i, j);
                }
            }
            ArrayUtils.sort(cells, (o1, o2) -> Integer.compare(a[o1.first][o1.second], a[o2.first][o2.second]));
            ArrayUtils.reverse(cells);
            DSU dsu = new DSU(n * m);
            boolean[][] used = new boolean[n][m];
            for (PairIntInt cell : cells) {
                int x = cell.first;
                int y = cell.second;
                for (int t = 0; t < dx.length; t++) {
                    int i = x + dx[t];
                    int j = y + dy[t];
                    if (i >= 0 && i < n && j >= 0 && j < m && used[i][j]) {
                        dsu.unite(i * m + j, x * m + y);
                    }
                }
                int size = dsu.getSizeOf(x * m + y);
                if (k % a[x][y] == 0 && (long) a[x][y] * size >= k) {
                    int need = (int) (k / a[x][y]);
                    int[][] ans = new int[n][m];
                    bfs(x, y, a[x][y], need, a, ans);
                    out.println("YES");
                    for (int[] line : ans) {
                        out.printArray(line);
                    }
                    return;
                }
                used[x][y] = true;
            }
            out.println("NO");
        }

        private void bfs(int x, int y, int value, int count, int[][] a, int[][] res) {
            int[] qx = new int[count];
            int[] qy = new int[count];
            int tail = 0;
            qx[tail] = x;
            qy[tail++] = y;
            a[x][y] = -1;
            for (int head = 0; head < count; head++) {
                x = qx[head];
                y = qy[head];
                res[x][y] = value;
                for (int t = 0; t < dx.length; t++) {
                    int i = x + dx[t];
                    int j = y + dy[t];
                    if (i >= 0 && i < a.length && j >= 0 && j < a[0].length && a[i][j] >= value && tail < count) {
                        qx[tail] = i;
                        qy[tail++] = j;
                        a[i][j] = -1;
                    }
                }
            }
        }

    }

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

        public PairIntInt() {
        }

        public PairIntInt(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;
            PairIntInt that = (PairIntInt) o;
            return first == that.first && second == that.second;
        }

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

        public int compareTo(PairIntInt that) {
            if (first != that.first) {
                return Integer.compare(first, that.first);
            }
            return Integer.compare(second, that.second);
        }

    }

    static class ArrayUtils {
        public static final Random RANDOM = new Random(System.currentTimeMillis());

        public static <T> void sort(T[] a, Comparator<? super T> comparator) {
            shuffle(a);
            Arrays.sort(a, comparator);
        }

        public static <T> void shuffle(T[] a) {
            for (int i = 0; i < a.length - 1; i++) {
                int j = i + RANDOM.nextInt(a.length - i);
                T temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
        }

        public static <T> void reverse(T[] a) {
            for (int i = 0, j = a.length - 1; i < j; i++, j--) {
                T t = a[i];
                a[i] = a[j];
                a[j] = t;
            }
        }

    }

    static class DSU {
        private int[] pr;

        public DSU(int n) {
            pr = new int[n];
            clear();
        }

        public int getSizeOf(int v) {
            return -pr[getRootOf(v)];
        }

        public void clear() {
            Arrays.fill(pr, -1);
        }

        public int getRootOf(int v) {
            int ret = v;
            while (pr[ret] >= 0) {
                ret = pr[ret];
            }
            while (pr[v] >= 0) {
                int to = pr[v];
                pr[v] = ret;
                v = to;
            }
            return ret;
        }

        public boolean unite(int a, int b) {
            a = getRootOf(a);
            b = getRootOf(b);
            if (a == b) {
                return false;
            }
            if (-pr[a] < -pr[b]) {
                pr[b] += pr[a];
                pr[a] = b;
            } else {
                pr[a] += pr[b];
                pr[b] = a;
            }
            return true;
        }

    }

    static class FastReader {
        private StringTokenizer tokenizer;
        private BufferedReader reader;

        public FastReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        public String nextToken() {
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                    tokenizer = new StringTokenizer(reader.readLine());
                }
                return tokenizer.nextToken();
            } catch (IOException e) {
                return null;
            }
        }

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

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

        public int[][] nextArray2Int(int n, int m) {
            int[][] ret = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    ret[i][j] = nextInt();
                }
            }
            return ret;
        }

    }

    static class FastWriter extends PrintWriter {
        public FastWriter(OutputStream out) {
            super(out);
        }

        public FastWriter(Writer out) {
            super(out);
        }

        public FastWriter printf(String format, Object... args) {
            super.format(Locale.US, format, args);
            return this;
        }

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

        public FastWriter printArray(int[] a) {
            if (a != null) {
                for (int i = 0; i < a.length; i++) {
                    if (i > 0) write(' ');
                    write(String.valueOf(a[i]));
                }
                println();
            } else {
                write("null");
                println();
            }
            return this;
        }

    }
}