/*
++[---------->+<]>.-[------>+<]>-.++++++++.+++++.-[->+++++<]>-.-[--->++<]>--.+.[--->+<]>---.[->+++<]>++.++++++.-------.++++++.--[--->+<]>.-[->+++<]>-..+++++++++++++.[----->++<]>.------------.+[----->+<]>.--------.+++++++++++++.-------------.--[--->+<]>-.---[->++++<]>-.++++[->+++<]>.--[--->+<]>-.[->+++<]>++.-.+++.---.-[->+++<]>.-[--->++<]>+.++++.------.[--->+<]>---.+[----->+<]>.------------.+++++++.-------.--[--->+<]>---.+++[->+++<]>++..+++++++++.---------.-[->+++<]>.+[----->+<]>+.-------------.+++++++.+.----[->+++<]>-.
*/
#include <bits/stdc++.h>
using namespace std;

typedef long long big;
#define bigvec vector<big>
#define pbb pair<big, big>
#define pii pair<int, int>
#define fe first
#define se second
#define maxheap priority_queue
#define uset unordered_set
#define umap unordered_map
#define fr(i, s, e) for(big i = s; i < e; i++)
#define revfr(i, s, e) for(big i = s - 1; i >= e; i--)
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL)
#define debug(text) if(do_debug) {cout << text << endl;}
#define nl "\n"

const big mod = 1000000007;
const big infinity = 1000000000000000000;
bool do_debug = false;


void solve() {

	big n_houses;
	cin >> n_houses;

	vector<big> xv(n_houses);
	vector<big> yv(n_houses);

	fr(i, 0, n_houses) {

		cin >> xv[i] >> yv[i];
	}

	if(n_houses % 2) {

		cout << 1 << nl;
		return;
	}

	sort(xv.begin(), xv.end());
	sort(yv.begin(), yv.end());

	big x1 = xv[(n_houses / 2) - 1];
	big x2 = xv[n_houses / 2];
	big y1 = yv[(n_houses / 2) - 1];
	big y2 = yv[n_houses / 2];

	big xd = (x2 - x1) + 1;
	big yd = (y2 - y1) + 1;

	cout << xd * yd << nl;
}


int main() {
	
	speed;

	int q = 1;
	cin >> q;

	while(q-- > 0) {

		solve();
	}

	return 0;
}