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;
typedef struct node {
  long long int x, y, sz;
} nod;
nod ds[1012][1012];
const int N = 1000011;
long long int a[1012][1012];
bool vs[1012][1012];
bool ismr[1012][1012];
typedef struct box {
  long long int i, j, v;
} bx;
bx t[N];
pair<long long int, long long int> findp(long long int x, long long int y) {
  while (1) {
    long long int tmpx = x, tmpy = y;
    x = ds[tmpx][tmpy].x, y = ds[tmpx][tmpy].y;
    if (x == ds[x][y].x && y == ds[x][y].y) break;
  }
  return make_pair(x, y);
}
bool check(long long int ux, long long int uy, long long int vx,
           long long int vy) {
  return findp(ux, uy) == findp(vy, vy);
}
void join(long long int ux, long long int uy, long long int vx,
          long long int vy) {
  pair<long long int, long long int> pu, pv;
  pu = findp(ux, uy);
  pv = findp(vx, vy);
  if (pv != pu) {
    if (ds[pu.first][pu.second].sz > ds[pv.first][pv.second].sz) {
      ds[pu.first][pu.second].sz += ds[pv.first][pv.second].sz;
      ds[pv.first][pv.second].x = pu.first;
      ds[pv.first][pv.second].y = pu.second;
      ds[pv.first][pv.second].sz = 0;
    } else {
      ds[pv.first][pv.second].sz += ds[pu.first][pu.second].sz;
      ds[pu.first][pu.second].x = pv.first;
      ds[pu.first][pu.second].y = pv.second;
      ds[pu.first][pu.second].sz = 0;
    }
  }
}
void init(long long int n, long long int m) {
  long long int i, j;
  for (i = 0; i <= n + 1; i++) {
    for (j = 0; j <= m + 1; j++) {
      ds[i][j].x = i;
      ds[i][j].y = j;
      ds[i][j].sz = 1;
    }
  }
}
bool comp(bx A, bx B) { return A.v < B.v; }
int AX[4] = {-1, 0, 1, 0};
int AY[4] = {0, 1, 0, -1};
long long int m, n, cp, cnt, ct;
pair<long long int, long long int> stat;
bool isValid(long long int x, long long int y) {
  if (x >= 1 && x <= n && y >= 1 && y <= m && ismr[x][y] == 1) return 1;
  return 0;
}
void dfs(long long int x, long long int y) {
  long long int i, add = 0;
  vs[x][y] = 1;
  if (ct >= cnt)
    a[x][y] = 0;
  else if (a[x][y] >= cp && ct < cnt)
    a[x][y] = cp, ct++;
  else if (a[x][y] < cp)
    a[x][y] = 0;
  for (i = 0; i < 4; ++i) {
    if (isValid(x + AX[i], y + AY[i]) && vs[x + AX[i]][y + AY[i]] == 0)
      dfs(x + AX[i], y + AY[i]);
  }
}
int main() {
  long long int i, j, k, it = 0, tmp;
  scanf("%lld", &n), scanf("%lld", &m), scanf("%lld", &k);
  init(n, m);
  for (i = 1; i < n + 1; ++i) {
    for (j = 1; j < m + 1; ++j) {
      scanf("%lld", &a[i][j]);
      t[it].i = i;
      t[it].j = j;
      t[it++].v = a[i][j];
    }
  }
  sort(t, t + it, comp);
  reverse(t, t + it);
  pair<long long int, long long int> r;
  bool found = 0;
  for (i = 0; i < it; ++i) {
    long long int x = t[i].i, y = t[i].j, v = t[i].v;
    if (ismr[x + 1][y]) join(x, y, x + 1, y);
    if (ismr[x - 1][y]) join(x, y, x - 1, y);
    if (ismr[x][y + 1]) join(x, y, x, y + 1);
    if (ismr[x][y - 1]) join(x, y, x, y - 1);
    pair<long long int, long long int> p = findp(x, y);
    ismr[x][y] = 1;
    if (k % v == 0 && ds[p.first][p.second].sz >= k / v) {
      r = make_pair(x, y);
      found = 1;
      cnt = k / v;
      cp = v;
      break;
    }
  }
  if (found == 0)
    printf("NO\n");
  else {
    printf("YES\n");
    ct = 0;
    dfs(r.first, r.second);
    for (i = 1; i < n + 1; ++i) {
      for (j = 1; j < m + 1; ++j) {
        if (vs[i][j] == 0) a[i][j] = 0;
      }
    }
    for (i = 1; i < n + 1; ++i) {
      for (j = 1; j < m + 1; ++j) printf("%lld ", a[i][j]);
      printf("\n");
    }
  }
  return 0;
}