#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int m, n;
  cin >> m >> n;
  int arr[m][n], ba[m][n];
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
      ba[i][j] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[i][j] == 0) {
        for (int k = 0; k < m; k++) {
          ba[k][j] = 0;
        }
        for (int k = 0; k < n; k++) {
          ba[i][k] = 0;
        }
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      int p = 0;
      for (int k = 0; k < m; k++) p |= ba[k][j];
      for (int k = 0; k < n; k++) p |= ba[i][k];
      if (p != arr[i][j]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cout << ba[i][j] << " ";
    }
    cout << "\n";
  }
}
