Prime Cut


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 yy-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 xix_i such that the line x=xix = x_i 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, xix_i and yiy_i, representing the coordinates of one point of the triangle.

Output

Output one number, xix_i, representing the xx-value such that the line x=xix = x_i bisect the triangle.

Answers within 10−310^{-3} of the correct answer will be accepted.

Constraints

  • −108≤xi,yi≤108-10^8 \le x_i, y_i \le 10^8
  • Points are distinct.
  • The points are guaranteed to be non-collinear (triangle has positive area).

Examples

Input 1
0 0
1 1
0 1
Output 1
0.2928924560546875

Cutting the triangle at x=0.293x = 0.293 will divide the triangle in sides of area 0.25.

Input 2
-3 4
2 1
7 2
Output 2
2.0

Cutting the triangle at x=2x = 2 will divide the triangle into equal halves.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.