#include <bits/stdc++.h>   using namespace std;      void solve(){       int n;       cin >> n;       vector<int64_t> X;       vector<int64_t> Y;       int x,y;       for (int i = 0; i < n; i++){           cin >> x >> y;           X.push_back(x);           Y.push_back(y);       }       sort(X.begin(),X.end());               sort(Y.begin(),Y.end());               int64_t res;       if (n%2 == 0){           res = (X.at(n/2)-X.at(n/2-1)+1)*(Y.at(n/2)-Y.at(n/2-1)+1);       } else {           res = 1;       }       cout << res << endl;       return;   }      int main() {       int t;       cin >> t;       while (t){           solve();           t--;       }       return 0;   }