Famous chef Clémentine Deboeuf is buying new tables for her high-class restaurant. She has decided to go for the latest trend, a large model with numerous, wide, yet delicate ornaments. However, she needs to make sure that these decorations do not hamper the perfectly tuned ballet of dishes.
Ornaments reduce the amount of flat table surface where waiters can safely place dishes. Clémentine wants to make sure that all dishes can be put somewhere on the table in a sufficiently large safe area, that is, without overlapping any ornament. Given the dimensions and locations of all ornamental areas, Clémentine asks you to tell her what impact these ornaments have on the locations available for dishes.
The table is a rectangle of width
In Clémentine's restaurant, all
Input Specification
The input comprises several lines, each consisting of integers separated with single spaces:
- The first line consists of the integers
, , , and ; - Each of the
following lines contains the coordinates of an ornament as four integers , , , and , with and , describing an ornament spanning between the point and the point ; - The
following lines contain the width and length of dishes as two integers with and .
Constraints
; ; .
Output Specification
Example
Sample Input
7 5 3 9
1 2 0 1
5 7 2 5
0 1 2 4
7 1
3 5
5 3
2 2
3 3
4 4
4 5
6 2
1 1
Sample Output
1
1
0
13
5
1
0
0
26
Comments