#include<bits/stdc++.h>

using   namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;

#define  all(v)       (v).begin(),(v).end()
#define  rall(v)      (v).rbegin(),(v).rend()
#define  pb           push_back  
#define  pob          pop_back
#define  eb           emplace_back
#define  ins          insert
#define  mp           make_pair
#define  ff           first
#define  ss           second
#define  pf           push_front
#define  bs           binary_search
#define  lb           lower_bound
#define  ub           upper_bound
#define  sz(a)        (ll)a.size()
#define  dec(x)       fixed<<setprecision(x)
#define  lcm(a,b)     (a*b/__gcd(a,b))

typedef  priority_queue<ll>  pq;
typedef  priority_queue<ll,vector<ll>,greater<ll> > pqmn;
typedef  pair<ll,ll> pll;
typedef  vector<ll> vll;
typedef  vector<pll> vpll;
typedef  vector<vector<ll> > vvll;
typedef  vector<string> vstr;
typedef  set<ll> sll;
typedef  set<pll> spll;
typedef  map<ll,ll> mll;

const    ll inf=LLONG_MAX;
const    ll mod=1e9+7;
const    ld pi=acos(-1);
const    ll N=100001;
                 
long long solve(vector<int> x)
{
    int n=x.size();
    sort(all(x));
    return x[n/2]-x[(n-1)/2]+1;
}

void solution()
{
    int n;
    cin>>n;
    vector<int> x(n),y(n);
    for(int i=0;i<n;i++)
        cin>>x[i]>>y[i];
    cout<<solve(x)*solve(y)<<endl;
}

int main()
{
	//freopen("t","r",stdin);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll t;
    t=1;
    cin>>t;
    while(t--){
        solution();
    }
    return 0;

}
