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.*;
import java.util.*;

public class MainClass
{
    static int n = 0;
    static int m = 0;
    static long k = 0L;
    static Game[] B;
    static long[] A;
    static DSU dsu;
    static TreeSet<Integer> ccSizes = new TreeSet<>();
    static int[] dd;
    static long[] ans;
    static boolean[] visited;
    static int start = -1;
    static long value = -1L;
    static int count = 0;
    static boolean[] hasBeenDone;
    public static void main(String[] args)throws IOException
    {
        Reader in = new Reader();
        n = in.nextInt();
        m = in.nextInt();
        k = in.nextLong();
        A = new long[n * m];
        B = new Game[n * m];
        dd = new int[]{-1, 1, -m, m};
        ccSizes.add(1);
        hasBeenDone = new boolean[n * m];
        for (int i=0;i<n;i++)   for (int j=0;j<m;j++)
        {
            long vv = in.nextLong();
            A[i * m + j] = vv;
            B[i * m + j] = new Game(i * m + j, vv);
        }
        Arrays.sort(B);
        dsu = new DSU(n * m);
        for (int i=0;i<n * m;i++)   dsu.makeSet(i);
        for (int i=0;i<n * m;i++)
        {
            long vv = B[i].height;
            int x = B[i].vertexNumber;
            hasBeenDone[x] = true;
            for (int j=0;j<4;j++)
            {
                int xx = x + dd[j];
                if (xx >= 0 && xx < n * m && hasBeenDone[xx])
                {
                    if (x % m == 0 && j == 0)
                        continue;
                    else if ((x + 1) % m == 0 && j == 1)
                        continue;
                    else
                        dsu.unionSets(xx, x, ccSizes);
                }
            }
            if (k % vv != 0L)   continue;
            long numberOfStacks = k / vv;
            if (numberOfStacks <= (long)(i + 1) && (long)ccSizes.last() >= numberOfStacks)
            {
                start = x;
                value = vv;
                count = (int)numberOfStacks;
                break;
            }
        }
        if (start == -1)
        {
            System.out.println("NO");
        }
        else
        {
            ans = new long[n * m];
            visited = new boolean[n * m];
            explore(start);
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("YES\n");
            for (int i=0;i<n;i++)
            {
                for (int j=0;j<m;j++)
                {
                    stringBuilder.append(ans[i * m + j]).append(" ");
                }
                stringBuilder.append("\n");
            }
            System.out.println(stringBuilder);
        }
    }
    public static void explore(int v)
    {
        visited[v] = true;
        if (A[v] >= value && count > 0)
        {
            count--;
            ans[v] = value;
        }
        else
            return;
        for (int i=0;i<4;i++)
        {
            int xx = v + dd[i];
            if (xx >= 0 && xx < n * m && !visited[xx])
            {
                if (v % m == 0 && i == 0)  continue;
                if ((v + 1) % m == 0 && i == 1) continue;
                else    explore(xx);
            }
        }
    }
}
class DSU
{
    int[] parent;
    int[] size;
    //Pass number of total nodes as parameter to the constructor
    DSU(int n)
    {
        this.parent = new int[n];
        this.size = new int[n];
        Arrays.fill(parent, -1);
    }

    public void makeSet(int v)
    {
        parent[v] = v;
        size[v] = 1;
    }

    public int findSet(int v)
    {
        if (v == parent[v]) return v;
        return parent[v] = findSet(parent[v]);
    }

    public void unionSets(int a, int b, TreeSet<Integer> ccSizes)
    {
        a = findSet(a);
        b = findSet(b);
        if (a != b)
        {
            if (size[a] < size[b])
            {
                int temp = a;
                a = b;
                b = temp;
            }
            parent[b] = a;
            size[a] += size[b];
            ccSizes.add(size[a]);
        }
    }
}
class Game implements Comparable<Game>
{
    int vertexNumber;
    long height;

    public Game(int vertexNumber, long height)
    {
        this.vertexNumber = vertexNumber;
        this.height = height;
    }

    @Override
    public int compareTo(Game game)
    {
        if (this.height > game.height)
            return -1;
        else if (this.height < game.height)
            return 1;
        return 0;
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}