Suppose we have two sets of data, $X$ and $Y$, each of which contains $10$ positive numbers. Now let us order the data sets $$X=\left\{ x_{1},\cdots,x_{10}\right\},\quad x_{1}\ge\cdots\ge x_{10}>0$$ and $$Y=\left\{ y_{1},\cdots,y_{10}\right\},\quad y_{1}\ge\cdots\ge y_{10}>0$$ and define $d:=\sum_{k=1}^{10}\left|x_{i_{k}}-y_{j_{k}}\right|$, that is the sum of the distances of the numbers in pairs from the two data sets.
How to prove that $d$ achieves its minimum when $i_{k}=j_{k}=k$ for $1\le k\le10$, or is there any counter example if it is not true?