#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MN LLONG_MIN
#define MX LLONG_MAX
#define UL ULLONG_MAX
#define pb push_back
#define e "\n"
#define iff(u,v)  if(abs(u-v)<1e-9)
#define vi vector<long long>v,v1,v2;
#define pi 3.1415926536
#define fix cout<<fixed; cout<<setprecision(20);
#define dc ll i,j,k,n,m,len,ans=0,mx=-1,mn=MX,sum=0; string s; bool flag=false;

void solve()
{
	dc; 
	cin>>n;
	ll x[n],y[n];
	for(i=0;i<n;i++)
	{
		cin>>x[i]>>y[i];
	}
	if(n%2==1)cout<<1<<e;
	else 
	{
		ll p,q;
		sort(x,x+n); sort(y,y+n);
		p=abs(x[n/2-1]-x[n/2])+1;
		q=abs(y[n/2-1]-y[n/2])+1;
		cout<<p*q<<e;
	}
}

int main()
{
    //freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);    
    int t; cin>>t; while(t--)solve();
    //solve(); 
}
