var a:integer;
begin
readln (a);
if a div 10 = a mod 10 then
begin
writeln (a);
writeln (0)
end else
if a div 10 > a mod 10 then
begin
writeln (a div 10,a div 10);
writeln ((a div 10 + a div 10*10)-a)
end else
begin
writeln (a mod 10,a mod 10);
writeln ((a mod 10 + a mod 10*10)-a);
end
end.