# include <bits/stdc++.h>

using namespace std;
const int N=1005;
long long x[N],y[N];

int main()
{
  int t;
  cin >> t;
  while(t--)
  {
    int n,flag=1;
    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%2==1)  printf("1\n");
    else  printf("%lld\n",(x[n/2+1]-x[n/2]+1)*(y[n/2+1]-y[n/2]+1));
  }
}