Comparable pairs
Sorting and tie-breaking