#include <bits/stdc++.h>
using namespace std;
int arr[105][105], B[105][105];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      cin >> B[i][j];
      if (B[i][j] == 0) {
        for (int k = 0; k < n; k++) arr[k][j] = 1;
        for (int k = 0; k < m; k++) arr[i][k] = 1;
      }
    }
  bool b = false;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      b = false;
      if (B[i][j] == 1) {
        b = true;
        for (int k = 0; k < n; k++)
          if (arr[k][j] == 0) b = false;
        for (int k = 0; k < m; k++)
          if (arr[i][k] == 0) b = false;
      }
      if (b) break;
    }
    if (b) break;
  }
  if (!b) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << 1 - arr[i][j] << " ";
      cout << endl;
    }
  } else
    cout << "NO\n";
  return 0;
}
