#include <bits/stdc++.h>
using namespace std;
int m, n, x[100][100], b[100][100], z[100][100];
void coverRow(int r) {
  for (int i = 0; i < n; i++) z[r][i] = 1;
}
void coverCol(int c) {
  for (int i = 0; i < m; i++) z[i][c] = 1;
}
bool checkRow(int r) {
  for (int i = 0; i < n; i++)
    if (x[r][i] == 0) return false;
  return true;
}
bool checkCol(int c) {
  for (int i = 0; i < m; i++)
    if (x[i][c] == 0) return false;
  return true;
}
int main() {
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> x[i][j];
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (checkRow(i) && checkCol(j)) {
        b[i][j] = 1;
        coverRow(i);
        coverCol(j);
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (x[i][j] != z[i][j]) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cout << b[i][j] << " ";
    }
    cout << endl;
  }
}
