Var
a, b, c, d, sr: real;
begin
read(a, b, c, d);
sr := (a + b + c + d) / 4;
if (a < b) and (b < c) and (c < d) then
begin
a := d;
b := d;
c := d;
end
else if (a > b) and (b > c) and (c > d) then
begin
a := sr;
b := sr;
c := sr;
d := sr;
end
else
begin
a := a * a;
b := b * b;
c := c * c;
d := d * d;
end;
write(a, ' ', b, ' ', c, ' ', d);
end.