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:

/* 
Keep solving problems. 
*/
import java.util.*;
import java.io.*;

public class CF659F {

    BufferedReader br;
    PrintWriter out;
    StringTokenizer st;
    boolean eof;
    final long MOD = 1000L * 1000L * 1000L + 7;
    int n;
    int m;
    int[] dx = {0, 0, -1, 1};
    int[] dy = {-1, 1, 0, 0};
    class Node implements Comparable<Node> {
        int r;
        int c;
        int id;
        long val;
        public Node(int r, int c, int val) {
            this.r = r;
            this.c = c;
            this.val = val;
            id = r * m + c;
        }

        @Override
        public int compareTo(Node o) {
            if(this.val != o.val) {
                return Long.compare(this.val, o.val);
            }
            if(r != o.r) {
                return Integer.compare(r, o.r);
            }
            return Integer.compare(c, o.c);
        }
    }

    public class WeightedUF {
        int[] id;
        int count;
        int[] sz;
        public WeightedUF(int n) {
            count = n;
            id = new int[n];
            for(int i = 0; i < n; i++) {
                id[i] = i;
            }
            sz = new int[n];
            Arrays.fill(sz, 1);
        }

        public boolean isConnected(int p, int q) {
            return find(p) == find(q);
        }
        public int find(int p) {
            while(p != id[p]) {
                p = id[p];
            }
            return p;
        }

        public void union(int p, int q) {
            int i = find(p);
            int j = find(q);
            if(i == j) {
                return;
            }
            if(sz[i] < sz[j]) {
                id[i] = j;
                sz[j] += sz[i];
            }
            else {
                id[j] = i;
                sz[i] += sz[j];
            }
            count--;
        }
        public int getSize(int p) {
            p = find(p);
            return sz[p];
        }
    }

    class SortNode implements Comparable<SortNode> {
        int val;
        int idx;
        public SortNode(int val, int idx) {
            this.val = val;
            this.idx = idx;
        }
        @Override
        public int compareTo(SortNode o) {
            if(val != o.val) {
                return Integer.compare(val, o.val);
            }
            else {
                return Integer.compare(idx, o.idx); //reverse here to sort equal values.
            }
        }
    }



    void solve() throws IOException {
        n = nextInt();
        m = nextInt();
        long k = nextLong();

        int[][] mat = new int[n][m];
        for(int i = 0; i < n; i++) {
            mat[i] = nextIntArr(m);
        }
        Node[] arr = new Node[n * m];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                arr[i * m + j] = new Node(i, j, mat[i][j]);
            }
        }
        shuffle(arr);
        Arrays.sort(arr);

        int res = -1;
        WeightedUF ins = new WeightedUF(n * m);

        for(int i = arr.length - 1; i >= 0; i--) {
            int p = arr[i].id;

            for(int j = 0; j < dx.length; j++) {
                int newR = arr[i].r + dx[j];
                int newC = arr[i].c + dy[j];

                if(newR >= 0 && newR < n && newC >= 0 && newC < m) {
                    int q = newR * m + newC;
                    if (mat[newR][newC] >= arr[i].val) {
                        ins.union(p, q);
                    }
                }
            }

            if(k % arr[i].val == 0 && k / arr[i].val <= ins.getSize(p)) {
                res = i;
                break;
            }
        }

        if(res == -1) {
            out("NO");
            return;
        }

        int cnt = 0;
        boolean[][] vis = new boolean[n][m];

        Stack<Integer> stR = new Stack<>();
        Stack<Integer> stC = new Stack<>();
        stR.push(arr[res].r);
        stC.push(arr[res].c);
        long num = k / arr[res].val;
        while(!stR.isEmpty()) {
            int r = stR.pop();
            int c = stC.pop();
            if(!vis[r][c]) {
                vis[r][c] = true;
                cnt++;
                if(cnt >= num) {
                    break;
                }
                for(int i = 0; i < dx.length; i++) {
                    int newR = r + dx[i];
                    int newC = c + dy[i];
                    if(newR >= 0 && newR < n && newC >= 0 && newC < m) {
                        if(mat[newR][newC] >= arr[res].val) {
                            stR.push(newR);
                            stC.push(newC);
                        }
                    }
                }
            }
        }

        outln("YES");
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                if(vis[i][j]) {
                    out(arr[res].val + " ");
                }
                else {
                    out(0 + " ");
                }
            }
            outln("");
        }
    }

    void shuffle(Node[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            Node tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    private void outln(Object o) {
        out.println(o);
    }
    private void out(Object o) {
        out.print(o);
    }
    public CF659F() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new CF659F();
    }

    public long[] nextLongArr(int n) throws IOException{
        long[] res = new long[n];
        for(int i = 0; i < n; i++)
            res[i] = nextLong();
        return res;
    }
    public int[] nextIntArr(int n) throws IOException {
        int[] res = new int[n];
        for(int i = 0; i < n; i++)
            res[i] = nextInt();
        return res;
    }
    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return null;
            }
        }
        return st.nextToken();
    }
    public String nextString() {
        try {
            return br.readLine();
        } catch (IOException e) {
            eof = true;
            return null;
        }
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
}