#include <bits/stdc++.h>
using namespace std;
inline long long int Power(int b, int p) {
  long long int ret = 1;
  for (int i = 1; i <= p; i++) ret *= b;
  return ret;
}
const int MOD = 1e9 + 7;
const int SIZE = 4e6 + 10;
const int MAX = 1e9 + 1;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int flag1 = 0, flag2 = 0;
  int a[n][m], b[n][m];
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      a[i][j] = 1;
    }
  }
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      int(x);
      scanf("%d", &x);
      b[i][j] = x;
      if (x == 0) {
        for (int k = (0); k < (n); ++k) a[k][j] = 0;
        for (int l = (0); l < (m); ++l) a[i][l] = 0;
      }
    }
  }
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      int tmp = a[i][j];
      for (int k = (0); k < (n); ++k) {
        tmp = tmp | a[k][j];
      }
      for (int l = (0); l < (m); ++l) {
        tmp = tmp | a[i][l];
      }
      if (tmp != b[i][j]) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      cout << a[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
