#include <bits/stdc++.h>
using namespace std;
long long int a[200][200], b[200][200];
int main() {
  long long int m, n, i, j, k, ck;
  while (scanf("%lld %lld", &m, &n) != EOF) {
    memset(&a, 0, sizeof a);
    memset(&b, 0, sizeof b);
    for (i = 1; i <= m; i++) {
      for (j = 1; j <= n; j++) {
        scanf("%lld", &b[i][j]);
      }
    }
    for (i = 1; i <= m; i++) {
      for (j = 1; j <= n; j++) {
        int flg = 0;
        if (b[i][j] == 1) {
          for (k = 1; k <= n; k++) {
            if (b[i][k] != 1) {
              flg = 1;
              break;
            }
          }
          if (flg == 0) {
            for (k = 1; k <= m; k++) {
              if (b[k][j] != 1) {
                flg = 1;
                break;
              }
            }
          }
          if (flg == 0) {
            a[i][j] = 1;
          }
        } else {
          a[i][j] = 0;
        }
      }
    }
    ck = 0;
    for (i = 1; i <= m; i++) {
      for (j = 1; j <= n; j++) {
        int flg = 0;
        for (k = 1; k <= n; k++) {
          if (a[i][k] == 1) {
            flg = 1;
            break;
          }
        }
        if (flg == 0) {
          for (k = 1; k <= m; k++) {
            if (a[k][j] == 1) {
              flg = 1;
              break;
            }
          }
        }
        if (flg != b[i][j]) {
          ck = 1;
          break;
        }
      }
    }
    if (ck == 1)
      printf("NO\n");
    else {
      printf("YES\n");
      for (i = 1; i <= m; i++) {
        for (j = 1; j <= n; j++) {
          if (j != 1) printf(" ");
          printf("%lld", a[i][j]);
        }
        if (i != m) printf("\n");
      }
    }
  }
  return 0;
}
