#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  cin >> m >> n;
  int B[m][n], A[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]) {
        for (int s = 0; s < m; s++) {
          A[s][j] = 0;
        }
        for (int s = 0; s < n; s++) {
          A[i][s] = 0;
        }
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (B[i][j]) {
        bool Trye = true;
        for (int s = 0; Trye && s < n; s++)
          if (A[i][s]) Trye = false;
        for (int s = 0; Trye && s < m; s++)
          if (A[s][j]) Trye = false;
        if (Trye) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
  }
  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;
}
