If the $\forall\ i,j$ has a $ (a_i-a_j) (B_i-b_j) \geq 0$, then $a _i,b_i$ is called quasi-sequential. If the constant has the opposite inequality, it is called the inverse order. Test: $a _i,b_i$ $$\bex \sum_{i=1}^n a_i\cdot \sum_{i=1}^n b_i\leq n \sum_{i=1}^n a_ib_i, \eex$$ $a _i,b_i$ reverse order inequality inverse number. equals sign if and only if $a _1=\cdots=a_n$ or $b _1=\cdots =b_n$. (Chebyshev)
Solution: $a _i,b_i$, $$\bex 0\leq \sum_{i,j=1}^n (A_i-a_j) (b_i-b_j) =2\sex{n \sum_{i=1}^n a_ib_i-\sum_{i=1}^n A_i\cdot \sum _{i=1}^n B_i}. \eex$$ the necessary conditions for the establishment of a proof equation. If the equals sign is established, it may be possible to set $a _1\leq \cdots \leq a_n$ (if $a _i>a_j$, you can exchange two pairs $a _i,a_j$; $b _i,b_j$ position). And by the quasi-order, $b _1\leq \cdots\leq b_n$. According to the above proof, $$\beex \bea \mbox{equals established}&\LRA \sex{\forall\ i\neq j,\ a_i=a_j\mbox{or}b_i=b_j}\\ &\ra a_1=a_n\mbox{or}b_1 =b_n\\ &\ra a_1=\cdots=a_n\mbox{or}b_1=\cdots=b_n. \eea \eeex$$
[Typical problems and methods in mathematical analysis of Periven exercises reference Solutions]4.4.10