#include <bits/stdc++.h>
using namespace std;
#define int long long
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define infinite 9123456789
#define PRECISION cout.precision(3); cout.setf(ios::fixed);
#define db cout << "Debug" << "\n";
#define ler_entrada freopen("test_input.txt", "r", stdin);

int n, x[200010], y[200010];
pair<int, int> a[200010];

void solve(){
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second, x[i] = a[i].first, y[i] = a[i].second;
	
	sort(x+1, x+n+1);
	sort(y+1, y+n+1);
	
	if(n % 2 == 1){
		cout << "1\n";
		return;
	}
	
	int meio = n/2, resp = x[meio+1]-x[meio]+1;
	resp *= y[meio+1] - y[meio] + 1;
	cout << resp << "\n";
}

signed main(){
	IOS; int t; cin >> t;
	for(int i = 1; i <= t; i++) solve();
}