Prime Cut 4


Waahahaha, I'm a Wario!

I need your help to win a game. I have steak that is in the shape of a rectangular prism with an arbitrary position, rotation and scale. I want to cut the steak into 22 pieces with a flat cut such that the volume of the pieces are equal. But, the Laser-cutter-30003000 I got Penny to make cannot rotate, and always cuts the steak on the YZ plane.

I can define an xix_i value for the laser cutter such that the steak is cut by the plane x=xix = x_i.

Can you find the value of xix_i such that the plane x=xix = x_i will bisect the steak?

Input

There are 88 lines, one for each vertex of the steak.

Each line has 33 integers, xyzx y z, giving the 33-dimensional coordinate of the vertex.

It is guaranteed these 88 coordinates form the vertices of a rectangular prism.

Output

Give me the x-value of the plane that divides the steak in 22. Answers with a relative or absolute error less than 10310^{-3} will be accepted.

Constraints

  • 104x,y,z104-10^4 \le x, y, z \le 10^4

Example 1

Input 1
0 0 0
0 0 1
0 1 0
1 0 0
0 1 1
1 0 1
1 1 0
1 1 1
Output 1
0.5

Here is a diagram of the prism and the plane that bisects it.

Example 2

Input 2
0 4 0
3 0 0
3 0 6
7 3 6
7 3 0
4 7 0
0 4 6
4 7 6
Output 2
3.5

Here is a diagram of the rotated prism and the plane that bisects it.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.