Sorting triangles 1