#include <bits/stdc++.h>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    long long cases, no_points, xcoord, ycoord;
    cin >> cases;
    for (int i = 0; i < cases; i++)
    {
        vector <long long> xpoints;
        vector <long long> ypoints;
        
        long long choicesx,choicesy = 1;
       
        cin >> no_points;
        for (int x = 0; x < no_points; x++)
        {
            cin >> xcoord >> ycoord;
            xpoints.push_back(xcoord);
            ypoints.push_back(ycoord);
        }
        if(no_points % 2 == 1){
            cout << 1 << "\n";
        }

        else{
            sort(xpoints.begin(), xpoints.end());
            sort(ypoints.begin(), ypoints.end());
            choicesx = xpoints[(no_points/2)] - xpoints[(no_points/2) - 1] + 1;
            choicesy = ypoints[(no_points/2)] - ypoints[(no_points/2) - 1] + 1;
            cout << choicesx * choicesy << "\n";
        }
        
       
         
    }
    
    return 0;
}