#include <bits/stdc++.h>
long long int mod = 1000000007;
using namespace std;
int main() {
  long long int n, m;
  cin >> m >> n;
  long long int a[m][n];
  for (long long int i = 0; i < m; i++) {
    for (long long int j = 0; j < n; j++) cin >> a[i][j];
  }
  long long int b[m][n];
  for (long long int i = 0; i < m; i++) {
    for (long long int j = 0; j < n; j++) b[i][j] = 1;
  }
  long long int d;
  for (long long int i = 0; i < m; i++) {
    for (long long int j = 0; j < n; j++) {
      if (a[i][j] == 0) {
        for (long long int k = 0; k < n; k++) b[i][k] = 0;
        for (long long int k = 0; k < m; k++) b[k][j] = 0;
      }
    }
  }
  for (long long int i = 0; i < m; i++) {
    for (long long int j = 0; j < n; j++) {
      d = b[i][j];
      for (long long int k = 0; k < n; k++) d = d | b[i][k];
      for (long long int k = 0; k < m; k++) d = d | b[k][j];
      if (d != a[i][j]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (long long int i = 0; i < m; i++) {
    for (long long int j = 0; j < n; j++) cout << b[i][j] << " ";
    cout << endl;
  }
  return 0;
}
