program MyPrg;
var x, y: integer;
begin
readln(x);
readln(y);
if x < y then
writeln(x);
writeln(y);
end
else
end;
end.
program MyPrg;
var x, y: integer;
begin
readln(x);
readln(y);
if x < y then
begin
writeln(x);
writeln(y);
end
else
begin
writeln(y);
writeln(x);
end;
end.