#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int m, n;
  cin >> m >> n;
  bool temp[m][n], 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;
      temp[i][j] = 0;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (b[i][j] == 0) {
        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] == 1) {
        for (int k = 0; k < n; k++) temp[i][k] = 1;
        for (int k = 0; k < m; k++) temp[k][j] = 1;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (b[i][j] != temp[i][j]) {
        cout << "NO";
        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;
}
