Sort the input by the fourth character of the first field and the fourth character of the second field, separated by a colon, and output only the first two fields.
sort -t: -k1.4n -k2.4n /dev/stdin  | cut -d: -f1,2