func_code_string: #include <bits/stdc++.h>   using namespace std;   inline void read(int &x) {     char ch = getchar();     x = 0;     while (!isdigit(ch)) ch = getchar();     while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar();   }   int n, m, a[238][238], x[238], y[238];   signed main() {     read(n), read(m);     for (int i = 1; i <= n; ++i)       for (int j = 1; j <= m; ++j) read(a[i][j]);     if (n == 1) {       puts( YES );       puts( 0 );       for (int i = 1; i <= m; ++i) a[1][i] ? putchar(48) : putchar(49);       return 0;     }     if (m == 1) {       puts( YES );       for (int i = 1; i <= n; ++i) a[i][1] ? putchar(48) : putchar(49);       puts(  );       return putchar(48), 0;     }     int ok = 1, cnt = 0, w, qwq;     for (int i = 1; i <= m; ++i) y[i] = a[1][i];     for (int i = 2; i <= n; ++i) {       int tmp = 0;       for (int j = 2; j <= m; ++j)         if ((a[i][j] ^ y[j]) != (a[i][j - 1] ^ y[j - 1]))           ++tmp, qwq = (a[i][j] ^ y[j]);       if (tmp) {         cnt += tmp, w = i;         if (cnt > 1) {           ok = 0;           break;         }       }     }     if (ok) {       puts( YES );       if (cnt) {         for (int i = 2; i < w; ++i) x[i] = a[i][1] ^ y[1];         x[w] = qwq ^ 1;         for (int i = w + 1; i <= n; ++i) x[i] = a[i][1] ^ y[1] ^ 1;       } else         for (int i = 2; i <= n; ++i) x[i] = a[i][1] ^ y[1];       for (int i = 1; i <= n; ++i) putchar(x[i] + 48);       puts(  );       for (int i = 1; i <= m; ++i) putchar(y[i] + 48);       return 0;     }     ok = 1, cnt = 0;     for (int i = 1; i <= m; ++i) y[i] = a[n][i] ^ 1;     for (int i = 1; i < n; ++i) {       int tmp = 0;       for (int j = 2; j <= m; ++j)         if ((a[i][j] ^ y[j]) != (a[i][j - 1] ^ y[j - 1]))           ++tmp, qwq = (a[i][j] ^ y[j]);       if (tmp) {         cnt += tmp, w = i;         if (cnt > 1) {           ok = 0;           break;         }       }     }     if (ok) {       puts( YES );       if (cnt) {         for (int i = 1; i < w; ++i) x[i] = a[i][1] ^ y[1];         x[w] = qwq ^ 1;         for (int i = w + 1; i < n; ++i) x[i] = a[i][1] ^ 1 ^ y[1];       } else         for (int i = 1; i < n; ++i) x[i] = a[i][1] ^ y[1];       for (int i = 1; i <= n; ++i) putchar(x[i] + 48);       puts(  );       for (int i = 1; i <= m; ++i) putchar(y[i] + 48);       return 0;     }     return puts( NO ), 0;   }   