Bessie draws some segments between the points as follows.
Bessie notices that for each ii, she drew exactly three new segments. Compute the number of permutations Bessie could have chosen on step 1 that would satisfy this property, modulo 109+7.
Followed by N lines, each containing two space-separated integers xi and yi.
5
0 0
0 4
4 0
1 1
1 2
96
One permutation that satisfies the property is (0,0),(0,4),(4,0),(1,2),(1,1). For this permutation,
Diagram:
The permutation does not satisfy the property if its first four points are (0,0), (1,1), (1,2), and (0,4) in some order.