function dist(x,y:real):real;
begin
dist:=sqrt(sqr(x)+sqr(y));
end;
var
x,y,dmn,dmx,mx,my,xx,xy:real;
i:integer;
begin
read(x,y);
dmn:=dist(x,y);
dmx:=dmn;
mx:=x; xx:=x;
my:=y; xy:=y;
for i:=1 to 2 do
begin
read(x,y);
if (dmn>(dist(x,y))) then
begin
dmn:=dist(x,y);
mx:=x; my:=y;
end;
if (dmx<dist(x,y)) then
begin
dmx:=dist(x,y);
xx:=x; xy:=y;
end;
end;
writeln('cel mai apropriat puct ',mx,' ',my);
write('cel mai indepartat punct ',xx,' ',xy);
end.