I think, if you sort, say 35 and 40, it will be correct but, if you sort 350 and 40, or 3500 and 40, it won't. Simply because 3 is less than 4. That's why it is "random" ... some number pairs will be right, others won't.