#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long b[n][m];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cin >> b[i][j];
    }
  }
  long long a[n][m];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      a[i][j] = 1;
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      if (b[i][j] == 0) {
        long long row = i;
        long long col = j;
        for (long long i = 0; i < n; i++) {
          a[i][col] = 0;
        }
        for (long long i = 0; i < m; i++) {
          a[row][i] = 0;
        }
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      long long row = i;
      long long col = j;
      long long el = 0;
      for (long long i = 0; i < n; i++) {
        el = el | a[i][col];
      }
      for (long long i = 0; i < m; i++) {
        el = el | a[row][i];
      }
      if (el != b[i][j]) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cout << a[i][j] << " ";
    }
    cout << endl;
  }
}
