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 long double pi = acos(-1);
string to_string(bool b) { return b ? "true" : "false"; }
string to_string(const char* s) { return string(s); }
string to_string(string s) { return s; }
string to_string(vector<bool> v) {
  string res;
  for (long long int i = 0; i < v.size(); i++) res += char('0' + v[i]);
  return res;
}
template <size_t S>
string to_string(bitset<S> b) {
  string res;
  for (long long int i = 0; i < b; i++) res += char('0' + b[i]);
  return res;
}
template <class T>
string to_string(T v) {
  bool f = 1;
  string res;
  for (auto x : v) {
    if (!f) res += ' ';
    f = 0;
    res += to_string(x);
  }
  return res;
}
template <class A>
void write(A x) {
  cout << to_string(x);
}
template <class H, class... T>
void write(const H& h, const T&... t) {
  write(h);
  write(t...);
}
void print() { cout << ("\n"); }
template <class H, class... T>
void print(const H& h, const T&... t) {
  write(h);
  if (sizeof...(t)) write(' ');
  print(t...);
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << to_string(h);
  if (sizeof...(t)) cerr << ", ";
  DBG(t...);
}
const long long int N = 2e6;
const long long int mxN = 1e3;
const long long int MOD = 1e9 + 7;
const long long int fx[] = {0, +1, 0, -1};
const long long int fy[] = {-1, 0, +1, 0};
long long int n, m, p[N + 1], ht[N + 1], grid[mxN + 1][mxN + 1],
    ans[mxN + 1][mxN + 1], k, nw[mxN + 1][mxN + 1];
bool safe(long long int i, long long int j) {
  return i >= 0 && i < n && j >= 0 && j < m;
}
long long int hsh(long long int i, long long int j) { return i * m + j; }
long long int find(long long int x) {
  return (x ^ p[x]) ? p[x] = find(p[x]) : x;
}
bool join(long long int a, long long int b) {
  a = find(a), b = find(b);
  if (a == b) return 0;
  if (ht[a] > ht[b]) swap(a, b);
  p[a] = b;
  ht[b] += ht[a];
  return 1;
}
long long int vis[mxN + 1][mxN + 1], rem;
void dfs(long long int i, long long int j, long long int val) {
  vis[i][j] = 1;
  if (rem == 0) return;
  ans[i][j] = val;
  rem--;
  for (long long int k = 0; k < 4; k++) {
    long long int ni = i + fx[k], nj = j + fy[k];
    if (safe(ni, nj) && grid[ni][nj] >= val && !vis[ni][nj]) {
      dfs(ni, nj, val);
    }
  }
}
void solve() {
  cin >> n >> m >> k;
  vector<array<long long int, 3> > v;
  for (long long int i = 0; i < N + 1; i++) {
    p[i] = i;
    ht[i] = 1;
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      long long int x;
      cin >> x;
      grid[i][j] = x;
      v.push_back({x, i, j});
    }
  }
  sort(v.begin(), v.end(), greater<array<long long int, 3> >());
  for (long long int i = 0; i < n * m; i++) {
    for (long long int j = 0; j < 4; j++) {
      long long int ni = v[i][1] + fx[j], nj = v[i][2] + fy[j];
      if (safe(ni, nj) && nw[ni][nj]) {
        join(hsh(v[i][1], v[i][2]), hsh(ni, nj));
      }
    }
    nw[v[i][1]][v[i][2]] = 1;
    if (k % v[i][0] == 0 && ht[find(hsh(v[i][1], v[i][2]))] >= k / v[i][0]) {
      cout << "YES\n";
      rem = k / v[i][0];
      dfs(v[i][1], v[i][2], v[i][0]);
      for (long long int i = 0; i < n; i++) {
        for (long long int j = 0; j < m; j++) {
          cout << ans[i][j] << " ";
        }
        cout << "\n";
      }
      return;
    }
  }
  cout << "NO\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  clock_t time = clock();
  long long int t = 1;
  for (long long int i = 0; i < t; i++) {
    solve();
  }
  double time_taken = ((double)(clock() - time)) / CLOCKS_PER_SEC;
  cerr << "LINE(" << 142 << ") -> ["
       << "time_taken"
       << "]: [",
      DBG(time_taken);
  return 0;
}