#include <bits/stdc++.h>
using namespace std;
int num[100 + 5][100 + 5], ans[100 + 5][100 + 5];
int row[100 + 5], col[100 + 5];
int main() {
  int n, m;
  while (scanf("%d%d", &m, &n) != EOF) {
    int i, j, k;
    int ii, jj, kk;
    memset(row, 0, sizeof(row));
    memset(col, 0, sizeof(col));
    for (i = 0; i < m; i++) {
      for (j = 0; j < n; j++) {
        scanf("%d", &num[i][j]);
        row[i] += num[i][j];
        col[j] += num[i][j];
      }
    }
    for (i = 0; i < m; i++) {
      for (j = 0; j < n; j++) {
        ans[i][j] = 1;
      }
    }
    for (i = 0; i < m; i++) {
      for (j = 0; j < n; j++) {
        if (num[i][j] == 0) {
          for (ii = 0; ii < m; ii++) ans[ii][j] = 0;
          for (jj = 0; jj < n; jj++) ans[i][jj] = 0;
        }
      }
    }
    bool ok = true;
    for (i = 0; i < m; i++) {
      for (j = 0; j < n; j++) {
        int tp = 0;
        for (ii = 0; ii < m; ii++) tp |= ans[ii][j];
        for (jj = 0; jj < n; jj++) tp |= ans[i][jj];
        if (tp != num[i][j]) {
          ok = false;
          break;
        }
      }
      if (!ok) break;
    }
    if (ok) {
      printf("YES\n");
      for (i = 0; i < m; i++) {
        for (j = 0; j < n; j++) {
          if (j) printf(" ");
          printf("%d", ans[i][j]);
        }
        printf("\n");
      }
    } else
      printf("NO\n");
  }
  return 0;
}
