#include <bits/stdc++.h>
using namespace std;
const int mn = 111;
const int inf = 1e9;
const int mod = 1e9 + 7;
int n, m;
int mat[mn][mn];
int ans[mn][mn];
void filll(int i, int j, int t) {
  for (int k = 0; k < m; k++) {
    ans[i][k] = t;
  }
  for (int k = 0; k < n; k++) {
    ans[k][j] = t;
  }
  return;
}
bool findd(int i, int j) {
  for (int k = 0; k < m; k++) {
    if (ans[i][k] == 1) {
      return 1;
    }
  }
  for (int k = 0; k < n; k++) {
    if (ans[k][j] == 1) {
      return 1;
    }
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << setprecision(30);
  for (int i = 0; i < mn; i++) {
    for (int j = 0; j < mn; j++) {
      ans[i][j] = 1;
    }
  }
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> mat[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (mat[i][j] == 0) {
        filll(i, j, 0);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (mat[i][j] == 1) {
        if (!findd(i, j)) {
          cout << "NO"
               << "\n";
          return 0;
        }
      }
    }
  }
  cout << "YES"
       << "\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << ans[i][j] << " ";
    }
    cout << "\n";
  }
  return 0;
}
