#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;

ll n;
ll x[maxn],y[maxn];

int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%lld",&n);
		for(ll 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 % 2 == 1) printf("1\n");
		else{
			ll tmp1 = x[n / 2 + 1] - x[n / 2]+1;
			ll tmp2 = y[n / 2 + 1] - y[n / 2]+1;
			ll ans = tmp1 * tmp2;
			printf("%lld\n",ans);
		}
	}
	return 0;
}