eolymp
bolt
Try our new interface for solving problems
Problems

Rectangle and the beam

Rectangle and the beam

Rectangle with sides parallel to coordinate axes, given the coordinates of two opposite vertices (x1, y1) and (x2, y2). Ray from the origin, given the angle α, which he makes with the positive direction of the x-axis.

Required to calculate the area of the rectangle that lies inside the angle formed by the ray and the positive direction of the y-axis.

Input

The input file contains the real numbers x1 y1 x2 y2 α. The angle is measured counter-clockwise and is measured in degrees.

All the coordinates do not exceed $10^5$. Angle in the range from 0 to 360°.

Output

The output file should contain a single real number - the desired area. Reply to withdraw to within 1 digit after the decimal point.

Time limit 1 second
Memory limit 64 MiB
Input example #1
0.0 0.0 50.0 50.0 45.0
Output example #1
1250.0