var a, b, z, y: real;
begin
readln(a, b, z, y);
writeln(sqrt(z * z + y * y) + sqrt(a * a) - 3 * a * b);
writeln(sqrt(2 + sqrt(6 + sqrt(3 - sqrt(2 + sqrt(8 + sqrt(a * a + b * b + z)))))));
writeln((b * b + z * z) / (a * a - 4 * a * z) + 5 / b - sqrt(8));
end.