Time Limit : 5 Second

Memory Limit : 128 MB

Submission: 239

Solved: 38

Description
Given two balls in 3D space, you are asked to calculate the volume of their union, ie the total volume.

Input
There multiple cases:



Each case contains two lines:

1st-line: x1, y1, z1, r1

2nd-line: x2, y2, z2, r2

Each line specifies the coordinate and the radius of a ball.



The input file termitates with EOF.

All the data in the input are integers in [-20, 20].

Output
A single number: the volume of the union with a precision of 3 numbers after the decimal point.

sample input
0 0 0 1

0 0 2 1
sample output
8.378

hint
source
Isun
© 2015 HUST ACMICPC TEAM. All Right Reserved.