#include <bits/stdc++.h>
using namespace std;
int a[111][111];
int b[111][111], lz[111], cz[111];
int l[111], c[111];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      int v;
      scanf("%d", &v);
      b[i][j] = v;
      if (v == 0) {
        lz[i] = 1;
        cz[j] = 1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (lz[i] or cz[j]) {
        a[i][j] = 0;
      } else {
        a[i][j] = 1;
        l[i] = 1;
        c[j] = 1;
      }
    }
  }
  int ok = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if ((l[i] or c[j]) != b[i][j]) {
        ok = 0;
      }
    }
  }
  if (!ok) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      printf("%d%c", a[i][j], " \n"[j + 1 == m]);
    }
  }
}
