#include <bits/stdc++.h>
using namespace std;
int m, n;
int a[110][110], b[110][110];
template <typename T>
inline void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
inline void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
inline void read(T &x) {
  T f = 1;
  x = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + c - '0';
  x *= f;
}
int main() {
  read(m);
  read(n);
  memset(a, 255, sizeof(a));
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      read(b[i][j]);
      if (b[i][j] == 0) {
        for (int k = 1; k <= n; k++) a[i][k] = 0;
        for (int k = 1; k <= m; k++) a[k][j] = 0;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (a[i][j] == -1) a[i][j] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      int res = 0;
      for (int k = 1; k <= n; k++) res |= a[i][k];
      for (int k = 1; k <= m; k++) res |= a[k][j];
      if (res != b[i][j]) {
        printf("NO\n");
        return 0;
      }
    }
  }
  printf("YES\n");
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j < n; j++) {
      printf("%d ", a[i][j]);
    }
    printf("%d\n", a[i][n]);
  }
  return 0;
}
