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