#include <bits/stdc++.h>
using namespace std;
int n, m, B[101][101], A[101][101];
int main() {
  cin >> m >> n;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      cin >> B[i][j];
      A[i][j] = 1;
    }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      if (B[i][j] == 0) {
        for (int x = 0; x < m; x++) A[x][j] = 0;
        for (int x = 0; x < n; x++) A[i][x] = 0;
      }
    }
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n; j++) {
      int x = A[i][j];
      for (int w = 0; w < n; w++) {
        x |= A[i][w];
      }
      for (int w = 0; w < m; w++) {
        x |= A[w][j];
      }
      if (x != B[i][j]) {
        return cout << "NO\n", 0;
      }
    }
  cout << "YES\n";
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) cout << A[i][j] << " ";
    cout << endl;
  }
  return 0;
}
