#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m;
  cin >> n >> m;
  long long b[n][m], a[n][m];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) cin >> b[i][j];
  }
  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]) continue;
      for (long long k = 0; k < m; k++) a[i][k] = 0;
      for (long long k = 0; k < n; k++) a[k][j] = 0;
    }
  }
  long long flag = 1;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      if (b[i][j] == 0) continue;
      long long f = 0;
      for (long long k = 0; k < m; k++) f |= a[i][k];
      for (long long k = 0; k < n; k++) f |= a[k][j];
      flag &= f;
    }
  }
  if (flag) {
    cout << "YES\n";
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < m; j++) cout << a[i][j] << " ";
      cout << "\n";
    }
  } else
    cout << "NO\n";
  return 0;
}
