#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL);
  int a[100][100];
  int b[100][100];
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      b[i][j] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
      if (!a[i][j]) {
        for (int k = 0; k < m; k++) b[k][j] = 0;
        for (int k = 0; k < n; k++) b[i][k] = 0;
      }
    }
  }
  bool flag = true;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i][j] == 1) {
        int g = 0;
        int r = i;
        int c = j;
        for (int h = 0; h < n; h++)
          if (b[r][h]) g = 1;
        for (int h = 0; h < m; h++)
          if (b[h][c]) g = 1;
        if (!g) flag = false;
      }
    }
  }
  if (!flag)
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++) {
        cout << b[i][j] << " ";
      }
      cout << endl;
    }
  }
  return 0;
}
