Chef Ada is building a new restaurant in the following way:
- First, $N$ points $X_1, X_2, \ldots, X_N$ are chosen on the $x$-axis.
- Then, $N$ columns (numbered $1$ through $N$) are made. For simplicity, the columns are represented as vertical segments; for each valid $i$, the height of the $i$-th segment is $H_i$.
- Ada assigns a column to each of the points $X_1, X_2, \ldots, X_N$ in an arbitrary way (each column must be assigned to exactly one point).
- Finally, Ada constructs the roof of the restaurant, represented by a polyline with $N$ vertices. Let's denote the column assigned to the $i$-th point by $P_i$. For each valid $i$, the $i$-th of these vertices is $(X_i, H_{P_i})$, i.e. the polyline joins the tops of the columns from left to right.
Ada wants the biggest restaurant. Help her choose the positions of the columns in such a way that the area below the roof is the biggest possible. Formally, she wants to maximise the area of the polygon whose perimeter is formed by the roof and the segments $(X_N, H_{P_N}) - (X_N, 0) - (X_1, 0) - (X_1, H_{P_1})$. Let $S$ be this maximum area; you should compute $2 \cdot S$ (it is guaranteed that $2 \cdot S$ is an integer).

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $N$.
- $N$ lines follow. For each valid $i$, the $i$-th of these lines contains two space-separated integers $X_i$ and $H_i$.

-----Output-----
For each test case, print a single line containing one integer $2 \cdot S$.

-----Constraints-----
- $1 \le T \le 3 \cdot 10^5$
- $2 \le N \le 10^5$
- $0 \le X_1 < X_2 < \ldots < X_N \le 2 \cdot 10^9$
- $1 \le H_i \le 10^9$ for each valid $i$
- the sum of $N$ over all test cases does not exceed $10^6$

-----Example Input-----
1
5
1 1
2 2
3 3
4 4
5 5

-----Example Output-----
27

-----Explanation-----

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "'''a,b,c=map(int,input().split())\nif a-b>>31 and a-c>>31:\n    print(a)\nelif b-c>>31 and b-a>>31:\n    print(b)\nelse:\n    print(c)'''\n\n\n\n#*******************************************************************************\xa0\xa0\xa0\xa0************************\n\n\n'''n=int(input())\nc=0\na=[i for i in range(1,n+1)]\nfor i in range(n-1):\n    for j in range(i,n):\n     if a[i]^a[j]>n:\n      c+=1\n      print('('+str(i+1)+','+str(j+1)+')')\nprint(c)'''\n\n\n#*******************************************************************************\xa0\xa0\xa0\xa0***************************\n\n\n'''l=[0 for i in range(64)]\na=[str(i) for i in range(10)]+[chr(j) for j in range(65,91)]+[chr(k) for k in \xa0\xa0\xa0\xa0range(97,123)]+['-','_']\n\nfor i in range(64):\n    count=0\n    for j in range(64):\n     if i&j==i:\n      count+=1\n    l[i]=2*count-1\nprint(l)\n\nfor _ in range(int(input())):\n    s=input()\n    res=1\n    for i in s:\n     res*=l[a.index(i)]\n    print(res%1000000007)'''\n\n\n\n#*******************************************************************************\xa0\xa0\xa0\xa0*****************************\n\nfor _ in range(int(input())):\n n=int(input())\n X=[0 for i in range(n)]\n H=[0 for i in range(n)]\n for i in range(n):\n  x,h=list(map(int,input().split()))\n  X[i]=x\n  H[i]=h\n X1=[0 for i in range(n)]\n for i in range(n-2):\n  X1[i]=X[i+2]-X[i]\n X1[n-2],X1[n-1]=X[1]-X[0],X[n-1]-X[n-2]\n X1.sort()\n H.sort()\n res=0\n for i in range(n):\n  res+=X1[i]*H[i]\n print(res)\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13493