#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, a[101][101], c[101], d[101], lc = 0, ld = 0, e[101], f[101];
int main() {
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      cin >> a[i][j];
      if (!a[i][j]) {
        if (!c[i]) c[i] = 1;
        if (!d[j]) d[j] = 1;
      }
    }
  }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (a[i][j]) {
        if (c[i] && d[j]) {
          cout << "NO";
          return 0;
        }
        if (!c[i] && !d[j]) {
          e[i] = j;
          f[j] = i;
        }
      }
  for (i = 1; i <= n; i++)
    if (!c[i] && !e[i]) {
      cout << "NO";
      return 0;
    }
  for (j = 1; j <= m; j++)
    if (!d[j] && !f[j]) {
      cout << "NO";
      return 0;
    }
  cout << "YES" << endl;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      if (c[i] || d[j])
        cout << 0;
      else
        cout << 1;
      cout << " ";
    }
    cout << endl;
  }
  return 0;
}
