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.util.*;
import java.lang.*;
import java.io.*;
 
public class Main {
	public static void r(int arr[],int l,int m,int r) {
		int n1=m-l+1;
		int n2=r-m;
		int L[]=new int[n1];
		int R[]=new int[n2];
		for(int i=0;i<n1;i++)
		{
		  L[i]=arr[l+i];
		}
		for(int j=0;j<n2;j++)
		{
		  R[j]=arr[m+1+j];
		}
		int i=0;
		int j=0;
		int k=l;
		while(i<n1 && j<n2)
		{
		  if(L[i]<=R[j])
		  {
			arr[k]=L[i];
			++i;
		  }
		  else{
			arr[k]=R[j];
			++j;
		  }
		  ++k;
		}
		while(i<n1)
		{
		  arr[k]=L[i];
		  ++i;
		  ++k;
		}
		while(j<n2)
		{
		  arr[k]=R[j];
		  ++j;
		  ++k;
		}
	}
	public static void r2(int arr[],int l,int r)
	{
	  if(l<r)
	  {
		int m=(l+r)/2;
		r2(arr,l,m);
		r2(arr,m+1,r);
		r(arr,l,m,r);
	
	  }
	}
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;
 
		public FastReader() {
			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;
		}
	} 
	static int gcd(int a, int b) 
	{ 
		if (a == 0) 
			return b; 
		return gcd(b % a, a); 
	}


    static int n, m;
    static long k;
    static int[][] X;
    static int[][] Y;

    static boolean[][] vis;
    static int marked;
    static int[] dx = new int[]{-1, 0, 0, 1};
    static int[] dy = new int[]{0, -1, 1, 0};

    static void abc(int a,int b,long c)throws IOException {
        n=a;
        m=b;
        k=c;

        X = new int[n * m][3];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                X[i * m + j][0] = sc.readInt();
                X[i * m + j][1] = i;
                X[i * m + j][2] = j;
            }
        }

        Arrays.sort(X, (p, q) -> -Integer.compare(p[0], q[0]));

        boolean done = false;
        UnionFind unionFind = new UnionFind(n * m);
        Y = new int[n][m];
        for (int i = 0; i < n * m; i++) {
            int h = X[i][0], x = X[i][1], y = X[i][2];
            Y[x][y] = h;
            for (int j = 0; j < 4; j++) {
                int nx = x + dx[j], ny = y + dy[j];
                if (nx >= 0 && nx < n && ny >= 0 && ny < m && Y[nx][ny] >= h) {
                    unionFind.union(m * x + y, m * nx + ny);
                }
            }
            if (k % h == 0 && unionFind.size(m * x + y) >= k / h) {
                vis = new boolean[n][m];
                marked = 0;
                dfs(x, y, h, k / h);
                done = true;
                System.out.println("YES");
                for (int j = 0; j < n; j++) {
                    for (int k = 0; k < m; k++) {
                        if (k > 0) out.print(' ');
                        if (vis[j][k]) out.print(Math.min(h, Y[j][k]));
                        else out.print(0);
                    }
                    out.println();
                }
                break;
            }
        }

        if (!done) out.println("NO");
    }
    
    static class UnionFind {
        int[] parent;
        int[] cnt;

        public UnionFind(int n) {
            parent = new int[n];
            cnt = new int[n];
            for (int i = 0; i < n; i++) {
                parent[i] = i;
                cnt[i] = 1;
            }
        }

        public int find(int i) {
            if (i == parent[i]) return i;
            return parent[i] = find(parent[i]);
        }

        public void union(int i, int j) {
            int u = find(i), v = find(j);
            if (u == v) return;
            cnt[u] += cnt[v];
            parent[v] = u;
        }

        public int size(int i) {
            return cnt[find(i)];
        }
    }
    
    static void dfs(int x, int y, int h, long c) {
        if (marked == c) return;
        vis[x][y] = true;
        marked++;
        for (int i = 0; i < 4; i++) {
            int nx = x + dx[i], ny = y + dy[i];
            if (nx >= 0 && nx < n && ny >= 0 && ny < m && Y[nx][ny] >= h && !vis[nx][ny]) {
                dfs(nx, ny, h, c);
            }
        }
    }
    static InputReader sc;
    static OutputWriter out;

