Problem E
Rectangle Area
Given diagonal corners of a rectangle with sides parallel to the $X$ and $Y$ axes, compute the area of the rectangle.
Input
The single line of input contains four real numbers $x1$, $y1$, $x2$ and $y2$ ($|x1|,|y1|,|x2|,|y2| \le 100.0$), where $(x1,y1)$ and $(x2,y2)$ are diagonal corners of a rectangle with sides parallel to the $X$ and $Y$ axes. The rectangle is guaranteed to have an area greater than $0.01$.
Output
Output a single line with a single real number, which is the area of the given rectangle. This number must be accurate to within $10^{-2}$ absolute or relative error.
Sample Input 1 | Sample Output 1 |
---|---|
0.0 0.0 3.0 4.0 |
12.000 |
Sample Input 2 | Sample Output 2 |
---|---|
5.2 -4.64 -3.47 2.2 |
59.303 |