Sort the output according to the points