Permutation

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Bessie has NN (3N403\le N\le 40) favorite distinct points on a 2D grid, no three of which are collinear. For each 1iN1\le i\le N, the ii-th point is denoted by two integers x_ix\_i and y_iy\_i (0x_i,y_i1040\le x\_i,y\_i\le 10^4).

Bessie draws some segments between the points as follows.

  1. She chooses some permutation p_1,p_2,,p_Np\_1,p\_2,\ldots,p\_N of the NN points.
  2. She draws segments between p_1p\_1 and p_2p\_2, p_2p\_2 and p_3p\_3, and p_3p\_3 and p_1p\_1.
  3. Then for each integer ii from 44 to NN in order, she draws a line segment from p_ip\_i to p_jp\_j for all j\<ij\<i such that the segment does not intersect any previously drawn segments (aside from at endpoints).

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+710^9+7.

입력

The first line contains NN.

Followed by NN lines, each containing two space-separated integers x_ix\_i and y_iy\_i.

출력

The number of permutations modulo 109+710^9+7.