#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100;
int mat[MAXN][MAXN], ans[MAXN][MAXN], tmp[MAXN][MAXN];
int main() {
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      cin >> mat[i][j];
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      ans[i][j] = 1;
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      if (mat[i][j] == 0) {
        for (int k = 0; k < m; ++k) {
          ans[k][j] = 0;
        }
        for (int k = 0; k < n; ++k) {
          ans[i][k] = 0;
        }
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      if (ans[i][j] == 1) {
        for (int k = 0; k < m; ++k) {
          tmp[k][j] = 1;
        }
        for (int k = 0; k < n; ++k) {
          tmp[i][k] = 1;
        }
      }
    }
  }
  bool same = true;
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      if (tmp[i][j] != mat[i][j]) {
        same = false;
      }
    }
  }
  if (same) {
    cout << "YES\n";
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < n; ++j) {
        cout << ans[i][j] << " ";
      }
      cout << endl;
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
