#include <bits/stdc++.h>
using namespace std;
bool row_check(int a[][100], int i, int m) {
  for (int j = 0; j < m; j++)
    if (a[i][j] == 0) return false;
  return true;
}
bool column_check(int a[][100], int j, int n) {
  for (int i = 0; i < n; i++)
    if (a[i][j] == 0) return false;
  return true;
}
int main() {
  int m, n, v = 0;
  cin >> n >> m;
  int a[100][100], b[10000] = {0};
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 1) {
        if (column_check(a, j, n) == true) {
          if (row_check(a, i, m) == true) {
            b[i * m + j] = 1;
          } else
            v++;
        } else {
          if (row_check(a, i, m) == false) {
            cout << "NO";
            return 0;
          } else
            v++;
        }
      }
    }
  }
  if (v && accumulate(b, b + n * m, 0) == 0) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << b[i * m + j] << " ";
    cout << endl;
  }
  return 0;
}
