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