#include <bits/stdc++.h>
using namespace std;
int conversion(string p) {
  int o;
  o = atoi(p.c_str());
  return o;
}
string toString(int h) {
  stringstream ss;
  ss << h;
  return ss.str();
}
string toStringLong(long long h) {
  stringstream ss;
  ss << h;
  return ss.str();
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
int lcm(int a, int b) { return (a * (b / gcd(a, b))); }
int matri[101][101];
bool veri(int i, int j, int m, int n) {
  int p = 0;
  int lo = j;
  int jjj = 0;
  while (jjj < n) {
    if (matri[i][jjj] == 1) {
      return true;
    }
    jjj++;
  }
  while (p < m) {
    if (matri[p][lo] == 1) {
      return true;
    }
    p++;
  }
  return false;
}
bool tacha[102][102];
void llena(int i, int j, int m, int n) {
  int p = 0;
  int lo = j;
  int jjj = 0;
  while (jjj < n) {
    if (matri[i][jjj] == 1) {
      matri[i][jjj] = 0;
      tacha[i][jjj] = true;
    }
    jjj++;
  }
  while (p < m) {
    if (matri[p][lo] == 1) {
      matri[p][lo] = 0;
      tacha[p][lo] = true;
    }
    p++;
  }
}
int res[102][102];
int main() {
  memset(tacha, false, sizeof(tacha));
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> matri[i][j];
      res[i][j] = matri[i][j];
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (matri[i][j] == 0 && !tacha[i][j]) {
        tacha[i][j] = true;
        llena(i, j, m, n);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (res[i][j] == 1) {
        if (!veri(i, j, m, n)) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cout << matri[i][j] << " ";
    }
    cout << endl;
  }
}
