#P10936. 导弹防御塔

导弹防御塔

Problem Description

Freda's castle is attacked by MM invaders.

Freda controls NN missile defense towers. Each tower has enough missiles, but it can fire only one missile at a time.

When firing a missile, it takes T1T_1 seconds for the missile to be launched from the tower. After firing, the tower that launched the missile needs T2T_2 minutes to cool down.

All missiles fly at the same constant speed VV, and they will travel along the shortest path to hit the target.

When computing the distance DistanceDistance from a defense tower to a target, you only need to consider the horizontal distance and ignore the missile's flying height.

The missile's flying time in the air is Distance/VDistance/V minutes. After the missile arrives at the target, it can destroy it immediately.

Now you are given the coordinates of the NN missile defense towers, the coordinates of the MM invaders, and T1,T2T_1, T_2, and VV.

Since Freda's friend Rainbow is about to visit the castle, you need to find the minimum number of minutes required to repel all invaders.

Input Format

The first line contains five positive integers N,M,T1,T2,VN, M, T_1, T_2, V.

The next MM lines each contain two integers, representing the coordinates of an invader.

The next NN lines each contain two integers, representing the coordinates of a defense tower.

Output Format

Output a real number, meaning the minimum number of minutes needed to hit all invaders, rounded to six decimal places. An answer is considered correct if its difference from the standard answer does not exceed 10510^{-5}.

3 3 30 20 1
0 0
0 50
50 0
50 50
0 1000
1000 0
91.500000

Hint

Constraints: 1N,M501 \le N, M \le 50, the absolute value of each coordinate does not exceed 1000010000, and T1,T2,VT_1, T_2, V are positive integers not exceeding 20002000.

Translated by ChatGPT 5