import sys sys.setrecursionlimit(10 ** 6) def II(): return int(sys.stdin.readline()) def LF(): return list(map(float, sys.stdin.readline().split())) def main(): # 3点Q1,Q2,Q3からできる三角形を底面とし、Pを頂点とする三角すいを考える # 底面積(△Q1Q2Q3)と体積が分かれば高さ(点Pと平面Q1Q2Q3の距離)が分かる n = II() xp, yp, zp = LF() qq = [LF() for _ in range(n)] qq = [[x - xp, y - yp, z - zp] for x, y, z in qq] ans = 0 for k, (x3, y3, z3) in enumerate(qq): for j, (x2, y2, z2) in enumerate(qq[:k]): for (x1, y1, z1) in qq[:j]: # 体積(の6倍)vを求める v = abs(x1 * y2 * z3 + x2 * y3 * z1 + x3 * y1 * z2 - x3 * y2 * z1 - x2 * y1 * z3 - x1 * y3 * z2) # 底面積(の2倍)sを求める x12, y12, z12 = x2 - x1, y2 - y1, z2 - z1 x13, y13, z13 = x3 - x1, y3 - y1, z3 - z1 s = abs(x12 * y13 + y12 * z13 + z12 * x13 - y12 * x13 - z12 * y13 - x12 * z13) # h=v/sより高さhを求める ans += v / s print(ans) main()