405561: GYM101992 I A sky full of stars
Description
Badry and the ECPC judges travelled to Wadi El-Hitan, a beautiful place in Egypt with clear view of the sky to enjoy looking at the stars, and have fun after working for many consecutive days on the contest.
The judges finally thought they could get a break, but given Mostafa's unconditional love for Mathematics, he couldn't spend the night without challenging them to count how many triplets of stars form a right angled triangle with an area in range [L, R].
To simplify the situation, he told them to consider the sky as a 2D plane where each star is a point.
Given N distinct stars, count the number of these triangles, and help the poor judges!
InputThe first line of the input is the number of test cases T.
Each test case starts with a line containing three integers N, L and R, where 1 ≤ N ≤ 1000, 1 ≤ L ≤ R ≤ 1018.
Each of the following N lines represent a point (star) and contains two integers xi and yi, where |xi|, |yi| ≤ 109.
OutputFor each test case output a single integer in a separate line, the answer to the problem.
ExampleInput4Output
7 1 100
0 0
2 0
0 2
10 0
0 10
3 3
3 -3
7 5 15
0 0
2 0
0 2
10 0
0 10
3 3
3 -3
7 7 9
0 0
2 0
0 2
10 0
0 10
3 3
3 -3
7 10 15
0 0
2 0
0 2
10 0
0 10
3 3
3 -3
5
3
1
2