Const N = 7;Var A:array[0..N+1]of integer; i,j:integer;BeginFor i:= 1 to N do Read(A[i]);A[0]:=1;A[N+1]:=2;For i:= 1 to N do Begin Write(A[i],' '); if i<>j then For j:= 1 to N do if A[i]+A[j]<A[A[0]]+A[A[N+1]] then Begin A[0]:=i; A[N+1]:=j End; End;WriteLn;WriteLn(A[0], ' , ',A[N+1]);End.