Count Number of Trapezoids II

Given distinct points points[i] = [x, y], count convex quadrilaterals having at least one pair of parallel opposite sides. Parallelograms count once. Use exact normalized direction and midpoint keys, not floating-point slopes.

Examples
Input: [0,0,4,0,3,2,1,2]
Output: 1
Hints

Count Number of Trapezoids II

Given distinct points `points[i] = [x, y]`, count convex quadrilaterals having at least one pair of parallel opposite sides. Parallelograms count once. Use exact normalized direction and midpoint keys, not floating-point slopes.