#include <bits/stdc++.h>
using namespace std;
int main() {
  bool arr[100][100], row[100] = {}, col[100] = {}, arr2[100][100];
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; scanf("%d", &arr[i][j++]))
      ;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (!arr[i][j]) row[i] = col[j] = true;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (arr[i][j] && row[i] && col[j]) {
        printf("NO\n");
        return 0;
      }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (row[i] || col[j])
        arr2[i][j] = false;
      else
        arr2[i][j] = true;
  for (int i = 0; i < n; ++i) {
    bool ok = false;
    for (int j = 0; j < m; ++j)
      if (arr2[i][j]) {
        ok = true;
        break;
      }
    row[i] = ok;
  }
  for (int i = 0; i < m; ++i) {
    bool ok = false;
    for (int j = 0; j < n; ++j)
      if (arr2[j][i]) {
        ok = true;
        break;
      }
    col[i] = ok;
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (arr[i][j] && !row[i] && !col[j]) {
        printf("NO\n");
        return 0;
      }
  printf("YES\n");
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (j) printf(" ");
      printf("%d", arr2[i][j]);
    }
    printf("\n");
  }
  return 0;
}
