{$APPTYPE CONSOLE}

uses
  Math;

type
  TFloat = Extended;

function IntersectArea2(x1, y1, r1, x2, y2, r2: TFloat): TFloat;
var
  d, a1, a2, b: TFloat;
begin
  if r1 < r2 then begin d := r1; r1 := r2; r2 := d; end;
  d := sqrt(sqr(x1 - x2) + sqr(y1 - y2));
  {d = a1+a2; a1^2 - a2^2 = r1^2 - r2^2 => a1-a2 = (r1^2-r2^2)/d;}
  if d + r2 <= r1 then begin
    Result := pi * sqr(r2);
  end else if r1 + r2 <= d then begin
    Result := 0.0;
  end else begin
    a1 := ((sqr(r1) - sqr(r2))/d + d) * 0.5;
    a2 := d - a1;
    b := sqrt(sqr(r1) - sqr(a1));
    Result := sqr(r1)*ArcTan2(b, a1) - a1*b;
    Result := Result + sqr(r2)*ArcTan2(b, a2) - a2*b;
  end;
end;

var
  select: array [1..100] of Boolean;
  maxArea, x0, y0, R0: TFloat;
  x, y, r: array [1..100] of TFloat;
  N: Integer;

procedure Rec(d: Integer);
var
  a: TFloat;
  i: Integer;
begin
  if d > N then begin
    a := Pi * Sqr(R0);
    for i := 1 to N do
      if select[i] then
        a := a + Pi * Sqr(r[i]) - IntersectArea2(x0, y0, R0, x[i], y[i], r[i]);
    if a > maxArea then begin
      maxArea := a;
    end;
    exit;
  end;
  select[d] := false;
  Rec(d + 1);
  for i := 1 to d - 1 do 
    if select[i] and (Sqr(x[i] - x[d]) + Sqr(y[i] - y[d]) < Sqr(r[i] + r[d])) then
      exit;
  select[d] := true;
  Rec(d + 1);
end;

var
  f: TextFile;
  i: Integer;

begin
  Read(N, x0, y0, R0);
  for i := 1 to N do
    Read(x[i], y[i], r[i]);
  maxArea := 0;
  Rec(1);
  Writeln(maxArea:0:10);
end.
