The first line contains an integer TTT (1≤T≤1051 \le T \le 10^51≤T≤105), indicating the number of test cases.
The first line of each test case contains three integers n,a,bn,a,bn,a,b (1≤n≤1051 \le n \le 10^51≤n≤105, 1≤a,b≤1091 \le a,b \le 10^91≤a,b≤109), indicating the number of points on the border, the length of the house and the width of the house.
Each of the following nnn lines contains two integers x,yx,yx,y (0≤x≤a0 \le x \le a0≤x≤a, 0≤y≤b0 \le y \le b0≤y≤b), indicating the coordinate of the point. You can consider the house as a rectangle on the Cartesian coordinate system whose edges are parallel to the xxx or yyy axis, with one vertex at (0,0)(0,0)(0,0) and another at (a,b)(a,b)(a,b). For a point (x,y)(x,y)(x,y) on the border, it is guaranteed that one of the following conditions is met:
- x=0x=0x=0, 0<y<b0<y<b0<y<b
- x=ax=ax=a, 0<y<b0<y<b0<y<b
- 0<x<a0<x<a0<x<a, y=0y=0y=0
- 0<x<a0<x<a0<x<a, y=by=by=b
For any two different points (xi,yi)(x_i,y_i)(xi,yi) and (xj,yj)(x_j,y_j)(xj,yj), it is also guaranteed that:
- (xi,yi)≠(xj,yj)(x_i,y_i)\neq(x_j,y_j)(xi,yi)=(xj,yj).
- if ∣xi−xj∣=a|x_i-x_j|=a∣xi−xj∣=a, then yi≠yjy_i \neq y_jyi=yj.
- if ∣yi−yj∣=b|y_i-y_j|=b∣yi−yj∣=b, then xi≠xjx_i \neq x_jxi=xj.
It is guaranteed that the sum of nnn over all test cases won't exceed 10510^5105.