// Задача "Театр"
// XVI командный чемпионат школьников Санкт-Петербурга по программированию
// Автор задачи: Олег Давыдов
// Автор решения: Олег Давыдов, burunduk3@gmail.com

uses math;

const
  maxn = 15;
  maxm = 10000;
  maxp = 32800;
  inf = 1e100;

var
  n, m, v1, v2, rx, ry, i, j, p, k, t, b1, b2, p1, p2, t1, t2: longint;
  ans: extended;
  x, y: array[1..maxn] of longint;
  a: array[1..maxm, 1..maxn] of longint;
  r: array[1..2, 1..2, 0..maxp] of extended;
  d1: array[0..maxp, 1..maxn] of extended;
  d2: array[0..maxm, 1..2, 1..2] of extended;

begin
  assign(input, 'theater.in');
  reset(input);
  assign(output, 'theater.out');
  rewrite(output);

  fillchar(x, sizeof(x), 0);
  fillchar(y, sizeof(y), 0);
  fillchar(a, sizeof(a), 0);

  read(ry, rx, v1, v2, n);
  for i := 1 to n do
    read(x[i], y[i]);
  read(m);
  for i := 1 to m do
  begin
    read(k);
    for j := 1 to k do
    begin
      read(t);
      a[i, t] := 1;
    end;
  end;

  for b1 := 1 to 2 do
  begin
    for i := 0 to (1 shl n) - 1 do
      for j := 1 to n do
        d1[i, j] := inf;
    for i := 1 to n do
      if b1 = 1 then
        d1[1 shl (i - 1), i] := x[i]
      else
        d1[1 shl (i - 1), i] := rx - x[i];
    for p := 0 to (1 shl n) - 1 do
      for i := 1 to n do
        for j := 1 to n do
          if ((p and (1 shl (i - 1))) <> 0) and ((p and (1 shl (j - 1))) = 0) then
            d1[p or (1 shl (j - 1)), j] := min(d1[p or (1 shl (j - 1)), j],
                                               d1[p, i] + sqrt(sqr(x[i] - x[j]) + sqr(y[i] - y[j])));
    for b2 := 1 to 2 do
    begin
      for p := 0 to (1 shl n) - 1 do
        r[b1, b2, p] := inf;
      if b1 = b2 then
        r[b1, b2, 0] := 0
      else
        r[b1, b2, 0] := rx;
      for p := 0 to (1 shl n) - 1 do
        for i := 1 to n do
          if (p and (1 shl (i - 1))) <> 0 then
            if b2 = 1 then
              r[b1, b2, p] := min(r[b1, b2, p], d1[p, i] + x[i])
            else
              r[b1, b2, p] := min(r[b1, b2, p], d1[p, i] + rx - x[i]);
    end;
  end;

  for i := 1 to m do
    for b1 := 1 to 2 do
      for b2 := 1 to 2 do
        d2[i, b1, b2] := inf;

  d2[1, 1, 2] := 0.0;
  for i := 1 to m - 1 do
  begin
    p1 := 0;
    p2 := 0;
    for j := 1 to n do
      if (a[i][j] = 0) and (a[i + 1][j] <> 0) then
        p1 := p1 or (1 shl (j - 1))
      else if (a[i + 1][j] = 0) and (a[i][j] <> 0) then
        p2 := p2 or (1 shl (j - 1));
    for b1 := 1 to 2 do
      for b2 := 1 to 2 do
        for t1 := 1 to 2 do
          for t2 := 1 to 2 do
            d2[i + 1, t1, t2] := min(d2[i + 1, t1, t2], d2[i, b1, b2] + max(r[b1, t1, p1] / v1, r[b2, t2, p2] / v2));
  end;

  ans := inf;
  for b1 := 1 to 2 do
    for b2 := 1 to 2 do
      ans := min(ans, d2[m, b1, b2]);

  writeln(ans:0:15);

  close(input);
  close(output);
end.
