var
v,s,h,a:extended;
begin
read(a,h);
v:=1/3*a^2*h;
s:=(a^2)+(sqrt((a^2/4)+h^2)*a/2*4);
write(s,v);
end.
var
v,s,h,a:extended;
begin
read(a,h);
v:=1/3*a^2*h;
s:=(a^2)+(sqrt((a^2/4)+h^2)*a/2*4);
write(s,v);
end.
var
v,s,h,a:extended;
begin
read(a,h);
v:=1/3*a^2*h;
s:=(a^2)+(sqrt((a^2/4)+h^2)*a/2*4);
write(s,v);
end.