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