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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * Created by dmitriy.birukov on 12/7/15.
 */
public class F {

    public static class DisjSets {
        /**
         * Construct the disjoint sets object.
         *
         * @param numElements the initial number of disjoint sets.
         */
        public DisjSets(int numElements) {

            parent = new int[numElements];
            rank = new int[numElements];
            size = new int[numElements];

            for (int i = 0; i < parent.length; i++) {
                parent[i] = i;
                rank[i] = 0;
                size[i] = 1;
            }
        }

        /**
         * Union two disjoint sets using the height heuristic.
         * For simplicity, we assume root1 and root2 are distinct
         * and represent set names.
         *
         * @param root1 the root of set 1.
         * @param root2 the root of set 2.
         *
         *
        if xRoot.rank < yRoot.rank
        xRoot.parent := yRoot
        else if xRoot.rank > yRoot.rank
        yRoot.parent := xRoot
        else
        yRoot.parent := xRoot
        xRoot.rank := xRoot.rank + 1
         */
        public void union(int root1, int root2) {
            if(root1==root2){
                return;
            }
            if (rank[root1] < rank[root2]) {
                size[root2] +=size[root1];
                parent[root1] = root2;
            }
            else if (rank[root1] > rank[root2]){
                size[root1] +=size[root2];
                parent[root2] = root1;
            }else{
                size[root1] +=size[root2];
                parent[root2] = root1;
                rank[root1]++;
            }

        }

        /**
         * Perform a find with path compression.
         * Error checks omitted again for simplicity.
         *
         * @param x the element being searched for.
         * @return the set containing x.
         */
        public int find(int x) {
            if (parent[x] != x) {
                parent[x]=find(parent[x]);
            }
            return parent[x];
        }

        public int size(int x){
            return size[find(x)];
        }

        private int[] parent;
        private int[] rank;
        private int[] size;
    }

    public static class Cell implements Comparable<Cell>{
        int i;
        int j;
        Integer h;

        public Cell(int i, int j, int h) {
            this.i = i;
            this.j = j;
            this.h = h;
        }

        @Override
        public int compareTo(Cell o) {
            return h.compareTo(o.h);
        }
    }



    public static void main(String[] args){

        MyScanner in = new MyScanner();
        int n = in.nextInt();
        int m = in.nextInt();
        long k = in.nextLong();

        int[][] a = new int[n][m];
        int[]b = new int[n*m];


        DisjSets dsu = new DisjSets(n*m);
        TreeSet<Integer> h = new TreeSet<>();

        Map<Integer,Set<Integer>> cellsByHeight = new HashMap<>();
        List<Cell> cells = new ArrayList<>();
        for(int i=0;i<n;++i){
            for(int j=0;j<m;++j){
                a[i][j] = in.nextInt();
                cells.add(new Cell(i,j,a[i][j]));
            }
        }

        int[][] delta = new int[][]{{-1,0},{1,0},{0,1},{0,-1}};

        Collections.sort(cells);

        for(int index=cells.size()-1;index>=0;--index){
                Cell cell = cells.get(index);

                int i = cell.i;
                int j = cell.j;
                for(int[] d:delta){
                    int ni = i + d[0];
                    int nj = j + d[1];
                    if(ni>=0&&nj>=0&&ni<n&&nj<m&&a[ni][nj]>=cell.h&&dsu.find(i*m+j)!=dsu.find(ni*m+nj)){
                        dsu.union(dsu.find(i*m+j),dsu.find(ni*m+nj));
                    }
                }
                if(k%cell.h==0&&k/cell.h<=dsu.size(cell.i*m+j)){
                    out.println("YES");
                    bfs(a,i,j,k/cell.h,cell.h);
                    out.flush();
                    out.close();
                    return;
                }
        }
        out.println("NO");
        out.flush();
        out.close();

    }

    public static PrintWriter out = new PrintWriter(System.out);

    private static void bfs(int[][] a, int i, int j, long count, int h) {
        Queue<Integer> qi = new LinkedList<>();
        Queue<Integer> qj = new LinkedList<>();
        qi.add(i);
        qj.add(j);

        int n = a.length;
        int m = a[0].length;

        int[][] delta = new int[][]{{-1,0},{1,0},{0,1},{0,-1}};

        boolean[][] visited = new boolean[a.length][a[0].length];

        while(count>0){
            Integer ci = qi.poll();
            Integer cj = qj.poll();
            if(visited[ci][cj]){
                continue;
            }

            a[ci][cj] = h;

            for(int[] d:delta){
                int ni = ci + d[0];
                int nj = cj + d[1];
                if(ni>=0&&nj>=0&&ni<n&&nj<m&&a[ni][nj]>=h&&!visited[ni][nj]){
                    qi.add(ni);
                    qj.add(nj);
                }
            }
            count--;
            visited[ci][cj] = true;
        }

        for(i=0;i<n;++i){
            for(j=0;j<m;++j){
                if(visited[i][j]) {
                    out.print(a[i][j] + " ");
                }else{
                    out.print("0 ");
                }
            }
            out.println();
        }

    }

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------


}