Order points

Hi all
The points that are in the list shown below I get interspersed, ie two points of an armor, the other two points of another armor and so goes; what I want to do is to order all the points that have the same coordinate ‘y1’ in the first indexes, those that have ‘y2’ in the following indexes and so on. How could I get that?
Thank you

you can sort them with sort list ! i think you dont have to flatten, if you upload the file would be easier to look at them !