How to order numbers

Store a struct of 2 integers instead of a string, and during comparison if the first members (X) are equal, then compare the Y members, and prioritize the smaller one.