Chef got in the trouble! He is the king of Chefland and Chessland. There is one queen in Chefland and one queen in Chessland and they both want a relationship with him. Chef is standing before a difficult choice…
Chessland may be considered a chessboard with $N$ rows (numbered $1$ through $N$) and $M$ columns (numbered $1$ through $M$). Let's denote a unit square in row $r$ and column $c$ by $(r, c)$. Chef lives at square $(X, Y)$ of this chessboard.
Currently, both queens are living in Chessland too. Each queen, when alone on the chessboard, can see all squares that lie on the same row, column or diagonal as itself. A queen from $(x_q, y_q)$ cannot see a square $(r, c)$ if the square $(X, Y)$ is strictly between them. Of course, if the queens can see each other, the kingdom will soon be in chaos!
Help Chef calculate the number of possible configurations of the queens such that the kingdom will not be in chaos. A configuration is an unordered pair of distinct squares $(x_{q1}, y_{q1})$ and $(x_{q2}, y_{q2})$ such that neither of them is the square $(X, Y)$. Two configurations are different if the position of queen $1$ is different or the position of queen $2$ is different.

-----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 and only line of each test case contains four space-separated integers $N$, $M$, $X$ and $Y$. 

-----Output-----
For each test case, print a single line containing one integer — the number of configurations such that the kingdom will not be in chaos.

-----Constraints-----
- $1 \le T \le 1000$
- $1 \le X \le N \le 10^2$
- $1 \le Y \le M \le 10^2$
- $2 \le N, M$

-----Example Input-----
2
3 3 2 2
4 4 2 3

-----Example Output-----
24
94

-----Explanation-----
Example case 1: Half of these configurations are:
- $(1, 1), (3, 3)$
- $(1, 1), (2, 3)$
- $(1, 1), (3, 2)$
- $(1, 2), (3, 3)$
- $(1, 2), (3, 2)$
- $(1, 2), (3, 1)$
- $(1, 3), (3, 1)$
- $(1, 3), (3, 2)$
- $(1, 3), (2, 1)$
- $(2, 1), (2, 3)$
- $(2, 1), (1, 3)$
- $(2, 1), (3, 3)$

```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 = 'def ncr(n, r): \n if n < r :\n  return 0\n elif r == 2:\n  return(n*(n-1)/2)\n elif r == 1:\n  return n\n else:\n  t = 0\n\nt = int(input())\nfor p in range(t):\n n,m,x,y = input().split()\n n,m,x,y = int(n),int(m),int(x),int(y)\n\n maxi = ncr(n*m-1,2)\n\n sub1 = ncr(n,2) * (m-1)\n sub2 = ncr(m,2) * (n-1)\n maxi = maxi - (sub1 + sub2)\n #print(maxi)\n\n sub3 = ncr(y-1,2) + ncr(m-y,2)\n sub4 = ncr(x-1,2) + ncr(n-x,2)\n #print(sub3,sub4)\n maxi = maxi - (sub3 + sub4)\n #print(maxi)\n\n if n < m:\n  temp = n\n  diff = m-n\n else:\n  temp = m\n  diff = n-m\n\n sub5 = 0\n sub6 = 0\n for i in range(2,temp):\n  sub5 += ncr(i,2)\n\n for j in range(diff+1):\n  sub6 += ncr(temp,2)\n\n sub5 *= 4\n sub6 *= 2\n\n #print(sub5,sub6)\n maxi = maxi - (sub5 + sub6)\n #print(maxi)\n\n l1 = min(n-x,y-1)\n l2 = min(m-y,x-1)\n maxi = maxi + l1 + l2 + (l1*l2)\n\n\n l3 = min(x-1,y-1)\n l4 = min(m-y,n-x)\n maxi = maxi + l3 + l4 + (l3*l4)\n\n print(int(maxi*2))\n\n\n\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13839