WCM and ZHC like watching PLMM (beautiful girl). One day they are going to FengHua dining-room for lunch from the second teaching building. You know, there is a straight road lined by many beautiful ginkgos between FengHua dining-room and the second teaching building. WCM and ZHC will not miss this good chance for watching PLMM.
Now they want to know how many PLMM on the road they can meet before they reach FengHua dining-room namely, the end of the road. Assume that they know the position and walking speed of every PLMM on the road at the moment they start.
They think they meet a PLMM if and only if at some time, they and the PLMM are at the same position of the road.


The first line of the input gives an integer t (t<100), which is the number of test case.
For each test case, the first line gives three integers N (0<N<=10000) ,L (0<L<=1000000) and W (0<W<=10000). N is the number of PLMMs on the road when WCM and ZHC start. L means that the length of road is L meters. W means that the speed of WCM and ZHC is W meters per second.
Each of the following N lines describes a PLMM using two integers P, S. P (0<=P<=L) is the position of the PLMM measured from the star point of WCM and ZHC. S (-10000<=S<=10000) means that the walking speed of the PLMM is S meters per second. You should note that if P < 0, the PLMM is walking in opposite direction as WCM and ZHC, otherwise the PLMM is walking in the same direction as WCM and ZHC.


For each test case, output a line containing the answer integer.

Sample Input

2 10 2
0 -10
5 1

3 100 10
0 0
60 9
100 0

Sample Output



UESTC 4th programming contest