I. Drunk Coworker
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You enter into the office only to be greeted by your drunk coworker, Thomas Crapper!

You try to avoid him as he stumbles across the room. His path can roughly be approximated by a quadratic function $$$f$$$ on the Cartesian Coordinate system. Since he is drunk, his eyesight is blurry, so at any point he can only see $$$k$$$ meters above and below him. To avoid a potential disaster, please find the total area of all the regions you can stand in order to not be spotted by your drunk coworker.

Input

The first line contains a sequence of three real numbers $$$a_2, a_1, a_0$$$ ($$$-100000 \leq a_2, a_1, a_0 \leq 100000$$$), the coefficients of the polynomial $$$f = a_2x^2 + a_1x + a_0$$$.

The second line contains a positive real number $$$k$$$ ($$$0 \leq k \leq 100$$$), the radius of his line of sight.

The last line contains four real numbers $$$x_1, y_1, x_2, y_2$$$ ($$$-100000 \leq x_1,y_1,x_2,y_2 \leq 100000$$$) for $$$x_1 \lt x_2$$$, $$$y_1 \lt y_2$$$, where $$$(x_1,y_1)$$$ and $$$(x_2,y_2)$$$ indicate the coordinates of the lower left-hand corner and upper right-hand corner of the room respectively.

Output

Output a real number that is the total area you can stand as to not be spotted by your drunk coworker.

Your answer is considered correct if its absolute error doesn't exceed $$$10^{−6}$$$.

Example
Input
1 1 -2
3
-4 -5 1 1
Output
11.666666666666668
Note

You can assume that Thomas completely enters and exits from some part of the room.