#include<iostream>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<iomanip>
#include<map>
#include<cstdio>
#include<stack>
#include<set>
using namespace std;
#define endl  '\n'
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
const int N = 1e5 + 10;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;

int t, n;
ll x[N], y[N];
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    cin >> t;
    while (t--)
    {
        cin >> n;
        for (int i = 1; i <= n; i++)
        {
            cin >> x[i] >> y[i];
        }
        sort(x + 1, x + n + 1);
        sort(y + 1, y + n + 1);
        if ((n & 1) == 0)
            cout <<(x[n / 2 + 1] - x[n / 2] + 1) * (y[n / 2 + 1] - y[n / 2] + 1) << endl;
        else
            cout << 1 << endl;
    }
	return 0;
}