You are given a grid with dimension $n$ x $m$ and two points with coordinates $X(x1,y1)$ and $Y(x2,y2)$ . Your task is to find the number of ways in which one can go from point $A(0, 0)$ to point $B (n, m)$ using the $shortest$ possible path such that the shortest path neither passes through $X$ nor through $Y$. 

Consider the above 4 x 4 grid . Our shortest path can't pass through points (1,3) and (3,3) (marked by yellow dots). One of the possible shortest path is from $A$ to $C$ and then from $C$ to $B$.

-----Input:-----
- First line contains $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input, six space separated integers $n, m, x1, y1, x2, y2$. 

-----Output:-----
- For each testcase, output in a single line number of ways modulo $998244353$.

-----Constraints-----
- $1 \leq T \leq 10^5$
- $3 \leq n,m \leq 10^5$
- $1 \leq x1, x2 \leq n - 1$
- $1 \leq y1, y2 \leq m - 1$
- $x1 \leq x2$
- $y1 \leq y2$
- $X$ and $Y$ never coincide.

-----Sample Input:-----
1
3 3 1 1 1 2

-----Sample Output:-----
5

```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 = '#dt = {} for i in x: dt[i] = dt.get(i,0)+1\r\nimport sys;input = sys.stdin.readline\r\ninp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]\r\n\r\nN = 100001\r\np = 998244353\r\nfactorialNumInverse = [0]*(N+1) \r\nnaturalNumInverse = [0]*(N+1)\r\nfact = [0]*(N+1)\r\n  \r\ndef InverseofNumber(p): \r\n    naturalNumInverse[0] = naturalNumInverse[1] = 1\r\n    for i in range(2,N+1): \r\n        naturalNumInverse[i] = (naturalNumInverse[p % i] * (p - (p // i)) % p)\r\n  \r\ndef InverseofFactorial(p): \r\n    factorialNumInverse[0] = factorialNumInverse[1] = 1\r\n    for i in range(2,N+1): \r\n        factorialNumInverse[i] = (naturalNumInverse[i] * factorialNumInverse[i - 1]) % p \r\n  \r\ndef factorial(p): \r\n    fact[0] = 1\r\n    for i in range(1, N + 1): \r\n        fact[i] = (fact[i - 1] * i) % p\r\n\r\ndef f(num,den1,den2):\r\n    # n C r = n!*inverse(r!)*inverse((n-r)!) \r\n    #ans = ((fact[N] * factorialNumInverse[R])% p * factorialNumInverse[N-R])% p\r\n    ans = ((fact[num]*factorialNumInverse[den1])%p*factorialNumInverse[den2])%p\r\n    return ans \r\n\r\nInverseofNumber(p) \r\nInverseofFactorial(p) \r\nfactorial(p)\r\n\r\nfor _ in range(inp()):\r\n    n,m,x1,y1,x2,y2 = ip()\r\n    tot = f(m+n,m,n)\r\n    a = f(m-y1+n-x1,m-y1,n-x1)\r\n    aa = f(x1+y1,x1,y1)\r\n    b = f(m-y2+n-x2,m-y2,n-x2)\r\n    bb = f(x2+y2,x2,y2)\r\n    c = f(y2-y1+x2-x1,y2-y1,x2-x1)\r\n    ans = (tot - a*aa - b*bb + c*aa*b)%p\r\n    print(ans)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 12015223