#include <bits/stdc++.h>
using namespace std;
int n, m;
int arr[150][150] = {};
int genraterdarr[150][150] = {};
bool barr[150][150] = {};
bool check(int i, int j) {
  for (int j = 0; j < m; j++) {
    if (arr[i][j] != 1) {
      return false;
    }
  }
  for (int s = 0; s < n; s++) {
    if (arr[s][j] != 1) {
      return false;
    }
  }
  genraterdarr[i][j] = 1;
  return true;
}
void putinbarr(int i, int j) {
  for (int j = 0; j < m; j++) {
    barr[i][j] = true;
  }
  for (int i = 0; i < n; i++) {
    barr[i][j] = true;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == 1) {
        if (check(i, j) == true) {
          putinbarr(i, j);
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == 1 && barr[i][j] == 0) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << genraterdarr[i][j] << " ";
    }
    cout << endl;
  }
}
