#include <bits/stdc++.h>
using namespace std;
long long GCD(long long a, long long b) { return (b == 0) ? a : GCD(b, a % b); }
bool isPrime(int x) {
  for (int i = 2; i <= sqrt(x); i++)
    if (x % i == 0) return 0;
  return 1;
}
bool Z[100][100];
int main() {
  int n, m;
  cin >> m >> n;
  vector<vector<int> > v(m, vector<int>(n));
  map<int, bool> I, J;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      int x;
      cin >> x;
      v[i][j] = x;
      if (x == 0) {
        for (int k = 0; k < n; k++) Z[i][k] = 1;
        for (int k = 0; k < m; k++) Z[k][j] = 1;
      }
    }
  }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      if (Z[i][j] == 0) I[i] = 1, J[j] = 1;
    }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      if (v[i][j] == 1) {
        if (!I[i] && !J[j]) {
          cout << "NO";
          return 0;
        }
      }
    }
  cout << "YES\n";
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) cout << ((Z[i][j] == 0) ? 1 : 0) << " ";
    cout << endl;
  }
  return 0;
}
