Biking Duck

No attempts yetTime limit2sMemory limit256 MB

Problem

Gladstone Gander is walking through Duckburg and has to reach his date with Daisy Duck as fast as he can. If he arrives late, Donald may show up and take his place.

Duckburg recently started a free public bike program. At bike stations all over the city you take a bike, ride it to another bike station, and leave it there. So Gladstone travels in two ways: he walks, or he bikes. Biking is faster, but he takes a bike only at a station and leaves it only at a station. Walking or biking, he moves in a straight line between any two points.

Gladstone carries a map of the rectangular center of Duckburg. His current position and the meeting point with Daisy are both on this map, and the map marks every bike station inside its borders.

More bike stations exist outside the map. Gladstone has endless luck, so you may assume that the moment he walks or rides off the map, a station happens to be exactly where it suits him. Stations outside the map lie anywhere outside it, and their coordinates need not be integers.

Given the map, compute the shortest time Gladstone needs to reach Daisy.

Input

The input consists of:

  • one line with two integers vwalkv_{walk} and vbikev_{bike} (1vwalk<vbike10001 \le v_{walk} < v_{bike} \le 1000), the walking speed and the biking speed;
  • one line with four integers x1x_1, y1y_1, x2x_2, y2y_2 (106x1<x2106-10^6 \le x_1 < x_2 \le 10^6; 106y1<y2106-10^6 \le y_1 < y_2 \le 10^6), the bounding coordinates of the map of the center;
  • one line with two integers xGx_G and yGy_G, Gladstone's position;
  • one line with two integers xDx_D and yDy_D, Daisy's position;
  • one line with one integer nn (0n10000 \le n \le 1000), the number of bike stations marked on the map;
  • nn lines with two integers xstationx_{station} and ystationy_{station} each, the coordinates of one marked station.

Every given coordinate lies on the map, that is x1xx2x_1 \le x \le x_2 and y1yy2y_1 \le y \le y_2.

Output

Print one line with the shortest time Gladstone needs to reach Daisy, rounded to six digits after the decimal point. Print all six digits.