#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, c;
  cin >> r >> c;
  int arr[r][c];
  int ans[r][c];
  int trans[r][c];
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      cin >> arr[i][j];
      ans[i][j] = 1;
      trans[i][j] = 0;
    }
  }
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      if (arr[i][j] == 0) {
        for (int k = 0; k < r; k++) {
          ans[k][j] = 0;
        }
        for (int k = 0; k < c; k++) {
          ans[i][k] = 0;
        }
      }
    }
  }
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      for (int k = 0; k < r; k++) {
        trans[i][j] = max(trans[i][j], ans[k][j]);
      }
      for (int k = 0; k < c; k++) {
        trans[i][j] = max(trans[i][j], ans[i][k]);
      }
      if (trans[i][j] != arr[i][j]) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < r; i++) {
    for (int j = 0; j < c; j++) {
      cout << ans[i][j] << " ";
    }
    cout << "\n";
  }
  return 0;
}
