#include <iostream>
#include <bits/stdc++.h>
#define ll long long
using namespace std;

void solve(){
    int n;
    cin>>n;
    vector<ll>x(n);
    vector<ll>y(n);
    for(int i=0;i<n;i++){
        cin>>x[i]>>y[i];
    }
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());
    if(n%2==1) cout<<1<<"\n";
    else{
        ll ans=(x[n/2]-x[n/2 - 1]+1)*(y[n/2]-y[n/2 -1]+1);
        cout<<ans<<"\n";
    }
}
                
int main(){
    int t;
    cin>>t;
    for(int i=1;i<=t;i++){
        // cout<<"Case #"<<i<<": ";
        solve();
    }
    return 0;
}