#include using namespace std; int main() { int N; double Px, Py, Pz; cin >> N >> Px >> Py >> Pz; struct Point { double x, y, z; }; vector V(N); for (int i = 0; i < N; i++) { double x, y, z; cin >> x >> y >> z; x -= Px; y -= Py; z -= Pz; V[i] = {x, y, z}; } auto d = [](const Point A, const Point B) { return sqrt(pow(A.x - B.x, 2) + pow(A.y - B.y, 2) + pow(A.z - B.z, 2)); }; auto solve = [&](int i, int j, int k) { auto &A = V[i], &B = V[j], &C = V[k]; double s = (d(A, B) + d(B, C) + d(C, A)) / 2; double area = sqrt(s * (s - d(A, B)) * (s - d(B, C)) * (s - d(C, A))); double vol = A.x * B.y * C.z + A.y * B.z * C.x + A.z * B.x * C.y - A.z * B.y * C.x - A.y * B.x * C.z - A.x * B.z * C.y; vol /= 2; return abs(vol / area); }; double ans = 0; for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { for (int k = j + 1; k < N; k++) { ans += solve(i, j, k); } } } cout << fixed << setprecision(10) << ans << endl; }