Sort:  

First for one and then the other.