To win a game of Super Mario Party Jamboree™, Mario and Luigi must separate a steak into 2 pieces of equal area using one straight cut. But alas, the dastardly Bowser has interfered with the game! The wicked turtle has mangled the steak so that it is triangular. In addition, this mangled steak can only be cut in vertical lines perpendicular to the -axis. Can you find where the plumber brothers must make their cut to bisect the steak?
Specifically, you are given the coordinates of the steak in cartesian form. You must find the value of such that the line
bisects the triangle into 2 pieces of equal area.
Input
3 lines of input are given, each representing one point of the triangle.
Each contains 2 integers, and
, representing the coordinates of one point of the triangle.
Output
Output one number, , representing the
-value such that the line
bisect the triangle.
Answers within of the correct answer will be accepted.
Constraints
- Points are distinct.
- The points are guaranteed to be non-collinear (triangle has positive area).
Examples
Input
0 0
1 1
0 1
Output
0.2928924560546875
Cutting the triangle at will divide the triangle in sides of area 0.25.
Input
-3 4
2 1
7 2
Output
2.0
Cutting the triangle at will divide the triangle into equal halves.
Comments