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.
from sys import stdin, stdout
from math import gcd
ans = []

for _ in range(int(stdin.readline())):
 n, a, b, c, d, p, q, y = list(map(int, stdin.readline().split()))
 nArr = list(map(int, stdin.readline().split()))
 wT = abs((nArr[b - 1] - nArr[a - 1]) * p)
 WTTT = abs((nArr[c - 1] - nArr[a - 1]) * p)
 if WTTT > y:
  ans.append(str(wT))
  continue
 tT = abs((nArr[c - 1] - nArr[d - 1]) * q)
 tTBCT = abs((nArr[d - 1] - nArr[b - 1]) * p)
 vTT = y + tT + tTBCT
 ans.append(str(wT) if wT < vTT else str(vTT))
stdout.write('\n'.join(ans))

from sys import stdin, stdout
from math import gcd
ans = []

for _ in range(int(stdin.readline())):
 n, a, b, c, d, p, q, y = list(map(int, stdin.readline().split()))
 nArr = list(map(int, stdin.readline().split()))
 wT = abs((nArr[b - 1] - nArr[a - 1]) * p)
 WTTT = abs((nArr[c - 1] - nArr[a - 1]) * p)
 if WTTT > y:
  ans.append(str(wT))
  continue
 tT = abs((nArr[c - 1] - nArr[d - 1]) * q)
 tTBCT = abs((nArr[d - 1] - nArr[b - 1]) * p)
 vTT = y + tT + tTBCT
 ans.append(str(wT) if wT < vTT else str(vTT))
stdout.write('\n'.join(ans))
