func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, a[101][101];   int main() {     cin >> n >> m;     if (n == 1 && m == 1)       cout <<  1 ;     else if (n == 2 && m == 2)       cout <<  -1 ;     else if ((n == 1 && m <= 3) || (m == 1 && n <= 3))       cout <<  -1 ;     else {       int k = n * m;       for (int i = 0; i < n; ++i)         for (int j = 0; j < m; ++j) {           if (i % 2 && !(j % 2)) {             a[i][j] = k;             --k;           }           if (!(i % 2) && j % 2) {             a[i][j] = k;             --k;           }         }       for (int i = 0; i < n; ++i)         for (int j = 0; j < m; ++j) {           if (!(i % 2) && !(j % 2)) {             a[i][j] = k;             --k;           }           if ((i % 2) && (j % 2)) {             a[i][j] = k;             --k;           }         }       for (int i = 0; i < n; ++i) {         for (int j = 0; j < m; ++j) cout << a[i][j] <<    ;         cout << endl;       }     }     return 0;   }   