#include <bits/stdc++.h>   using namespace std;   int T, n, cnt;   struct poi {     double x, y, alp;     poi() {}     poi(double x, double y) : x(x), y(y) { alp = atan2(y, x); }     friend bool operator<(const poi &r1, const poi &r2) {       return r1.alp < r2.alp;     }     friend poi operator+(const poi &r1, const poi &r2) {       return poi(r1.x + r2.x, r1.y + r2.y);     }     friend poi operator-(const poi &r1, const poi &r2) {       return poi(r1.x - r2.x, r1.y - r2.y);     }     friend double operator^(const poi &r1, const poi &r2) {       return r1.x * r2.y - r2.x * r1.y;     }     friend double operator*(const poi &r1, const poi &r2) {       return r1.x * r2.x + r1.y * r2.y;     }     friend poi operator*(double v, const poi &r1) {       return poi(r1.x * v, r1.y * v);     }   } a[210000 << 1], p, w[210000 << 2];   struct line {     poi p, v;     line() {}     line(poi p, poi v) : p(p), v(v) {}   } b[210000 << 2], q[210000 << 2];   void init() {     cnt = 0;     double t = 1e6;     poi p1(t, t), p2(-t, t), p3(-t, -t), p4(t, -t);     b[++cnt] = line(p1, p2 - p1);     b[++cnt] = line(p2, p3 - p2);     b[++cnt] = line(p3, p4 - p3);     b[++cnt] = line(p4, p1 - p4);   }   int insert(poi p1, poi p2) {     double t = (p2 - p1) ^ (p - p1);     if (fabs(t) < 1e-12) return 0;     if (t > 0)       b[++cnt] = line(p1, p2 - p1);     else       b[++cnt] = line(p2, p1 - p2);     return 1;   }   int onleft(poi p1, line l1) { return (l1.v ^ (p1 - l1.p)) > 0; }   int cmp(const line &l1, const line &l2) {     if (fabs(l1.v.alp - l2.v.alp) < 1e-12) return onleft(l1.p, l2);     return l1.v.alp < l2.v.alp;   }   poi intersect(line l1, line l2) {     poi u = l1.p - l2.p;     double tmp = (u ^ l2.v) / (l2.v ^ l1.v);     return l1.p + tmp * l1.v;   }   double HPI() {     int h, r;     sort(b + 1, b + 1 + cnt, cmp);     q[h = r = 1] = b[1];     for (int i = 2; i <= cnt; i++) {       if (fabs(b[i].v.alp - b[i - 1].v.alp) < 1e-12) continue;       while (h < r && !onleft(w[r], b[i])) r--;       while (h < r && !onleft(w[h + 1], b[i])) h++;       q[++r] = b[i];       w[r] = intersect(q[r], q[r - 1]);     }     while (h < r && !onleft(w[r], q[h])) r--;     w[h] = intersect(q[h], q[r]);     if (h + 1 >= r) return 0;     w[r + 1] = w[h];     double ret = 0;     for (int i = h; i <= r; i++) ret += w[i] ^ w[i + 1];     return fabs(ret);   }   int main() {     scanf( %d , &T);     for (; T--;) {       init();       scanf( %d , &n);       n--;       scanf( %lf%lf , &p.x, &p.y);       for (int i = 1; i <= n; i++) {         scanf( %lf%lf , &a[i].x, &a[i].y);         a[i] = a[i] - p;       }       sort(a + 1, a + 1 + n);       int flag = 0;       for (int i = 1; i <= n; i++) {         a[i + n] = a[i];         insert(a[i] + p, a[i + 1] + p);         if (fabs(a[i].alp - a[i + 1].alp) < 1e-12) flag = 1;       }       for (int i = 1, j = 2; i <= n; i++) {         for (; j < i + n && ((a[j] - a[i]) ^ a[i]) < 1e-12; j++)           ;         if (i != j - 1 && !insert(a[i] + p, a[j - 1] + p)) flag = 1;       }       if (flag) {         puts( 0 );         continue;       }       printf( %.8lf n , HPI() / 2.0);     }     return 0;   }   