sorting X + Y
sorting X + Y O(n^4)
sortxy O(n^3) and O(n^4), fixed and tested