#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int a[110][110], b[110][110];
int n, m;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) a[i][j] = 1;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) cin >> b[i][j];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (!b[i][j]) {
        for (int k = 0; k < n; ++k) a[k][j] = 0;
        for (int l = 0; l < m; ++l) a[i][l] = 0;
      }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (b[i][j]) {
        bool f = false;
        for (int k = 0; k < n; ++k)
          if (a[k][j]) f = true;
        for (int l = 0; l < m; ++l)
          if (a[i][l]) f = true;
        if (!f) {
          cout << "NO" << endl;
          return 0;
        }
      }
  cout << "YES" << endl;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) cout << a[i][j] << " \n"[j == m - 1];
}
