func_code_string: #include <bits/stdc++.h>   using namespace std;   using LL = long long;   const int MX[4] = {0, 0, -1, 1};   const int MY[4] = {-1, 1, 0, 0};   int n, m, k;   bool z[26];   bool Inside(int a, int b) { return 0 <= a && a < n && 0 <= b && b < m; }   char GetC(int a, int b, int c, int d, vector<vector<char>>& x) {     memset(z, 0, sizeof(z));     for (int t = 0; t < 4; ++t) {       int p = a + MX[t], q = b + MY[t];       if (Inside(p, q) && x[p][q] !=  + ) {         z[x[p][q] -  a ] = true;       }       p = c + MX[t], q = d + MY[t];       if (Inside(p, q) && x[p][q] !=  + ) {         z[x[p][q] -  a ] = true;       }     }     for (int i = 0; i < 26; ++i) {       if (!z[i]) return  a  + i;     }     return  a ;   }   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     int times;     cin >> times;     while (times--) {       cin >> n >> m >> k;       vector<vector<char>> x(n, vector<char>(m,  + ));       if (n & 1) {         if (k < m / 2) {           cout <<  NO n ;           continue;         }         for (int i = 0; i < m; i += 2) {           x[0][i] = x[0][i + 1] =  a  + (i / 2 % 2);         }         k -= m / 2;         if (k & 1) {           cout <<  NO n ;           continue;         }         for (int j = 0; j < m; j += 2) {           if (k == 0) break;           for (int i = 1; i < n; ++i) {             if (k == 0) break;             char t = GetC(i, j, i, j + 1, x);             x[i][j] = x[i][j + 1] = t;             --k;           }         }         for (int i = 0; i < n; ++i) {           for (int j = 0; j < m; ++j) {             if (x[i][j] !=  + ) continue;             char t = GetC(i, j, i + 1, j, x);             x[i][j] = x[i + 1][j] = t;           }         }       } else if (m & 1) {         if (k & 1) {           cout <<  NO n ;           continue;         }         if (k > n * (m - 1) / 2) {           cout <<  NO n ;           continue;         }         for (int j = 0; j < m; j += 2) {           if (k == 0) break;           for (int i = 0; i < n; ++i) {             if (k == 0) break;             char t = GetC(i, j, i, j + 1, x);             x[i][j] = x[i][j + 1] = t;             --k;           }         }         for (int i = 0; i < n; ++i) {           for (int j = 0; j < m; ++j) {             if (x[i][j] !=  + ) continue;             char t = GetC(i, j, i + 1, j, x);             x[i][j] = x[i + 1][j] = t;           }         }       } else {         if (k & 1) {           cout <<  NO n ;           continue;         }         for (int j = 0; j < m; j += 2) {           if (k == 0) break;           for (int i = 0; i < n; ++i) {             if (k == 0) break;             char t = GetC(i, j, i, j + 1, x);             x[i][j] = x[i][j + 1] = t;             --k;           }         }         for (int i = 0; i < n; ++i) {           for (int j = 0; j < m; ++j) {             if (x[i][j] !=  + ) continue;             char t = GetC(i, j, i + 1, j, x);             x[i][j] = x[i + 1][j] = t;           }         }       }       cout <<  YES n ;     }     return 0;   }   