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

public class theater_aa implements Runnable {

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

	BufferedReader br;

	StringTokenizer st;

	PrintWriter out;

	boolean eof = false;

	Random rand = new Random(this.hashCode());

	public void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

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

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	String FNAME = "theater";

	private void solve() throws IOException {
		int l = nextInt();
		int w = nextInt();
		int v1 = nextInt();
		int v2 = nextInt();
		int n = nextInt();
		p = new Point[n];
		for (int i = 0; i < p.length; i++) {
			p[i] = new Point(nextInt(), nextInt());
		}
		double[][][] a = new double[2][2][1 << n];
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				Arrays.fill(a[i][j], Double.POSITIVE_INFINITY);
			}
		}
		double[][] b = new double[n][1 << n];
		for (int x1 = 0; x1 < a.length; x1++) {
			for (int x2 = 0; x2 < a[x1].length; x2++) {
				a[x1][x2][0] = x1 == x2 ? 0 : w;
				for (int i = 0; i < b.length; i++) {
					Arrays.fill(b[i], Double.POSITIVE_INFINITY);
				}
				for (int i = 0; i < b.length; i++) {
					b[i][1 << i] = x1 == 0 ? p[i].x : w - p[i].x;
				}
				for (int j = 0; j < b[0].length; j++) {
					for (int i = 0; i < b.length; i++) {
						if ((j & (1 << i)) != 0) {
							relax(b, i, j);
							a[x1][x2][j] = Math.min(a[x1][x2][j], b[i][j]
									+ (x2 == 0 ? p[i].x : w - p[i].x));
						}
					}
				}
			}
		}
		int m = nextInt();
		double[][][] c = new double[m][2][2];
		for (int i = 0; i < c.length; i++) {
			for (int j = 0; j < c[i].length; j++) {
				Arrays.fill(c[i][j], Double.POSITIVE_INFINITY);
			}
		}
		int pref = 0;
		for (int i = 0; i < m; i++) {
			int k = nextInt();
			int prof = 0;
			for (int j = 0; j < k; j++) {
				int x = nextInt() - 1;
				prof |= 1 << x;
			}
			int pr1 = (prof ^ pref) & prof;
			int pr2 = (prof ^ pref) & pref;
			if (i > 0) {
				for (int j = 0; j < c[i].length; j++) {
					for (int q = 0; q < c[i][j].length; q++) {
						for (int j1 = 0; j1 < c[i].length; j1++) {
							for (int q1 = 0; q1 < c[i][j].length; q1++) {
								c[i][j][q] = Math.min(c[i][j][q],
										c[i - 1][j1][q1]
												+ Math.max(a[j1][j][pr1] / v1,
														a[q1][q][pr2] / v2));
							}
						}
					}
				}
			} else {
				c[0][0][1] = 0;
			}
			pref = prof;
		}
		double ans = Double.POSITIVE_INFINITY;
		for (int i = 0; i < c[m - 1].length; i++) {
			for (int j = 0; j < c[m - 1][i].length; j++) {
				ans = Math.min(ans, c[m - 1][i][j]);
			}
		}
		out.println(ans);
	}

	private void relax(double[][] b, int k, int k2) {
		int pr = k2 ^ (1 << k);
		for (int i = 0; i < b.length; i++) {
			if ((pr & (1 << i)) != 0) {
				b[k][k2] = Math.min(b[k][k2], b[i][pr] + p[i].distTo(p[k]));
			}
		}
	}

	Point[] p;

	class Point {
		public Point(int i, int j) {
			x = i;
			y = j;
		}

		public double distTo(Point p) {
			return Math.sqrt((p.x - x) * (p.x - x) + (p.y - y) * (p.y - y));
		}

		int x, y;
	}

}
