#include <bits/stdc++.h>
using namespace std;
inline void file() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
int arr2[100][100];
void solve() {}
bool check(int p, int q, int n, int m) {
  for (int j = 0; j < m; j++) {
    if (arr2[p][j] == 1) return true;
  }
  for (int j = 0; j < n; j++) {
    if (arr2[j][q] == 1) return true;
  }
  return false;
}
void print(int n, int m) {
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << arr2[i][j] << " ";
    }
    cout << endl;
  }
}
void fil(int n, int m) {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) arr2[i][j] = 1;
}
int main() {
  int n, m;
  cin >> n >> m;
  fil(n, m);
  vector<pair<int, int>> v;
  int arr[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
      if (arr[i][j] == 0) v.push_back(make_pair(i, j));
    }
  }
  for (int i = 0; i < v.size(); i++) {
    int p = v[i].first;
    int q = v[i].second;
    for (int j = 0; j < m; j++) {
      arr2[p][j] = 0;
    }
    for (int j = 0; j < n; j++) {
      arr2[j][q] = 0;
    }
  }
  int c = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == 1) {
        if (!check(i, j, n, m)) {
          cout << "NO\n";
          return 0;
        }
      }
    }
  }
  print(n, m);
  return 0;
}
