#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
template <class F, class S>
ostream &operator<<(ostream &out, const pair<F, S> &p) {
  return out << '(' << p.first << ", " << p.second << ')';
}
template <class T>
auto operator<<(ostream &out, T &&x) -> decltype(x.begin(), out) {
  out << '{';
  for (auto i = x.begin(); i != x.end(); i++)
    out << *i << (i == prev(x.end()) ? "" : ", ");
  return out << '}';
}
void dmp() {}
template <class T, class... Args>
void dmp(T &&x, Args... args) {
  cerr << x << ";  ";
  dmp(args...);
}
int r, c;
bool row[101], col[101], a[101][101], ans[101][101];
void solve() {
  cin >> r >> c;
  bool ok = 1;
  for (int i = 1; i <= r; i++) {
    for (int j = 1; j <= c; j++) {
      cin >> a[i][j];
      ans[i][j] = 1;
    }
  }
  for (int i = 1; i <= r; i++) {
    for (int j = 1; j <= c; j++) {
      if (!a[i][j]) {
        for (int k = 1; k <= c; k++) ans[i][k] = 0;
        for (int k = 1; k <= r; k++) ans[k][j] = 0;
      }
    }
  }
  bool f;
  for (int i = 1; i <= r; i++) {
    for (int j = 1; j <= c; j++) {
      f = 0;
      for (int k = 1; k <= c; k++) f |= ans[i][k];
      for (int k = 1; k <= r; k++) f |= ans[k][j];
      if (a[i][j] != f) {
        ok = 0;
        break;
      }
    }
  }
  if (ok) {
    cout << "YES" << '\n';
    for (int i = 1; i <= r; i++) {
      for (int j = 1; j <= c; j++) {
        cout << ans[i][j] << " \n"[j == c];
      }
    }
  } else
    cout << "NO" << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) solve();
}
