C. Counting Stars
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

A constellation is a group of stars that form a recognizable pattern in the night sky. Legendary Huron, who is an amateur astronomer, wants to identify its own constellation: a spoke constellation.

Legendary Huron identified a region in the celestial sphere where no star belong to any recognized constellation. After taking a photography of this region of the sky, he identified $$$n$$$ stars and assigned them coordinates $$$(x,y)$$$. He defines a spoke constellation as a group of $$$mk+1$$$ stars ($$$0 \leq m,k$$$) in this photography that meets the following properties:

  • There is a star $$$C$$$ in the group called the central star.
  • Let $$$d_1, d_2, \dots, d_k$$$ be the list of different euclidean distances between $$$C$$$ and the rest of stars in the group such that $$$d_1 \lt d_2 \lt \dots \lt d_k$$$. There are exactly $$$m$$$ stars in the group that are at distance $$$d_i$$$ to $$$C$$$ (for $$$1 \leq i \leq k$$$). Recall that the euclidean distance between two points with coordinates $$$(x_1,y_1)$$$ and $$$(x_2,y_2)$$$, respectively, is equal to $$$\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$$$.
  • Let $$$p_{i,1}, p_{i,2}, \dots, p_{i,m}$$$ be the list of stars in the group that are at distance $$$d_i$$$ to $$$C$$$. There are exactly $$$i+1$$$ stars in the segment between $$$p_{i,j}$$$ and $$$C$$$ (including $$$p_{i,j}$$$ and $$$C$$$) for all $$$1 \leq i \leq k$$$ and $$$1 \leq j \leq m$$$.
  • All the stars in the segment between $$$p_{i,j}$$$ and $$$C$$$ are included in the group for all $$$1 \leq i \leq k$$$ and $$$1 \leq j \leq m$$$.

Help Legendary Huron to count the number of groups that can form a spoke constellation. Two groups of stars are considered different if the central star is different in the two groups or if there is an star that is included in one group but not in the other.

Input

The first line contains a single ineteger $$$n$$$ ($$$1 \leq n \leq 1000$$$).

Each following $$$n$$$ lines contains two integers $$$x$$$ and $$$y$$$ ($$$-10^9 \leq x,y \leq 10^9$$$) $$$-$$$ the coordinates of the stars.

It is guaranteed that all points are different.

Output

Print the number of groups of stars that forms a spoke constellation modulo $$$998244353$$$.

Examples
Input
2
0 0
1 1
Output
4
Input
6
2 0
0 0
0 2
1 0
-2 0
0 -2
Output
46
Input
9
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2
Output
139