#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[110][110];
bool b[110][110];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  memset(b, 1, sizeof(b));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == 1) {
        continue;
      } else {
        for (int k = 1; k <= n; k++) {
          b[k][j] = 0;
        }
        for (int k = 1; k <= m; k++) {
          b[i][k] = 0;
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j]) {
        bool flag = 0;
        for (int k = 1; k <= n; k++) {
          if (b[k][j]) {
            flag = 1;
            break;
          }
        }
        for (int k = 1; k <= m; k++) {
          if (b[i][k] && !flag) {
            flag = 1;
            break;
          }
        }
        if (flag == 0) {
          printf("NO");
          return 0;
        }
      }
    }
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cout << b[i][j] << " ";
    }
    printf("\n");
  }
  return 0;
}
