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