#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, i1, j1, a[200][200], b[200][200], valid = 1;
  cin >> n >> m;
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) cin >> a[i][j];
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) b[i][j] = 1;
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) {
      if (a[i][j] == 0) {
        for (i1 = 0; i1 < n; i1++) b[i1][j] = 0;
        for (j1 = 0; j1 < m; j1++) b[i][j1] = 0;
      }
    }
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) {
      if (a[i][j] == 2) valid = 0;
      if (a[i][j] == 0) {
        for (i1 = 0; i1 < n; i1++)
          if (b[i1][j] == 1) valid = 0;
        for (j1 = 0; j1 < m; j1++)
          if (b[i][j1] == 1) valid = 0;
      }
      if (a[i][j] == 1) {
        for (i1 = 0; i1 < n; i1++)
          if (b[i1][j] == 1) break;
        for (j1 = 0; j1 < m; j1++)
          if (b[i][j1] == 1) break;
        if (i1 == n && j1 == m) valid = 0;
      }
    }
  if (valid == 0)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) cout << b[i][j] << " ";
      cout << endl;
    }
  }
  return 0;
}
