#include<bits/stdc++.h>
#define ll long long int
#define fill(a,v) memset(a,v,sizeof a)
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
using namespace std;
ll i,j,n;
int main()
{
	#ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
    
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		ll x[n+1],y[n+1];
		for(i=0;i<n;i++)
		{
			cin>>x[i]>>y[i];
		}
		sort(x,x+n);
		sort(y,y+n);
		if(n%2)
			cout<<1<<endl;
		else
		{
			ll xr=x[n/2];
			ll yr=y[n/2];
			ll xl=x[n/2 -1];
			ll yl=y[n/2 -1];
			ll ans=(xr-xl +1 )*(yr-yl+1);
			cout<<ans<<endl;
		}
	}

 
	  
  return 0;
}