Chefland has all the cities on a straight line. There are $N$ cities in Chefland numbered $1$ to $N$. City $i$ is located at coordinate $x_i$ on the x-axis. Guru wants to travel from city $A$ to city $B$. He starts at time t=0. He has following choices to travel.
- He can walk $1$ metre in $P$ secs.
- There is a train that travels from city $C$ to city $D$ which travels $1$ metre in $Q$ secs which starts at time t=$Y$ secs. Guru can take the train only at city $C$ and leave the train only at city $D$.
Can you help Guru find the minimum time he will need to travel from city $A$ to $B$. Note that you cannot board the train after time t =$Y$.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- First line of each testcase contains eight space separated integers $N, A, B, C, D, P, Q, Y $. 
- Second line of each testcase contains $N$ space-separated integers with the $i$-th integer representing $x_i$.

-----Output:-----
For each testcase, output in a single line containing the minimum travel time.

-----Constraints-----
- $1 \leq T \leq 300$
- $2 \leq N \leq 300$
- $-1000 \leq x_i \leq 1000$
- $0 \leq Y \leq 100000$
- $1 \leq A,B,C,D \leq n $
- $A \neq B$
- $C \neq D$
- $1 \leq P, Q \leq 100$
- $x_i < x_j$  if $i < j$

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

-----Sample Output:-----
6

-----EXPLANATION:-----
Guru can walk directly in 6 secs.
If Guru takes train, then he will need  atleast 11 secs.

```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 = 'for _ in range(int(input())) :\n n, a, b, c, d, p, q, y = map(int, input().split())\n x = list(map(int, input().split()))\n walk = (abs(x[a-1] - x[b-1])) * p\n train = (abs(x[a-1] - x[c-1])) * p\n if train <= y :\n  walk_train = y + (abs(x[d-1] - x[b-1])) * p + (abs(x[d-1] - x[c-1])) * q\n  print(min(walk, walk_train))\n else :\n  print(walk)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13369