#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int> > B;
  vector<vector<int> > A;
  for (int i = 0; i < n; i++) {
    B.push_back({});
    for (int j = 0; j < m; j++) {
      int x;
      cin >> x;
      B[i].push_back(x);
    }
  }
  for (int i = 0; i < n; i++) {
    A.push_back({});
    for (int j = 0; j < m; j++) {
      A[i].push_back(1);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (B[i][j] == 0) {
        for (int k = 0; k < m; k++) A[i][k] = 0;
        for (int l = 0; l < n; l++) A[l][j] = 0;
      }
    }
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int val = 0;
      for (int l = 0; l < m; l++) {
        if (A[i][l] == 1) {
          val = 1;
          break;
        }
      }
      for (int d = 0; d < n; d++) {
        if (A[d][j] == 1) {
          val = 1;
          break;
        }
      }
      if (val != B[i][j]) flag = false;
    }
  }
  if (flag == false)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << A[i][j] << " ";
      }
      cout << endl;
    }
  }
  return 0;
}
