QOJ.ac

QOJ

حد الوقت: 5 s حد الذاكرة: 256 MB مجموع النقاط: 100

#6578. Triangles

الإحصائيات

There are $n$ points given on a plane. We are interested in the number of right-angled triangles whose vertices are among the given points and whose area belongs to the interval $[A, B]$.

Input

The first line contains three integers $n, A, B$ ($1 \le n \le 2000$, $1 \le A \le B \le 10^{18}$). The next $n$ lines describe the individual points. The $i$-th of these lines contains two integers $x_i, y_i$ ($-10^9 \le x_i, y_i \le 10^9$), which are the coordinates of the $i$-th point. The points provided in the input are distinct.

Output

The only line of output should contain the number of right-angled triangles with vertices at the given points and an area in the interval $[A, B]$.

Examples

Input 1

7 5 25
0 0
2 0
0 2
10 0
0 10
3 3
3 -3

Output 1

3

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.