#include <bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while(t--){
		int n;
		cin >> n;
		long long int x[n], y[n], ans = 1;
		for(int i = 0; i < n; i++) cin >> x[i] >> y[i];
		sort(x, x+n);
		sort(y, y+n);
		int mid = n/2;
		if(n%2 == 0){
			ans = x[mid] - x[mid-1] + 1;
			ans *= (y[mid] - y[mid-1] + 1); 
		}
		cout << ans << endl;
	}
}