## Solution

Simple Greedy. Pair the points who have smaller absolute value as soon as we can.

We have prove below：

Let's see if there are 4 points：(x,0), (x+a,0), (0,y), (0,y+b). Both x, y, a and b equal or bigger than 0. It's not hard to prove that, [(x,0),(0,y)] [(x+a,0),(0,y+b)] is lesser than [(x+a,0),(0,y)] [(x,0),(0,y+b)]

So for any combination which is not the best solution, we can do the things blow：select two points. So we can see if these two points can be change with the result before. Then if we continuously do this, then we will get the best solution.

Rather than get a random combination and use $n^2$ way to get best solution. We can sort the points by absolute value first.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}