  Let $p\equiv 1 \pmod{4}$ be a prime. Write $t = \prod_{x=1}^{(p-1)/2}x$.
Since $t ^2\equiv -1 \pmod{p}$ , we can divide $\{1,2,\ldots,(p-1)/2\}$ into
$(p-1)/4$ ordered pairs so that each pair, say $<a,\tilde{a}>$ , satisfies that
$t a \equiv \pm \tilde{a} \pmod{p}.$ For any two such pairs, assume
$a<\tilde{a}, b<\tilde{b}, a<b $, then there are three possibilities for their
relative order : $a<\tilde{a} < b< \tilde{b}$ , $a< b < \tilde{a} < \tilde{b}$
, $a< b < \tilde{b}< \tilde{a}$. We show this paring is balanced in the sense
that the three cases occur with equal frequencies. Utilizing properties of this
paring we solve one problem raised by Zhi-Wei Sun concerning the sign of
permutation related to quadratic residues.
