#include <bits/stdc++.h> 
using namespace std;
#define int long long
#define endl '\n'
#define pb push_back
#define mod 1000000007
#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
#define PI 3.1415926535
#define INF INT_MAX
#define SPEED                       \
  ios_base::sync_with_stdio(false); \
  cin.tie(0);                       \
  cout.tie(0);
  
// Aakash
// 5:00 PM

void solve(){
  int n;
  cin>>n;
  
  int a[n],b[n];
  for(int i=0;i<n;i++)
  {
    int p,q;
    cin>>p>>q;
    a[i]=p;
    b[i]=q;
  }

  sort(a,a+n);
  sort(b,b+n);

  if(n%2!=0)
  {
    cout<<1<<endl;
    return;
  }
  else
  {
    int u = a[n/2]-a[n/2-1]+1;
    int v = b[n/2]-b[n/2-1]+1;

    cout<<u*v<<endl;
  }


}

int32_t main() { 

  // freopen("input.txt", "r", stdin);
  // freopen("output.txt", "w", stdout);

     SPEED;
     int t=1;
     cin>>t;
     while(t--){
              solve();
     }

    return 0; 
} 


