#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;

const int MAX = 1000;
int grid[MAX][MAX];


void solve(){
	ll n;
	cin >> n;
	vector<ll> x(n), y(n);
	for (ll i = 0; i < n; i++){
		cin >> x[i];
		cin >> y[i];
	}

	sort(x.begin(), x.end());
	sort(y.begin(), y.end());

	ll res = 0;
	if (1&n) res = 1;
	else{
		n /= 2;
		res += (y[n]-y[n-1] +1) * (x[n]-x[n-1] +1);
	}
	cout << res << "\n";

}



int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	ll t;
	cin >> t;
	while (t--){
		solve();
	}


	return 0;
}
