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>
#pragma warning(disable : 4996)
using namespace std;
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (auto &x : v) in >> x;
  return in;
}
template <typename T>
ostream &operator<<(ostream &in, vector<T> &v) {
  for (auto &x : v) in << x << " ";
  return in;
}
class solve {
  int n, m, t;
  long long k;
  vector<int> v;
  vector<int> id;
  vector<int> size();
  vector<int> parent;
  vector<int> si;
  vector<int> selected;
  void unite(int x, int y) {
    x = find_set(x);
    y = find_set(y);
    if (x == y) return;
    if (si[x] >= si[y]) {
      si[x] += si[y];
      parent[y] = x;
      return;
    }
    si[y] += si[x];
    parent[x] = y;
  }
  int find_set(int x) {
    if (parent[x] == x) return x;
    parent[x] = find_set(parent[x]);
    return parent[x];
  }
  void adjust(int r, int c, int &curr) {
    int x2;
    if (r > 0) {
      x2 = curr - m;
      if (v[x2] >= v[curr]) unite(x2, curr);
    }
    if (c + 1 < m) {
      x2 = curr + 1;
      if (v[x2] >= v[curr]) unite(x2, curr);
    }
    if (c > 0) {
      x2 = curr - 1;
      if (v[x2] >= v[curr]) unite(x2, curr);
    }
    if (r + 1 < n) {
      x2 = curr + m;
      if (v[x2] >= v[curr]) unite(x2, curr);
    }
  }
  int find_size(int x) { return si[find_set(x)]; }

 public:
  solve() {
    cin >> n >> m >> k;
    t = n * m;
    v.resize(t);
    parent.resize(t);
    si.resize(t, 1);
    id.resize(t);
    selected.resize(t);
    for (auto &x : v) cin >> x;
    for (int i = 0; i < t; i++) parent[i] = id[i] = i;
    sort(id.begin(), id.end(),
         [&](const int &a, const int &b) { return v[a] > v[b]; });
    int ans = -1;
    for (int i = 0; i < t; i++) {
      int r = id[i] / m, c = id[i] % m;
      adjust(r, c, id[i]);
      if (k % v[id[i]] == 0 && k / v[id[i]] <= find_size(id[i])) {
        ans = id[i];
        break;
      }
    }
    if (ans == -1) {
      cout << "NO";
      return;
    } else
      cout << "YES\n";
    int set_no = find_set(ans), L = m;
    int val = k / v[ans];
    dfs(ans / m, ans % m, ans, v[ans], val);
    for (int i = 0; i < t; i++) {
      if (selected[i])
        cout << v[ans] << " ";
      else
        cout << "0 ";
      --L;
      if (L == 0) {
        L = m;
        cout << "\n";
      }
    }
  }
  void dfs(int r, int c, int curr, int v0, int &reqs) {
    selected[curr] = 1;
    --reqs;
    int x2;
    if (!reqs) return;
    if (r > 0 && reqs) {
      x2 = curr - m;
      if (v[x2] >= v0 && !selected[x2]) dfs(r - 1, c, x2, v0, reqs);
    }
    if (c + 1 < m && reqs) {
      x2 = curr + 1;
      if (v[x2] >= v0 && !selected[x2]) dfs(r, c + 1, x2, v0, reqs);
    }
    if (c > 0 && reqs) {
      x2 = curr - 1;
      if (v[x2] >= v0 && !selected[x2]) dfs(r, c - 1, x2, v0, reqs);
    }
    if (r + 1 < n && reqs) {
      x2 = curr + m;
      if (v[x2] >= v0 && !selected[x2]) dfs(r + 1, c, x2, v0, reqs);
    }
  }
};
int main() {
  int t = 1;
  while (t--) new solve;
  return 0;
}