public static void main(String args[]) throws Exception
{
//  try {
// //   FileOutputStream output=new FileOutputStream("C:\\Users\\icons\\Desktop\\java\\output.txt");
// //   PrintStream out=new PrintStream(output);
// //   Diverting the output stream into file "temp.out".Comment the below line to use console
// //   System.setOut(out);
  
//   InputStream input=new FileInputStream("C:\\Users\\icons\\Desktop\\java\\input.txt");
//   //Diverting the input stream into file "temp.in".Comment the below line to use console
//   System.setIn(input);
  
//  } catch (FileNotFoundException e) {
//   e.printStackTrace();
//  }
        sc = new InputReader("__std");
        out = new OutputWriter("__std");
 
        int n = sc.readInt();
        int m = sc.readInt();
        long k = sc.readLong();       
        abc(n,m,k);
        out.close();
    }
}
class InputReader {
 
        private InputStream stream;
 
        private byte[] buffer = new byte[1024];
        private int pos, len;
 
        private int cur;
 
        private StringBuilder sb = new StringBuilder(32);
 
        InputReader(String name) throws IOException {
            if (name.equals("__std")) {
                stream = System.in;
            } else {
                stream = new FileInputStream(name);
            }
            cur = read();
        }
 
        private int read() throws IOException {
            if (len == -1) {
                throw new EOFException();
            }
            if (pos >= len) {
                pos = 0;
                len = stream.read(buffer);
                if (len == -1) return -1;
            }
            return buffer[pos++];
        }
 
        private boolean whitespace() {
            return cur == ' ' || cur == '\t' || cur == '\r' || cur == '\n' || cur == -1;
        }
 
        char readChar() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            char res = (char) cur;
            cur = read();
            return res;
        }
 
        int readInt() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            while (whitespace()) {
                cur = read();
            }
            if (cur == -1) {
                throw new EOFException();
            }
            int sign = 1;
            if (cur == '-') {
                sign = -1;
                cur = read();
            }
            int res = 0;
            while (!whitespace()) {
                if (cur < '0' || cur > '9') {
                    throw new NumberFormatException();
                }
                res *= 10;
                res += cur - '0';
                cur = read();
            }
            return res * sign;
        }
 
        long readLong() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            return Long.parseLong(readToken());
        }
 
        double readDouble() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            return Double.parseDouble(readToken());
        }
 
        String readLine() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            sb.setLength(0);
            while (cur != -1 && cur != '\r' && cur != '\n') {
                sb.append((char) cur);
                cur = read();
            }
            if (cur == '\r') {
                cur = read();
            }
            if (cur == '\n') {
                cur = read();
            }
            return sb.toString();
        }
 
        String readToken() throws IOException {
            if (cur == -1) {
                throw new EOFException();
            }
            while (whitespace()) {
                cur = read();
            }
            if (cur == -1) {
                throw new EOFException();
            }
            sb.setLength(0);
            while (!whitespace()) {
                sb.append((char) cur);
                cur = read();
            }
            return sb.toString();
        }
 
        boolean eof() {
            return cur == -1;
        }
    }
    class OutputWriter {
 
        private PrintWriter writer;
 
        OutputWriter(String name) throws IOException {
            if (name.equals("__std")) {
                writer = new PrintWriter(System.out);
            } else {
                writer = new PrintWriter(name);
            }
        }
 
        void print(String format, Object ... args) {
            writer.print(new Formatter(Locale.US).format(format, args));
        }
 
        void println(String format, Object ... args) {
            writer.println(new Formatter(Locale.US).format(format, args));
        }
 
        void print(Object value) {
            writer.print(value);
        }
 
        void println(Object value) {
            writer.println(value);
        }
 
        void println() {
            writer.println();
        }
 
        void flush() {
            writer.flush();
        }
 
        void close() {
            writer.close();
        }
    }