#include <bits/stdc++.h>
using namespace std;
int M[102][102], R[102], C[102], N[102][102], A[102][102];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> M[i][j];
      R[i] |= !M[i][j];
      C[j] |= !M[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      N[i][j] = !(R[i] || C[j]);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      for (int z = 0; z < n; z++) A[i][j] |= N[z][j];
      for (int z = 0; z < m; z++) A[i][j] |= N[i][z];
      if (A[i][j] != M[i][j]) goto barra;
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << N[i][j] << " \n"[j == m - 1];
    }
  }
  return 0;
barra:;
  cout << "NO\n";
  return 0;
}
