#include<bits/stdc++.h>
#define ll long long
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
using namespace std;
int main()
{
    fast();
    ll t;
    cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        vector<ll>x(n);
        vector<ll>y(n);
        for(ll i=0;i<n;i++)
            cin>>x[i]>>y[i];
            ll res=0;
            sort(x.begin(),x.end());
            sort(y.begin(),y.end());
        if(n%2==1)
        {
            cout<<1<<endl;
            continue;
        }
        else
        {
            ll l=(n+1)/2;
            ll r=(n+2)/2;
            res=(x[r-1]-x[l-1]+1)*(y[r-1]-y[l-1]+1);
            cout<<res<<endl;
        }
    }
    return 0;
}