#include <cstdio>
#include <algorithm>
using namespace std;
const int N=1005;
int n,t,xx[N],yy[N];
int main(){
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		for(int i=1; i<=n; i++) scanf("%d%d",xx+i,yy+i);
		if(n&1){
			printf("1\n");
			continue;
		}
		sort(xx+1,xx+1+n);
		sort(yy+1,yy+1+n);
		printf("%lld\n",1LL*(xx[(n>>1)+1]-xx[n>>1]+1)*(yy[(n>>1)+1]-yy[n>>1]+1));
	}
	return 0;
}
