#include <bits/stdc++.h>
#pragma GCC optimize "03"
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int m, n;
  cin >> m >> n;
  vector<vector<int>> B(m, vector<int>(n)), A(m, vector<int>(n)),
      C(m, vector<int>(n));
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      cin >> B[i][j];
      A[i][j] = 1;
      C[i][j] = 0;
    }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      if (!B[i][j]) {
        for (int k = 0; k < n; k++) A[i][k] = 0;
        for (int k = 0; k < m; k++) A[k][j] = 0;
      }
    }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      if (A[i][j]) {
        for (int k = 0; k < n; k++) C[i][k] = 1;
        for (int k = 0; k < m; k++) C[k][j] = 1;
      }
    }
  bool f = 0;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++)
      if (B[i][j] != C[i][j]) {
        f = 1;
        break;
      }
  if (f)
    cout << "NO";
  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;
}
