#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int m, n;
int a[101][101], b[101][101];
void mz(int i, int j) {
  for (int k = 0; k < n; k++) a[i][k] = 0;
  for (int k = 0; k < m; k++) a[k][j] = 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> b[i][j];
      a[i][j] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (b[i][j] == 0) mz(i, j);
    }
  }
  map<int, bool> row, col;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++)
      if (a[i][j] == 1) row[i] = true;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (a[j][i] == 1) col[i] = true;
  }
  bool flg = 1;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (b[i][j] == 1) {
        if (!(row[i] || col[j])) {
          flg = 0;
          break;
        } else
          continue;
      }
    }
  }
  if (!flg)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++) cout << a[i][j] << " ";
      cout << endl;
    }
  }
  return 0;
}
