There are three squares, each with side length a placed on the x-axis. The coordinates of centers of these squares are (x1, a/2), (x2, a/2) and (x3, a/2) respectively. All of them are placed with one of their sides resting on the x-axis.
You are allowed to move the centers of each of these squares along the x-axis (either to the left or to the right)  by a distance of at most K. Find the maximum possible area of intersections of all these three squares that you can achieve. That is, the maximum area of the region which is part of all the three squares in the final configuration.

-----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 two space-separated integers a, K denoting side length of the squares, and the maximum distance that you can move the center of any square.
- The second line contains three space separated integers x1, x2, x3

-----Output-----
For each test case, output a real number corresponding to the maximum area of the intersection of the three squares that you can obtain. Your answer will be considered correct if it has an absolute error of less than or equal to 	10-2.

-----Constraints-----
- 1 ≤ T ≤ 105
- 1 ≤ a ≤ 105
- 0 ≤ K ≤ 106
- -106 ≤ x1, x2, x3 ≤ 106

-----Example-----
Input
3
1 0
1 2 3
1 1
1 2 3
1 1
1 4 6

Output
0.000000
1.0000
0.0

-----Explanation-----
Testcase 1: The figure below shows the three squares:

Since K = 0, they cannot be moved, and since there is no region which belongs to all three squares, the answer is 0.
Testcase 2: The starting configuration is the same as above, but now each of the squares can move 1 unit. So we can move the first square 1 unit to the right and the third square one unit to the left, and have all the three squares at x-coordinate = 2. Thus the entire square is part of all three squares, and the answer is 1.

```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 = 't=int(input())\nfor o in range(t):\n n,k=list(map(int,input().split()))\n x,y,z=list(map(int,input().split()))\n x1,y1=x-n/2,x+n/2\n x2,y2=y-n/2,y+n/2\n x3,y3=z-n/2,z+n/2\n a=[(x1-k,y1+k),(x2-k,y2+k),(x3-k,y3+k)]\n a.sort()\n x1,y1=a[0]\n x2,y2=a[1]\n x3,y3=a[2]\n f1,f2=max(x1,x2),min(y1,y2)\n ans=0.0\n flag=False\n if(f1>=f2):\n  flag=True\n else:\n  f1=max(f1,x3)\n  f2=min(f2,y3)\n  if(f1>=f2):\n   flag=True\n if(flag):\n  print(0*1.0)\n  continue\n if(f2-f1>n):\n  print(n*n*1.0)\n else:\n  print((f2-f1)*n*1.0)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13543