#include <bits/stdc++.h>
using namespace std;
int b[100][100], a[100][100], check[100][100];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      a[i][j] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> b[i][j];
      if (b[i][j] == 0) {
        for (int k = 0; k < m; k++) {
          a[i][k] = 0;
        }
        for (int l = 0; l < n; l++) {
          a[l][j] = 0;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 1) {
        for (int k = 0; k < m; k++) {
          b[i][k] = 0;
        }
        for (int l = 0; l < n; l++) {
          b[l][j] = 0;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (b[i][j] == 1) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << a[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
