#include <bits/stdc++.h>
int main() {
  int n, m, i, j, x, flag, a[101][101], b[101][101], ans;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      scanf("%d", &a[i][j]);
      b[i][j] = 1;
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (a[i][j] == 0) {
        for (x = 0; x < n; x++) {
          b[x][j] = 0;
        }
        for (x = 0; x < m; x++) {
          b[i][x] = 0;
        }
      }
    }
  }
  flag = 1;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      ans = 0;
      for (x = 0; x < n; x++) ans = ans | b[x][j];
      for (x = 0; x < m; x++) ans = ans | b[i][x];
      if (ans != a[i][j]) {
        flag = 0;
        break;
      }
    }
  }
  if (flag) {
    printf("YES\n");
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        printf("%d ", b[i][j]);
      }
      printf("\n");
    }
  } else {
    printf("NO\n");
  }
  return 0;
}
