#include <bits/stdc++.h>
using namespace std;
inline void end(string s) {
  cout << s;
  exit(0);
}
inline void end(long long n) {
  cout << n;
  exit(0);
}
int mod(int a, int b) { return (((a % b) + b) % b); }
const int N = 105;
int r, c;
int A[N][N], B[N][N], C[N][N];
void erase(char t, int x, int v, int A[N][N]) {
  if (t == 'r') {
    for (int i = 0; i < N; ++i) {
      A[x][i] = v;
    }
  } else {
    for (int i = 0; i < N; ++i) {
      A[i][x] = v;
    }
  }
}
bool isSame(int A[N][N], int B[N][N]) {
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++)
      if (A[i][j] != B[i][j]) return false;
  return true;
}
int main(int argc, char const *argv[]) {
  cin >> r >> c;
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++) A[i][j] = 1;
  for (int i = 0; i < r; i++)
    for (int j = 0; j < c; j++) {
      cin >> B[i][j];
      if (!B[i][j]) {
        erase('r', i, 0, A);
        erase('c', j, 0, A);
      }
    }
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      if (A[i][j]) {
        erase('r', i, 1, C);
        erase('c', j, 1, C);
      }
    }
  }
  if (isSame(B, C)) {
    cout << "YES" << endl;
    for (int i = 0; i < r; i++) {
      for (int j = 0; j < c; j++) {
        cout << A[i][j] << " ";
      }
      cout << endl;
    }
  } else {
    cout << "NO";
  }
  return 0;
}
