Var a,b,i,min:longint;
m,l:array[1..10] of longint;
begin
min:=100000;
for i:=1 to 10 do
begin
read(m[i]);
if m[i]min:=m[i];
end;
for i:=1 to 10 do
begin
l[i]:=m[i]*min;
end;
for i:=1 to 10 do
write(m[i],' ');
writeln;
for i:=1 to 10 do
write(l[i],' ');
end.