| Attractive Grid | 
Mr. Naruto is a super programmer and he is working for a company named SSK(Screen Systems of Konoha). The company assigned him a task, which is he has to create a screenwhere each pixel of the screen can hold multiple colors simultaneously. Here are the properties of the screen:
 row, column
row, column M.
M.
Mr. Naruto successfully completed the task of constructing the screen and now he wants to do an experiment on the screen.
 pr
pr r and 
c1
r and 
c1 pc
pc c2 with color c.
c2 with color c.
After doing E such experiments, he is wondering about the intensity level of the pixels. You have to find how many pixels in the screen have an intensity level of at least L.
The first line of input will contain an integer T (
1 T
T 15) which is the
number of test cases. The first line of each test case contains three space
separated integers M (
1
15) which is the
number of test cases. The first line of each test case contains three space
separated integers M (
1 M
M 2*109), E (
1
2*109), E (
1 E
E 105) 
and L (
0
105) 
and L (
0 L
L 105). Where M is the screens side length, E is the number of experiments and
L is the desired intensity level.
105). Where M is the screens side length, E is the number of experiments and
L is the desired intensity level.
Then following E lines each describes an experiment. 
Each experiment is denoted by four integers 
r c1 c2 c. Where 
1 r
r M 
and 
1
M 
and 
1 c1
c1 c2
c2 M. And c will be between 1 and 105 (inclusive). There is a blank line after each
test case in the input.
M. And c will be between 1 and 105 (inclusive). There is a blank line after each
test case in the input.
For each case, print the case number and then the number of pixels in the screen having intensity level at least L. See sample output for the format.
2 10 4 1 3 2 6 1 4 2 5 1 5 4 8 2 3 7 10 3 10 4 2 3 2 6 1 4 2 5 1 5 4 8 2 3 7 10 3
Case 1: 39 Case 2: 17
Problemsetter: Kazi Rakibul Hossain 
Special Thanks: Tasnim Imran Sunny, Abu Obaida Opu