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