import math N=int(raw_input()) P=map(float,raw_input().split()) points=[map(float,raw_input().split()) for i in range(N)] ans=0 for i in range(N): for j in range(i+1,N): for k in range(j+1,N): a=(points[j][1]-points[i][1])*(points[k][2]-points[i][2])-(points[k][1]-points[i][1])*(points[j][2]-points[i][2]) b=(points[j][2]-points[i][2])*(points[k][0]-points[i][0])-(points[k][2]-points[i][2])*(points[j][0]-points[i][0]) c=(points[j][0]-points[i][0])*(points[k][1]-points[i][1])-(points[k][0]-points[i][0])*(points[j][1]-points[i][1]) d=-(a*points[i][0]+b*points[i][1]+c*points[i][2]) ans+=abs(a*P[0]+b*P[1]+c*P[2]+d)/math.sqrt(a*a+b*b+c*c) print "%.15f" % ans