sort input point data