#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, c;
  int mat1[105][105];
  int mat2[110][110];
  scanf("%d%d", &(r), &(c));
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++) {
      mat1[i][j] = 1;
      mat2[i][j] = 0;
    }
  int ori[105][105];
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++) scanf("%d", &(ori[i][j]));
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      if (ori[i][j] == 0) {
        for (int k = 0; k < r; k++) mat1[k][j] = 0;
        for (int k = 0; k < c; k++) mat1[i][k] = 0;
      }
    }
  }
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      if (mat1[i][j] == 1) {
        for (int k = 0; k < r; k++) mat2[k][j] = 1;
        for (int k = 0; k < c; k++) mat2[i][k] = 1;
      }
    }
  }
  int flag = 0;
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++) {
      if (ori[i][j] != mat2[i][j]) {
        flag = 1;
        break;
      }
    }
  if (flag)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < r; i++) {
      for (int j = 0; j < c; j++) printf("%d ", mat1[i][j]);
      printf("\n");
    }
  }
  return 0;
}
