Sphere

Have you watched the science fiction movie “Sphere”? In this movie there is an sphere from outer space which enables a man to convert his night-mares into reality. That is if you dream that you are being attacked by lion, in reality your surrounding people will be attacked by lion. The problem is that the alien people who sent the Sphere are now in earth. They have made an artificial island to stay which is surrounded by unknown poisonous liquid. The scientists of earth have failed to determine the chemical structure of this liquid but has succeeded to determine one of its physical properties, the specific gravity (S. G.). This S. G. of liquid changes with time. So our scientists measure the S. G. every hour. The aliens dont attack us. What they do is very simple, they just release paired-spheres on the poisonous stream of liquid and these paired spheres float towards human civilization and then materializes our night mares. As these are paired spheres their destructive power is twice of the previous sphere. The aliens are not good in physics and maths. So some of the paired spheres created by them sinks in the poisonous liquid. As our scientists are very good in physics we can determine the weight of the spheres but sadly they are very week in mathematics. So they ask your help to determine the volume and surface area of the paired sphere and also asks you to determine whether it will float in the liquid or sink. You can be sure that the input values and output specification will be such that you will not have to think about precisions in case of sink and float. Consider π = 2 ∗ arccos(0); Fig: A Paired Sphere (Though the image looks like two circles actually they are two balls) Input Fig: A diagram of the given scenario First line of the input file will be an integer N which indicates how many sets of inputs are there. The next N lines will contain N sets of input. Each set (or lines) contain five integers R1 (0 < R1 ≤ 500) and R2 (0 < R2 ≤ 500) (The radius of the two spheres of the paired sphere in centimeter), d (The distance between the centers of the two spheres in centimeter and d > max(R1, R2) and d < (R1 +R2)), W the weight of the sphere (W < 10000000000) in grams and S (0 < S < 10) the specific gravity of the poisonous liquid. Output For each set of input there will be two lines of output. The first line will be the volume of the sphere and the surface area of the sphere (four digits after the decimal point) and the second line will be any of the two according to the situation ‘The Paired-Sphere Sinks.’ or ‘The Paired-Sphere Floats.’

2/2 Sample Input 2 10 10 15 300 1.0 20 20 30 650000 1.0 Sample Output 8017.6063 2199.1149 The Paired-Sphere Floats. 64140.8500 8796.4594 The Paired-Sphere Sinks.