#include <bits/stdc++.h>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
const long long MOD = 1e9 + 7;
const long long base = 269;
const int oo = 1 << 30;
const int N = 1e5 + 5;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long P(long long x, long long y) {
  long long ret = 1;
  while (y > 0) {
    if (y & 1) ret *= x;
    y /= 2;
    x = x * x;
  }
  return ret;
}
long long GCD(long long a, long long b) { return (b ? GCD(b, a % b) : a); }
int gi() {
  int w = 0;
  bool q = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') q = 0, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return q ? w : -w;
}
namespace io {
const int L = (1 << 21) + 1;
char ibuf[L], *iS, *iT, obuf[L], *oS = obuf, *oT = obuf + L - 1, c, st[55];
int f, tp;
inline char getc() {
  return (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                      (iS == iT ? EOF : *iS++))
                   : *iS++);
}
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
template <class I>
inline bool gi(I& x) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == -1)
      return false;
  for (x = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = x * 10 + (c & 15);
  x *= f;
  return true;
}
template <class I>
inline void print(I x) {
  if (!x) putc('0');
  if (x < 0) putc('-'), x = -x;
  while (x) st[++tp] = x % 10 + '0', x /= 10;
  while (tp) putc(st[tp--]);
}
inline bool gs(char* s, int& l) {
  for (c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++);
       c < 'a' || c > 'z';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == -1) return false;
  for (l = 0; c <= 'z' && c >= 'a';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, L, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    s[l++] = c;
  s[l] = 0;
  return true;
}
inline void printld(double x, int digit) {
  if (x < 0) putc('-'), x = -x;
  x += 0.5 * pow(0.1, digit);
  print((long long)x), putc('.');
  for (x -= (long long)x; digit; --digit)
    x = x * 10, putc((int)x + '0'), x -= (int)x;
}
inline void ps(const char* s) {
  for (int i = 0, n = strlen(s); i < n; i++) putc(s[i]);
}
struct IOFLUSHER {
  ~IOFLUSHER() { flush(); }
} _ioflusher_;
};  // namespace io
using io::getc;
using io::gi;
using io::gs;
using io::print;
using io::printld;
using io::ps;
using io::putc;
void inp_outp() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void initPrime(long long p[], long long n) {
  p[0] = p[1] = -1;
  for (long long(i) = (2); (i) <= (n); (i)++) {
    if (!p[i]) {
      p[i] = i;
      long long j = 2;
      while (i * j <= n) {
        p[i * j] = i;
        j++;
      }
    }
  }
}
long long n, m, q, k, pos, rs;
long long a[105][105], b[105][105];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> m >> n;
  for (long long(i) = 0; (i) < (m); (i)++) {
    for (long long(j) = 0; (j) < (n); (j)++) {
      cin >> a[i][j];
    }
  }
  for (long long(i) = 0; (i) < (m); (i)++) {
    for (long long(j) = 0; (j) < (n); (j)++) {
      b[i][j] = 1;
    }
  }
  for (long long(i) = 0; (i) < (m); (i)++) {
    for (long long(j) = 0; (j) < (n); (j)++) {
      if (!a[i][j]) {
        for (long long(k) = 0; (k) < (n); (k)++) {
          b[i][k] = 0;
        }
        for (long long(k) = 0; (k) < (m); (k)++) b[k][j] = 0;
      }
    }
  }
  for (long long(i) = 0; (i) < (m); (i)++) {
    for (long long(j) = 0; (j) < (n); (j)++) {
      long long check = 0;
      if (a[i][j]) {
        for (long long(k) = 0; (k) < (n); (k)++) {
          if (b[i][k] || b[k][j]) check = 1;
        }
        if (!check) return cout << "NO", 0;
      }
    }
  }
  cout << "YES\n";
  for (long long(i) = 0; (i) < (m); (i)++) {
    for (long long(j) = 0; (j) < (n); (j)++) {
      cout << b[i][j] << " ";
    }
    cout << "\n";
  }
}
