#include<bits/stdc++.h>
using namespace std;
#define ll long long
int t,n;
ll x[1005],y[1005];
int main()
{
	scanf("%d",&t);
	while(t--)
	{
		scanf("%d",&n);
		for(int i=1;i<=n;i++)
		scanf("%lld%lld",&x[i],&y[i]);
		sort(x+1,x+1+n);
		sort(y+1,y+1+n);
		if(n&1)puts("1");
		else {
			ll ans = ( x[n/2+1]-x[n/2]+1)*(y[n/2+1]-y[n/2]+1);
			printf("%lld\n",ans);
		}
	}
}
