import itertools,math class Vector3: def __init__(self,x=0,y=0,z=0): self.x,self.y,self.z=x,y,z def __sub__(self,o): return Vector3(self.x-o.x,self.y-o.y,self.z-o.z) def outer_product(self,o): return Vector3(self.y*o.z-self.z*o.y,self.z*o.x-self.x*o.z,self.x*o.y-self.y*o.x) def inner_product(self,o): return self.x*o.x+self.y*o.y+self.z*o.z def norm(self): return math.sqrt(self.x**2+self.y**2+self.z**2) def g(): return Vector3(*map(float,raw_input().split())) n=input() P=g() l=[g()-P for _ in range(n)] ans=0 for a,b,c in itertools.combinations(l,3): t=(b-a).outer_product(c-a) ans+=abs(a.inner_product(t))/t.norm() print(ans)