T = int(input())
for i in range(T):
    N, H, Y1, Y2, L = list(map(int,input().split()))
    for j in range(N):
        ti,Xi = list(map(int,input().split()))

"""
3
6 5 1 2 3
2 2
2 1
1 10
2 8
2 4
1 2
1 4 2 5 1
2 6
6 5 1 2 3
2 2
2 1
1 10
2 8
2 4
1 6
"""
