#include <bits/stdc++.h>
using namespace std;
int main() {
  int sz = 101;
  int n, m;
  cin >> n >> m;
  int arr[sz][sz];
  int row2[sz], col2[sz];
  int tmp[sz][sz];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) tmp[i][j] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
      if (!arr[i][j]) {
        for (int k = 0; k < sz; k++) tmp[i][k] = tmp[k][j] = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (!j)
        row2[i] = tmp[i][j];
      else
        row2[i] |= tmp[i][j];
      if (!i)
        col2[j] = tmp[i][j];
      else
        col2[j] |= tmp[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] != (col2[j] | row2[i])) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << tmp[i][j] << " ";
    cout << endl;
  }
  return 0;
}
