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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
int n, m;
long long k;
int arr[N][N];
pair<int, pair<int, int> > arr2[N * N];
int cnt = 0;
int parentx[N][N];
int parenty[N][N];
int sz[N][N];
bool done[N][N];
inline pair<int, int> find(int a, int b) {
  if (parentx[a][b] == a && parenty[a][b] == b) {
    return make_pair(a, b);
  }
  auto it = find(parentx[a][b], parenty[a][b]);
  parentx[a][b] = it.first;
  parenty[a][b] = it.second;
  return it;
}
inline void join(int a, int b, int c, int d) {
  auto it1 = find(a, b);
  auto it2 = find(c, d);
  if (it1 != it2) {
    sz[it1.first][it1.second] += sz[it2.first][it2.second];
    parentx[it2.first][it2.second] = it1.first;
    parenty[it2.first][it2.second] = it1.second;
  }
}
int ans[N][N];
void fill(int x, int y) {
  int cnt = k / arr[x][y];
  queue<int> qx;
  queue<int> qy;
  memset(ans, -1, sizeof(ans));
  qx.push(x);
  qy.push(y);
  ans[x][y] = arr[x][y];
  --cnt;
  while (!qx.empty() && cnt) {
    int nx = qx.front();
    int ny = qy.front();
    qx.pop();
    qy.pop();
    for (int k = 0; k < 4; ++k) {
      int nnx = nx + dx[k];
      int nny = ny + dy[k];
      if (!done[nnx][nny]) {
        continue;
      }
      if (ans[nnx][nny] != -1) {
        continue;
      }
      ans[nnx][nny] = arr[x][y];
      --cnt;
      if (!cnt) {
        break;
      }
      qx.push(nnx);
      qy.push(nny);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (ans[i][j] == -1) {
        ans[i][j] = 0;
      }
      printf("%d ", ans[i][j]);
    }
    printf("\n");
  }
}
int main() {
  scanf("%d %d %lld", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      scanf("%d", &arr[i][j]);
      arr2[++cnt] = make_pair(arr[i][j], make_pair(i, j));
    }
  }
  sort(arr2 + 1, arr2 + 1 + cnt);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      parentx[i][j] = i;
      parenty[i][j] = j;
      sz[i][j] = 1;
    }
  }
  for (int i = cnt; i >= 1; --i) {
    int x = arr2[i].second.first;
    int y = arr2[i].second.second;
    for (int k = 0; k < 4; ++k) {
      int nx = x + dx[k];
      int ny = y + dy[k];
      if (done[nx][ny]) {
        join(x, y, nx, ny);
      }
    }
    if ((k % arr[x][y]) == 0) {
      if (sz[find(x, y).first][find(x, y).second] >= k / arr[x][y]) {
        printf("YES\n");
        fill(x, y);
        return 0;
      }
    }
    done[x][y] = 1;
  }
  printf("NO\n");
}