Codeforces Round 219 (Div. 1)
E
Drawing Circles is Fun
Codeforces
3000
原题
← D→
翻译中…

There are a set of points $*S*$ on the plane. This set doesn't contain the origin $*O*(0, 0)$, and for each two distinct points in the set $*A*$ and $*B*$, the triangle $*OAB*$ has strictly positive area.

翻译中…

Consider a set of pairs of points $(*P*_{1}, *P*_{2}), (*P*_{3}, *P*_{4}), ..., (*P*_{2*k* - 1}, *P*_{2*k*})$. We'll call the set good if and only if:

翻译中…
  • $*k* ≥ 2$.
  • All $*P*_{*i*}$ are distinct, and each $*P*_{*i*}$ is an element of $*S*$.
  • For any two pairs $(*P*_{2*i* - 1}, *P*_{2*i*})$ and $(*P*_{2*j* - 1}, *P*_{2*j*})$, the circumcircles of triangles $*OP*_{2*i* - 1}*P*_{2*j* - 1}$ and $*OP*_{2*i*}*P*_{2*j*}$ have a single common point, and the circumcircle of triangles $*OP*_{2*i* - 1}*P*_{2*j*}$ and $*OP*_{2*i*}*P*_{2*j* - 1}$ have a single common point.
翻译中…

Calculate the number of good sets of pairs modulo $1000000007$ $(10^{9} + 7)$.

翻译中…

Input

翻译中…

The first line contains a single integer $*n*$ $(1 ≤ *n* ≤ 1000)$ — the number of points in $*S*$. Each of the next $*n*$ lines contains four integers $*a*_{*i*}, *b*_{*i*}, *c*_{*i*}, *d*_{*i*}$ $(0 ≤ |*a*_{*i*}|, |*c*_{*i*}| ≤ 50; 1 ≤ *b*_{*i*}, *d*_{*i*} ≤ 50; (*a*_{*i*}, *c*_{*i*}) ≠ (0, 0))$. These integers represent a point image.

翻译中…

No two points coincide.

翻译中…

Output

翻译中…

Print a single integer — the answer to the problem modulo $1000000007$ $(10^{9} + 7)$.

翻译中…

样例

Input #1
10
-46 46 0 36
0 20 -24 48
-50 50 -49 49
-20 50 8 40
-15 30 14 28
4 10 -4 5
6 15 8 10
-20 50 -3 15
4 34 -16 34
16 34 2 17
Output #1
2
InputCopy OutputCopy
Input #2
10
30 30 -26 26
0 15 -36 36
-28 28 -34 34
10 10 0 4
-8 20 40 50
9 45 12 30
6 15 7 35
36 45 -8 20
-16 34 -4 34
4 34 8 17
Output #2
4
InputCopy OutputCopy
Input #3
10
0 20 38 38
-30 30 -13 13
-11 11 16 16
30 30 0 37
6 30 -4 10
6 15 12 15
-4 5 -10 25
-16 20 4 10
8 17 -2 17
16 34 2 17
Output #3
10
InputCopy OutputCopy
题目信息
题号
372E
时间限制
3 s
内存限制
256 MB
标签
组合数学
计算几何

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。