#include <bits/stdc++.h>
using namespace std;
int M, N;
int A[100][100];
int B[100][100];
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]) {
        for (int k = 0; k < M; ++k) {
          A[k][j] = 0;
        }
        for (int l = 0; l < N; ++l) {
          A[i][l] = 0;
        }
      }
    }
  }
  for (int i = 0; i < M; ++i) {
    for (int j = 0; j < N; ++j) {
      bool b = false;
      if (B[i][j]) {
        for (int k = 0; k < M; ++k) {
          b = b || A[k][j];
        }
        for (int l = 0; l < N; ++l) {
          b = b || A[i][l];
        }
        if (!b) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < M; ++i) {
    for (int j = 0; j < N; ++j) {
      cout << A[i][j] << ' ';
    }
    cout << endl;
  }
}
