#include <bits/stdc++.h>
using namespace std;
int m, n;
int B[105][105], A[105][105], ones[105][105];
void check(int x, int y) {
  register int i, j;
  for (i = 0; i < m; i++) A[i][y] = 0;
  for (i = 0; i < n; i++) A[x][i] = 0;
}
int serve(int x, int y) {
  register int i, j;
  for (i = 0; i < m; i++)
    if (A[i][y] == -1) return 1;
  for (i = 0; i < n; i++)
    if (A[x][i] == -1) return 1;
  return 0;
}
int main() {
  register int i, j;
  memset(A, -1, sizeof(A));
  cin >> m >> n;
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      cin >> B[i][j];
      if (B[i][j] == 1)
        ones[i][j] = 1;
      else
        check(i, j);
    }
  }
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      if (ones[i][j] == 1) {
        int x = serve(i, j);
        if (x == 0) {
          cout << "NO";
          return 0;
        }
      }
    }
  }
  cout << "YES\n";
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      cout << -A[i][j] << " ";
    }
    cout << "\n";
  }
}
