#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  ios_base::sync_with_stdio;
  cin.tie(NULL);
  cout.tie(0);
  long long m, n;
  cin >> m >> n;
  long long v[m][n];
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) cin >> v[i][j];
  }
  long long ans[m][n];
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) ans[i][j] = 1;
  }
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) {
      if (v[i][j] == 0) {
        for (long long l = 0; l < n; l++) {
          ans[i][l] = 0;
        }
        for (long long l = 0; l < m; l++) {
          ans[l][j] = 0;
        }
      }
    }
  }
  bool k = 0;
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) {
      long long x = 0;
      for (long long l = 0; l < n; l++) {
        x = (x || ans[i][l]);
      }
      for (long long l = 0; l < m; l++) {
        x = (x || ans[l][j]);
      }
      if (v[i][j] != x) {
        k = 1;
        break;
      }
    }
    if (k) break;
  }
  if (k)
    cout << "NO";
  else {
    cout << "YES\n";
    for (long long i = 0; i < m; i++) {
      for (long long j = 0; j < n; j++) cout << ans[i][j] << " ";
      cout << "\n";
    }
  }
  return 0;
}
