SOLVE
LATER
It is a nice winter Sunday morning and AltF4, our hero, decides to play a new video game. The game is called Appearism. There are a total of N beetles in the game that are initially peeping out of the grooves to look for a chance to tease you.Each one appears out of their groves at an absolute time P_{i}, tease AltF4 for a time duration and then go back to their groves and sleep forever at time Q_{i}.
AltF4 has just got one shot of the nuclear weapon that ha can use to destroy all the beetles. Being very clever, he has noted down the (P_{i}, Q_{i}) for each of the beetles. He also observed that the beetles are hurt by a amount A when they are looking for a chance to tease you in the groove (i.e. when time is < P_{i}), by B when they are out of their grooves teasing you (between P_{i}, Q_{i}) and by C when they are back into the grooves and sleeping forever (when time is > Q_{i}). Obviously B is always greater than both A and C. AltF4 being poor in math and computing asks you for favor.
Input & Output
The first line contains the number of times AltF4 plays the game T. Then the description of T games follow. In each game description, the first line contains four space separated integers N A B C. Then N lines follow with two space separated integers P Q, the recorded value of their hideouts. Each Q will always be ≥ corresponding P
NOTE : Large Input files. Use faster IO.For each test game, you are to print one number in a line, the maximum destruction that AltF4 can achieve. Remember that he may use the nuclear gun only at one instant of time.
ConstraintsT ≤ 50 1 ≤ N ≤ 20000 0 ≤ P, Q, A, B, C ≤ 10^{9}
1) In the first test case, he could use the weapon at time = 4. Both are out of their grooves and he can score 10 points. 2) In the second case, he can destroy one of the beetles when they are out of their grooves at max and score 5 points.