var a:array[0..9] of integer; i,min,max:integer; begin for i:=0 to 9 do readln(a); min:=a[0]; for i:=0 to 9 do if(min>a) then min:=a; max:=a[0]; for i:=0 to 9 do if(max<a) then max:=a; writeln(max,' ', min); readln; end.