uses crt;
var a,b,c,ln,nn:integer;
tbc:real;
begin
clrscr;
readln(a,b,c);
ln:=a;
if ln<b then ln:=b;
if ln<c then ln:=c;
nn:=a;
if nn>b then nn:=b;
if nn>c then nn:=c;
writeln(ln);
writeln(nn);
tbc:=(a+b+c)/3;
if a>tbc then write(a,' ');
if b>tbc then write(b,' ');
if c>tbc then write(c,' ');
writeln;
if a=tbc then write(a,' ');
if b=tbc then write(b,' ');
if c=tbc then write(c,' ');
readln;
end.