func_code_string: #include <bits/stdc++.h>   using namespace std;   long long limit = 1e9 + 7;   bool cmp(long long a, long long b) { return a > b; }   long long myceil(long long a, long long b) { return a / b + bool(a % b); }   long long mylog(long long num, long long base) {     long long ans = 0;     while (num) {       ans++;       num /= base;     }     return ans - 1;   }   long long Pow(long long a, long long b) {     long long ans = 1, mul = a;     while (b) {       if (b & 1) ans = (ans * mul) % limit;       mul = (mul * mul) % limit;       b /= 2;     }     return ans;   }   template <typename T>   ostream &operator<<(ostream &os, vector<T> &v) {     int n = v.size();     for (int i = 0; i < n; i++) os << v[i] <<    ;     os << endl;     return os;   }   template <typename T>   istream &operator>>(istream &is, vector<T> &v) {     int n = v.size();     for (int i = 0; i < n; i++) is >> v[i];     return is;   }   string lps(string s) {     int n = s.length();     int lps[n];     lps[0] = 0;     int len = 0;     int i = 1;     while (i < n) {       if (s[i] == s[len]) {         len++;         lps[i] = len;         i++;       } else {         if (len != 0) {           len = lps[len - 1];         } else {           lps[i] = 0;           i++;         }       }     }     int res = lps[n - 1];     return s.substr(0, res);   }   vector<int> primes;   long long fact[100005], inv[100005];   ;   void pre() {     fact[0] = 1;     inv[0] = 1;     for (int i = 1; i < 100005; i++) fact[i] = (fact[i - 1] * i) % limit;     for (int i = 1; i < 100005; i++)       inv[i] = (inv[i - 1] * Pow(i, limit - 2)) % limit;   }   long long comb(long long n, long long r) {     long long ans = fact[n];     ans *= inv[n - r];     ans %= limit;     ans *= inv[r];     ans %= limit;     return ans;   }   int main() {     int t = 1;     cin >> t;     for (int test = 1; test < t + 1; test++) {       long long n, k;       cin >> n >> k;       if ((n - (k - 1) * (k - 1)) >= (2 * k - 1) && (n - (k - 1) * (k - 1)) % 2)         cout <<  YES n ;       else         cout <<  NO n ;     }     return 0;   }   