We can not choose pairs from these as they have same x coordinatethus they will result line segment parallel to y axis
total -= ( c * ( c - 1 ) ) // 2 ; NEW_LINE for i in y_axis : NEW_LINE c = y_axis [ i ] ; NEW_LINE