// Автор решения: Сергей Мельников, melnikov@rain.ifmo.ru
// Вокзал не в нулевой зоне
import java.io.*;
import java.util.*;

public class railway_sm_wrong_zoneofstation {

	void myAssert(boolean b) {
		if (!b)
			throw new AssertionError();
	}

	Scanner in;
	PrintWriter out;

	public void run() throws IOException {
		in = new Scanner(new File("railway.in"));
		out = new PrintWriter(new BufferedWriter(new FileWriter("railway.out")));
		int n = in.nextInt();
		myAssert(3 <= n && n <= 50);
		int d[] = new int[n + 1];
		for (int i = 1; i < d.length; i++) {
			d[i] = in.nextInt();
			myAssert(d[i - 1] < d[i] && d[i] <= 1000);
		}
		int z[] = new int[n + 1];
		z[0] = 1;
		for (int i = 1; i < d.length; i++) {
			z[i] = in.nextInt();
			myAssert(z[i - 1] <= z[i] && z[i] <= 1000);
			myAssert(i != 1 || z[i] == 1);
		}
		int s = in.nextInt();
		myAssert(0 <= s && s <= n);
		int t = in.nextInt();
		myAssert(0 <= t && t <= n);
		int c1 = in.nextInt();
		myAssert(1 <= c1 && c1 <= 1000);
		int c2 = in.nextInt();
		myAssert(1 <= c2 && c2 <= 1000);
		int c3 = in.nextInt();
		myAssert(1 <= c3 && c3 <= 1000);
		int R = in.nextInt();
		myAssert(1 <= R && R <= 1000);
		int zoneCost = Math.max(Math.abs(z[s] - z[t]), 1) * c1;
		int D = Math.abs(d[s] - d[t]);
		int distCost = D < R ? D * c2 : D * c3;
		out.println(zoneCost);
		out.println(distCost);
		out.flush();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new railway_sm_wrong_zoneofstation().run();
	}

}
