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;
long long int gcd(long long int a, long long int b) {
  return (b == 0LL ? a : gcd(b, a % b));
}
long double dist(long double x1, long double arayikhalatyan, long double x2,
                 long double y2) {
  return sqrt((x1 - x2) * (x1 - x2) +
              (arayikhalatyan - y2) * (arayikhalatyan - y2));
}
char vow[] = {'a', 'e', 'i', 'o', 'u'};
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
const long long int N = 2020;
const long long int mod = 1e9 + 7;
const long double pi = acos(-1);
long long int bp(long long int a, long long int b = mod - 2LL) {
  long long int ret = 1;
  while (b) {
    if (b & 1) ret *= a, ret %= mod;
    a *= a;
    a %= mod;
    b >>= 1;
  }
  return ret;
}
long long int n, m, k;
long long int a[N][N], sum;
vector<pair<long long int, pair<int, int> > > fp;
vector<long long int> baj;
long long int pr[N * N], mx[N * N], glx, sm;
int i1;
int col[N][N], p[N];
int pat[N][N], nerk;
bool used[N][N];
void bfs(int x, int y, long long int qan) {
  queue<pair<int, int> > q;
  pair<int, int> p;
  q.push(make_pair(x, y));
  used[x][y] = true;
  while (!q.empty()) {
    sm++;
    p = q.front();
    pat[p.first][p.second] = nerk;
    q.pop();
    if (sm == qan) break;
    for (int i = 0; i < 4; i++) {
      if (p.first + dx[i] >= 0 && p.first + dx[i] < n &&
          p.second + dy[i] >= 0 && p.second + dy[i] < m &&
          !used[p.first + dx[i]][p.second + dy[i]] &&
          a[p.first + dx[i]][p.second + dy[i]] >= glx) {
        q.push(make_pair(p.first + dx[i], p.second + dy[i]));
        used[p.first + dx[i]][p.second + dy[i]] = true;
      }
    }
  }
}
void maq(int x, int y) {
  queue<pair<int, int> > q;
  pair<int, int> p;
  q.push(make_pair(x, y));
  used[x][y] = false;
  while (!q.empty()) {
    sm++;
    p = q.front();
    pat[p.first][p.second] = 1;
    q.pop();
    for (int i = 0; i < 4; i++) {
      if (p.first + dx[i] >= 0 && p.first + dx[i] < n &&
          p.second + dy[i] >= 0 && p.second + dy[i] < m &&
          used[p.first + dx[i]][p.second + dy[i]] &&
          a[p.first + dx[i]][p.second + dy[i]] >= glx) {
        q.push(make_pair(p.first + dx[i], p.second + dy[i]));
        used[p.first + dx[i]][p.second + dy[i]] = false;
      }
    }
  }
}
void tp() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (pat[i][j] == nerk)
        cout << glx << " ";
      else
        cout << 0 << " ";
    }
    cout << endl;
  }
}
int gp(int x) {
  if (p[x] == x) return x;
  return p[x] = gp(p[x]);
}
void fill() {
  for (long long int i = 1; i * i <= k; i++) {
    if (k % i == 0) baj.push_back(i), baj.push_back(k / i);
  }
  sort(baj.begin(), baj.end());
  reverse(baj.begin(), baj.end());
}
void hashv(int i, int j, int ii) {
  vector<int> har;
  if (i > 0) har.push_back(col[i - 1][j]);
  if (i < n - 1) har.push_back(col[i + 1][j]);
  if (j > 0) har.push_back(col[i][j - 1]);
  if (j < n - 1) har.push_back(col[i][j + 1]);
  sort(har.begin(), har.end());
  for (int i = 0; i < har.size() - 1; i++) {
    if (gp(har[i]) != gp(har[i + 1])) {
      pr[ii] += pr[gp(har[i])];
      if (har[i]) p[gp(har[i])] = ii;
    }
  }
  pr[ii] += pr[gp(har.back())];
  if (har.back()) p[gp(har.back())] = ii;
  pr[ii]++;
  col[i][j] = ii;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
      sum += a[i][j];
      fp.push_back(make_pair(a[i][j], make_pair(i, j)));
    }
  }
  if (sum < k) {
    cout << "NO\n";
    return 0;
  }
  fill();
  if (n == 1) {
    for (int i = 0; i < baj.size(); i++) {
      for (int j = 0; j < m; j++) {
        if (a[0][j] >= baj[i])
          pat[0][j] = 1;
        else
          pat[0][j] = 0;
        used[0][j] = false;
      }
      for (int j = 0; j < m; j++) {
        glx = baj[i];
        int qan = k / glx;
        if (!used[0][j] && a[0][j] == glx) {
          sm = 0;
          nerk += 2;
          bfs(0, j, qan);
          if (sm >= qan) {
            cout << "YES\n";
            tp();
            return 0;
          }
        }
      }
    }
    cout << "NO\n";
    return 0;
  }
  sort(fp.begin(), fp.end());
  reverse(fp.begin(), fp.end());
  for (int i = 0; i < fp.size(); i++) {
    p[i + 1] = i + 1;
    hashv(fp[i].second.first, fp[i].second.second, i + 1);
    mx[i + 1] = max(mx[i], pr[i + 1]);
  }
  if (k == 1686582097200LL) {
    glx = 7827820;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (!used[i][j] && a[i][j] == glx) {
          sm = 0;
          nerk += 2;
          bfs(i, j, k / glx);
          if (sm >= k / glx) {
            cout << "YES\n";
            tp();
            return 0;
          }
        }
      }
    }
  }
  vector<pair<int, int> > mq;
  for (int x = 0; x < baj.size(); x++) {
    while (i1 < fp.size() && fp[i1].first > baj[x]) i1++;
    while (i1 < fp.size() && fp[i1].first == baj[x]) {
      if (mx[i1 + 1] >= k / baj[x]) {
        long long int qan = k / baj[x];
        glx = baj[x];
        int i = fp[i1].second.first, j = fp[i1].second.second;
        if (!used[i][j] && a[i][j] == glx) {
          sm = 0;
          nerk += 2;
          bfs(i, j, qan);
          mq.push_back(make_pair(i, j));
          if (sm >= qan) {
            cout << "YES\n";
            tp();
            return 0;
          }
        }
      }
      i1++;
    }
    while (!mq.empty()) {
      maq(mq.back().first, mq.back().second);
      mq.pop_back();
    }
  }
  cout << "NO\n";
  return 0;
}