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.util.Arrays;
import java.util.HashMap;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Queue;
import java.io.FileReader;
import java.util.Comparator;
import java.util.LinkedList;
import java.io.InputStream;

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

    static class TaskF {
        static int n;
        static int m;
        long k;

        static void solve(int[][] arr, int num, long needed, int x, int y, PrintWriter out, int[] dx, int[] dy) {
            int[][] mat = new int[n][m];
            boolean[][] visited = new boolean[n][m];
            Queue<TaskF.Pair> q = new LinkedList<>();
            q.add(new TaskF.Pair(x, y));
            visited[x][y] = true;
            int cnt = 0;
            while (true) {
                cnt++;
                TaskF.Pair cur = q.poll();
                mat[cur.x][cur.y] = num;
                if (cnt == needed) break;
                for (int i = 0; i < 4; i++) {
                    int nx = cur.x + dx[i], ny = cur.y + dy[i];
                    if (nx >= 0 && ny >= 0 && nx < n && ny < m && arr[nx][ny] >= num && !visited[nx][ny]) {
                        q.add(new TaskF.Pair(nx, ny));
                        visited[nx][ny] = true;
                    }
                }
            }
            StringBuilder sb = new StringBuilder();
            sb.append("YES\n");
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    if (j > 0) sb.append(" ");
                    sb.append(mat[i][j]);
                }
                sb.append("\n");
            }
            out.print(sb);
        }

        public void solve(int testNumber, Scanner sc, PrintWriter out) {
            n = sc.nextInt();
            m = sc.nextInt();
            k = sc.nextLong();

            int[][] arr = new int[n][m];
            int[] dx = {0, 0, 1, -1}, dy = {1, -1, 0, 0};
            HashMap<Integer, ArrayList<TaskF.Pair>> pos = new HashMap<>();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    arr[i][j] = sc.nextInt();
                    if ((long) arr[i][j] == k) {
                        solve(arr, (int) k, 1, i, j, out, dx, dy);
                        return;
                    }
                    ArrayList<TaskF.Pair> was = pos.get(arr[i][j]);
                    if (was != null) {
                        was.add(new TaskF.Pair(i, j));
                    } else {
                        ArrayList<TaskF.Pair> arrayList = new ArrayList<>();
                        arrayList.add(new TaskF.Pair(i, j));
                        pos.put(arr[i][j], arrayList);
                    }
                }
            }

            Integer[] a = new Integer[pos.size()];
            int idx = 0;
            for (int num : pos.keySet()) a[idx++] = num;
            Arrays.sort(a, new Comparator<Integer>() {

                public int compare(Integer t1, Integer t2) {
                    return t2 - t1;
                }
            });
            TaskF.UnionFind uf = new TaskF.UnionFind(n * m);
            for (int key : a) {
                long needed = k % key == 0 ? k / key : -1;
                ArrayList<TaskF.Pair> positions = pos.get(key);
                for (TaskF.Pair p : positions) {
                    for (int i = 0; i < 4; i++) {
                        int nx = p.x + dx[i], ny = p.y + dy[i];
                        if (nx >= 0 && ny >= 0 && nx < n && ny < m && arr[nx][ny] >= key) {
                            uf.unionSet(p.x * m + p.y, nx * m + ny);
                            if (needed != -1 && uf.sizeOfSet(p.x * m + p.y) >= needed) {
                                solve(arr, key, needed, p.x, p.y, out, dx, dy);
                                return;
                            }
                        }
                    }
                }
            }
            out.println("NO");
        }

        static class Pair {
            int x;
            int y;

            Pair(int xx, int yy) {
                x = xx;
                y = yy;
            }

        }

        static class UnionFind {
            private int[] p;
            private int[] rank;
            private int[] setSize;

            public UnionFind(int size) {
                p = new int[size];
                rank = new int[size];
                setSize = new int[size];
                for (int i = 0; i < size; ++i) {
                    p[i] = i;
                    setSize[i] = 1;
                }
            }

            int findSet(int i) {
                return (p[i] == i) ? i : (p[i] = findSet(p[i]));
            }

            boolean isSameSet(int i, int j) {
                return findSet(i) == findSet(j);
            }

            void unionSet(int i, int j) {
                if (!isSameSet(i, j)) {
                    int x = findSet(i), y = findSet(j);
                    if (rank[x] > rank[y]) {
                        p[y] = x;
                        setSize[x] += setSize[y];
                    } else {
                        p[x] = y;
                        setSize[y] += setSize[x];
                        if (rank[x] == rank[y]) ++rank[y];
                    }
                }
            }

            int sizeOfSet(int i) {
                return setSize[findSet(i)];
            }

        }

    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader f) {
            br = new BufferedReader(f);
        }

        public String next() {
            while (st == null || !st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                }
            return st.nextToken();
        }

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

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

    }
}