|
Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Problem description
There are 4 rectangles on a plane surface. Calculate total area that they cover.
Input
There are 16 integer values in 4 lines which absolute value is not bigger than 1000. On each line there are 4 numbers – coordinates of rectangle (left bottom corner and right top corner).
Output
Print total area that they cover.
Example
| stdin |
stdout |
|
2 0 5 2
0 1 3 6
1 3 5 7
4 1 6 5 |
35 |
0 0 2 1
0 0 1 2
1 0 2 2
0 1 2 2
|
4 |
Для отправки решений необходимо выполнить вход.
|