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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

/**
 *
 * @author gouthamvidyapradhan
 *
 */
public class Ploycrap {
    /**
     * Scanner class
     *
     * @author gouthamvidyapradhan
     */
    static class MyScanner {
        /**
         * Buffered reader
         */
        private static BufferedReader br = new BufferedReader(
                new InputStreamReader(System.in));

        private static StringTokenizer st;

        /**
         * Read integer
         *
         * @return
         * @throws Exception
         */
        public static int readInt() throws Exception {
            try {
                if (st != null && st.hasMoreTokens()) {
                    return parseInt(st.nextToken());
                }
                String str = br.readLine();
                if (str != null && !str.trim().equals("")) {
                    st = new StringTokenizer(str);
                    return parseInt(st.nextToken());
                }
            } catch (IOException e) {
                close();
                return -1;
            }
            return -1;
        }

        /**
         * Read integer
         *
         * @return
         * @throws Exception
         */
        public static long readLong() throws Exception {
            try {
                if (st != null && st.hasMoreTokens()) {
                    return Long.parseLong(st.nextToken());
                }
                String str = br.readLine();
                if (str != null && !str.trim().equals("")) {
                    st = new StringTokenizer(str);
                    return Long.parseLong(st.nextToken());
                }
            } catch (IOException e) {
                close();
                return -1;
            }
            return -1;
        }

        /**
         * Read line
         * @return
         * @throws Exception
         */
        public static String readLine() throws Exception
        {
            return br.readLine();
        }

        /**
         * Parse to integer
         * @param in
         * @return integer value
         */
        public static int parseInt(String in)
        {
            // Check for a sign.
            int num  = 0, sign = -1, i = 0;
            final int len  = in.length( );
            final char ch  = in.charAt( 0 );
            if ( ch == '-' )
                sign = 1;
            else
                num = '0' - ch;

            // Build the number.
            i+=1;
            while ( i < len )
                num = num*10 + '0' - in.charAt( i++ );
            return sign * num;
        }

        /**
         * Close BufferedReader
         *
         * @throws Exception
         */
        public static void close() throws Exception {
            br.close();
        }
    }

    private static int[][] grid, index;
    private static boolean[][] verified;
    private static boolean found;
    private static final int R[] = {0, -1, 0, 1}; //{E, NE, N, NW, W, SW, S, SE}
    private static final int C[] = {1, 0, -1, 0};
    private static int N, M, newR, newC, e, id; //M rows, N columns
    private static long sum, K, hay;
    private static List<Node> list = new ArrayList<>();
    private static PrintWriter pw = new PrintWriter(new BufferedOutputStream(System.out, 500000));

    /**
     *
     */
    private static class Node
    {
        int r, c;
        Node(int r, int c)
        {
            this.r = r;
            this.c = c;
        }
    }
    /**
     * Main method
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception
    {
        N = MyScanner.readInt();
        M = MyScanner.readInt();
        K = MyScanner.readLong();
        grid = new int[N][M];
        index = new int[N][M];
        verified = new boolean[N][M];
        sum = 0L;
        id = 0;
        found = false;
        for(int i = 0; i < N; i++)
            for(int j = 0; j < M; j++)
            {
                e = MyScanner.readInt();
                if(e != 0) 
                {
                    if ((K % e) == 0) //possible
                    {
                        if ((K / e) <= M * N)
                            list.add(new Node(i, j));
                    }
                }
                grid[i][j] = e;
            }
        for(Node n : list)
        {
            if(!verified[n.r][n.c])
            {
                hay = grid[n.r][n.c];
                sum = hay;
                id++;
                if(dfs(n.r, n.c))
                {
                	found = true;
                	break;
                }
            }
        }
        if(found)
        {
            pw.println("YES");
            for (int i = 0; i < N; i++) 
            {
                for (int j = 0; j < M; j++) 
                {
                	pw.print((index[i][j] == id) ? hay : "0"); 
                    if (j != M - 1)
                        pw.print(" ");
                }
                pw.println();
            }
        }
        else
            pw.println("NO");
        pw.flush();
        pw.close();
        MyScanner.close();
    }

    /**
     * Flood fill algorithm
     * @param r
     * @param c
     * @return
     */
    private static boolean dfs(final int r, final int c)
    {
        index[r][c] = id; //mark this as finished
        if(sum == K)
        	return true;
        for(int i = 0; i < 4; i++)
        {
            newR = r+R[i]; newC = c+C[i];
            if(newR < 0 || newC < 0 || newR >= N || newC >= M || index[newR][newC] == id) continue;
            if(grid[newR][newC] >= hay)
            {
                if(grid[newR][newC] == hay)
                    verified[newR][newC] = true;
                sum += hay;
                if(dfs(newR, newC)) return true;
            }
        }
        return false;
    }
}