3.
uses crt;
var x,y:integer;
begin
read(x,y);
if x>y then
begin
x:=x+y;
y:=y*3
end
else
begin
y:=x+y;
x:=x*3
end;
writeln(x,' ',y);
end.
4.
uses crt;
var p1,p2,p3,x1,y1,x2,y2,x3,y3,a3,b3,c3:real;
begin
writeln('Введите P1,x1,y1,x2,y2,x3,y3,a3,b3,c3:');
read(p1,x1,y1,x2,y2,x3,y3,a3,b3,c3);
p2:=(sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) ) ) + (sqrt( (x3-x2)*(x3-x2) + (y3-y2)*(y3-y2) ) ) + (sqrt( (x3-x1)*(x3-x1) + (y3-y1)*(y3-y1) ) );
p3:=a3+b3+c3;
writeln(min(min(p1,p2),p3));
end.