#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const int inf = 2000000000;
const long long int infLL = 9000000000000000000;
const int mX = 1e5 + 123;
long long int n, m, a[102][102], b[102][102];
bool row[102] = {false}, col[102] = {false};
void case_i() {
  cin >> n >> m;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      cin >> a[i][j];
      b[i][j] = a[i][j];
    }
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      if (a[i][j] == 0) {
        for (long long int k = 0; k < n; k++) b[k][j] = 0;
        for (long long int k = 0; k < m; k++) b[i][k] = 0;
      }
    }
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      if (b[i][j] == 1) {
        row[i] = true;
        col[j] = true;
      }
    }
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      if (a[i][j] == 1) {
        if (row[i] == false and col[j] == false) {
          cout << "NO" << endl;
          return;
        }
      }
    }
  }
  cout << "YES" << endl;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) cout << b[i][j] << " ";
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  case_i();
  return 0;
}
