import java.io.*;
import java.util.*;
import java.math.*;

public class moscow_ab implements Runnable {

	final int MAXN = 100000;
	final int MAXM = 100000;
	final int MAXR = 1000000;
	final int MAXA = 360000000;
	
	private void solve() throws IOException {
		int n = in.nextInt();
		myAssert(1 <= n && n <= MAXN);
		int m = in.nextInt();
		myAssert(1 <= m && m <= MAXM);
		int[] r = new int[n];
		int[] d = new int[n];
		for (int i = 0; i < n; ++i) {
			r[i] = in.nextInt();
			d[i] = in.nextInt();
			myAssert(1 <= r[i] && r[i] <= MAXR);
			myAssert(Math.abs(d[i]) <= 1);
		}
		int[] A = new int[m];
		for (int i = 0; i < m; ++i) {
			A[i] = in.nextInt();
			myAssert(0 <= A[i] && A[i] < MAXA);
		}
		int is = in.nextInt() - 1;
		myAssert(0 <= is && is < n);
		int js = in.nextInt() - 1;
		myAssert(0 <= js && js < m);
		int it = in.nextInt() - 1;
		myAssert(0 <= it && it < n);
		int jt = in.nextInt() - 1;
		myAssert(0 <= jt && jt < m);
		
		int da = A[jt] - A[js];
		if (da < 0) {
			da += MAXA;
		}
		
		double ans = Double.POSITIVE_INFINITY;
		for (int i = 0; i < n; ++i) {
			double tans = Math.abs(r[is] - r[i]) + Math.abs(r[it] - r[i]);
			double f = Double.POSITIVE_INFINITY;
			if (d[i] >= 0) {
				f = Math.min(f, r[i] * 2 * Math.PI / MAXA * da);
			}
			if (d[i] <= 0) {
				f = Math.min(f, r[i] * 2 * Math.PI / MAXA * (MAXA - da));
			}
			if (js == jt) {
			  f = 0;
			}
			ans = Math.min(ans, tans + f);
		}
		out.println(ans);
	}

	void myAssert(boolean e) {
		if (!e) {
			throw new Error("Assertion failed");
		}
	}
	
	final String FILE_NAME = "moscow";

	SimpleScanner in;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new SimpleScanner(new FileReader(FILE_NAME + ".in"));
			out = new PrintWriter(FILE_NAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new moscow_ab()).start();
	}

	class SimpleScanner extends BufferedReader {

		private StringTokenizer st;
		private boolean eof;

		public SimpleScanner(Reader a) {
			super(a);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(readLine());
				} catch (Exception e) {
					eof = true;
					return "";
				}
			}
			return st.nextToken();
		}

		boolean seekEof() {
			String s = next();
			if ("".equals(s) && eof)
				return true;
			st = new StringTokenizer(s + " " + st.toString());
			return false;
		}

		private String cnv(String s) {
			if (s.length() == 0)
				return "0";
			return s;
		}

		int nextInt() {
			return Integer.parseInt(cnv(next()));
		}

		double nextDouble() {
			return Double.parseDouble(cnv(next()));
		}

		long nextLong() {
			return Long.parseLong(cnv(next()));
		}
	}
}