Solution (source code)

= Solution

A <permutation> preserves whether the two coordinates are equal. Consequently the diagonal and its complement are invariant under this <group action>. Any $(i,i)$ can be carried to any $(j,j)$ by a <permutation> sending $i$ to $j$. Likewise, for $i\ne j$ and $k\ne l$, the assignment $i\mapsto k$, $j\mapsto l$ extends to a <permutation> of the remaining letters.

For $n\geq2$ the <equality-pattern orbits of ordered pairs> are the two <orbits of a group action> are therefore
$$
\boxed{\{(i,i):1\leq i\leq n\},\qquad\{(i,j):i\ne j\},}
$$
with sizes $n$ and $n(n-1)$. For $n=1$ only the diagonal <orbit of a group action> exists.