#include <bits/stdc++.h>
using namespace std;
int r[110], l[110], val[110][110], num[110][110];
int main() {
  int T, t, n, m, i, j, k;
  bool flag;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) r[i] = 1;
  for (j = 1; j <= m; j++) l[j] = 1;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) {
      scanf("%d", &num[i][j]);
      if (num[i][j] == 0) r[i] = l[j] = 0;
    }
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (r[i] == 1 && l[j] == 1)
        val[i][j] = 1;
      else
        val[i][j] = 0;
  for (i = 1; i <= n; i++) {
    r[i] = 0;
    for (j = 1; j <= m; j++) r[i] += val[i][j];
  }
  for (i = 1; i <= m; i++) {
    l[i] = 0;
    for (j = 1; j <= n; j++) l[i] += val[j][i];
  }
  flag = true;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (num[i][j] == 1 && r[i] + l[j] == 0) flag = false;
  if (!flag)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= m; j++) printf("%d ", val[i][j]);
      printf("\n");
    }
  }
}
