#icpc2013summerwarmingUpg. [icpc2013summer_warmingUp_g]Moving Points
[icpc2013summer_warmingUp_g]Moving Points
Description
You are given points in the -plane. Each point is in a state of linear uniform motion.
Your task is to calculate the distance to the furthest point in Manhattan distance from the origin at time .
Input
The first line of the input file contains the integers and (), separated by a space.
The next lines describe the points. Each contains four real numbers , , and (). This shows the initial coordinates and velocity .
The next lines describe the queries. Each line contains one real number ().
Output
For each query, output the maximal Manhattan distance in one line.
The value which is accurate to within a relative or absolute value of 1E-9 will be accepted.
Sample Input
2 2
0 0 1 0
1 0 -1 0
0
1
Sample Output
1.0000000000
1.0000000000
Sample Input
3 3
0 0 1 1
0 1 1 0
3 3 -2 -1
0
1
2
Sample Output
6.0000000000
3.0000000000
4.0000000000
Sample Input
3 3
1 1 0.5 0
0 2 1.5 -1
1.5 0 0 1
0
1
2
Sample Output
2.0000000000
2.5000000000
3.5000000000