import java.util.*;
import java.lang.*;
import java.io.*;
class Dot {
double x;
double y;
double z;
public Dot() {
x = 0;
y = 0;
z = 0;
}
Dot (double a, double b, double c) {
x=a;
y=b;
z=c;
}
}
class Ideone{
Scanner in
= new Scanner
(System.
in); double x, y, z, p;
double sump=0;
Dot sum = new Dot();
while (in.hasNextDouble()){
x = in.nextDouble();
y = in.nextDouble();
z = in.nextDouble();
p = in.nextDouble();
a.add(new Dot(x,y,z));
sum.x += x*p;
sum.y += y*p;
sum.z += z*p;
sump+=p;
}
sum.x/=sump;
sum.y/=sump;
sum.z/=sump;
System.
out.
println(sum.
x + " " + sum.
y + " " + sum.
z); Dot dot;
for (int i=0; i<a.size(); i++)
{
dot = (Dot)a.elementAt(i);
double l
= Math.
sqrt((dot.
x-sum.
x)*(dot.
x-sum.
x) + (dot.
y-sum.
y)*(dot.
y-sum.
y) + (dot.
z-sum.
z)*(dot.
z-sum.
z)); }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBEb3QgewoJZG91YmxlIHg7Cglkb3VibGUgeTsKCWRvdWJsZSB6OwoJcHVibGljIERvdCgpIHsKCQl4ID0gMDsKCQl5ID0gMDsKCQl6ID0gMDsKCX0KCURvdCAoZG91YmxlIGEsIGRvdWJsZSBiLCBkb3VibGUgYykgewoJCXg9YTsKCQl5PWI7CgkJej1jOwoJfQp9CmNsYXNzIElkZW9uZXsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbnsKCQlTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlWZWN0b3IgYSA9IG5ldyBWZWN0b3IoKTsKCQlkb3VibGUgeCwgeSwgeiwgcDsKCQlkb3VibGUgc3VtcD0wOwoJCURvdCBzdW0gPSBuZXcgRG90KCk7CgkJd2hpb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