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