spoj#IITWPC4E. Maggu’s Solar Panels

Maggu’s Solar Panels

当前没有测试数据。

Summer is here and so is the season of powercuts, everybody here in IITK has installed there own solar panels over the roof. Now while setting panels, nobody cared of there panel was overlapping with others, the end result looks something likes the one shown below.  


Clearly, a panel cannot produce electricity from the part where light does not fall. Our Maggu has been given the task of estimating the total electricity output from panels from Hall Office. This task is haunting him. Even Coder cannot do it alone, he needs your help. Assume that all panels produce the same power per unit area and that the area not directly under the sun does not produce any electricity.


You need to print the power that will be produced given the end points of rectangular panels and the power per unit area that panels produce.


Note : The sides of the panel will be parallel to the X-axis or Y-axis. Meaning, panels will never be tilted. Hence, a panel can be represented by 4 integers x, y, X and Y. Where (x,y) is the co-ordinate of the bottom left corner of the panel and (X,Y) is the co-ordinate of the top right corner of the panel.


Input

First line contains two space separated integers N, number of solar panels and R, power per unit area. Next N lines contains the description of N panels. Each line containing 4 space separates integers x, y, X and Y respectively.

Output

You need to output a single integer, the total power that can be generated.

Constraints

-10^8<=x<=X<=10^8

 -10^8<=y<=Y<=10^8

1<=N<=100000

1<=R<=100

Example

Input:

3 2

-6 0 3 6

0 4 6 10

4 -2 9 6

Output:
240