H. Not-so Beautiful Painting
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Bob wants to create the most beautiful painting ever. The painting must be enormous, so he has purchased a grid of width $$$10^9$$$ and height $$$10^9$$$. Bob decided that today would be the best day to make the painting, but unfortunately it turned out to be a very rainy day. As a result, there are $$$M$$$ columns in the painting which have been completely washed out by the rain.

Before the rain began, Bob managed to paint $$$N$$$ rectangles on the painting. Rectangles are Bob's favorite shape, but if one rectangle is covered up by another, he would be very sad, so he made sure that none of the rectangles overlap.

Bob wants to know how many cells of paint on the original painting will remain after water washes away $$$M$$$ of the columns.

Input

The first line of input contains integers $$$N$$$ and $$$M$$$ ($$$1 \le N, M \le 2 \cdot 10^5$$$).

The following $$$N$$$ lines each contain four integers $$$r_{1_i}$$$, $$$c_{1_i}$$$, $$$r_{2_i}$$$, and $$$c_{2_i}$$$ ($$$1 \leq r_{1_i}, c_{1_i}, r_{2_i}, c_{2_i} \leq 10^9$$$, $$$r_{1_i} \leq r_{2_i}$$$, $$$c_{1_i} \leq c_{2_i}$$$). These represent the bottom-left and top-right cells of the $$$i$$$-th rectangle of paint respectively. It is guaranteed that none of these rectangles will intersect.

The last $$$M$$$ lines of input each contain one integer $$$w_j$$$, indicating the $$$j$$$-th column of the painting which has been washed out by water. ($$$1 \le w_j \le 10^9$$$). Each $$$w_j$$$ is distinct.

Output

Output the number of cells in the painting which contain paint but haven't been washed away.

Examples
Input
4 3
3 1 5 4
1 5 4 6
1 2 1 3
5 5 5 5
2
4
5
Output
11
Input
3 3
1 5 3 7
1 8 2 8
4 6 5 8
1
3
10
Output
17
Note

Test 1:

As shown in the diagram on the left, there are four rectangles, occupying a total area of $$$23$$$. After the rain washes away some of the columns, there are four rectangles, occupying an area of $$$1 + 4 + 3 + 3 = 11$$$.

Test 2:

In this case, all of the water avoids the paint, so the answer is just the total amount of paint originally: $$$17$$$.