#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  bool strs[100];
  fill_n(strs, 100, 1);
  bool cols[100];
  fill_n(cols, 100, 1);
  bool matrix[100][100]{};
  bool rightMatrix[100][100]{};
  bool srcMatrix[100][100]{};
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      int c;
      cin >> c;
      if (c == 0) {
        strs[i] = false;
        cols[j] = false;
      } else
        matrix[i][j] = true;
    }
  }
  for (int i = 0; i < m; i++) {
    if (!strs[i]) continue;
    for (int j = 0; j < n; j++) {
      if (!cols[j]) continue;
      for (int k = 0; k < n; k++) rightMatrix[i][k] = true;
      for (int k = 0; k < m; k++) rightMatrix[k][j] = true;
      srcMatrix[i][j] = true;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (rightMatrix[i][j] != matrix[i][j]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (srcMatrix[i][j])
        cout << "1 ";
      else
        cout << "0 ";
    }
    cout << endl;
  }
}
