J. Just enough squares
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Ivan has a grid paper of size $$$w \times h$$$ ($$$1 \leq w, h \leq 10^5$$$). So it contains $$$w \times h$$$ squares of size $$$1 \times 1$$$. We can use integer coordinates $$$(x,y)$$$ to denote any corner of any of the $$$1 \times 1$$$ squares ($$$0 \leq y \leq w$$$ and $$$0 \leq y \leq h$$$).

In this grid paper, Tomi has drawn a simple polygon of $$$n$$$ vertices ($$$3 \leq n \leq 50$$$). The $$$i$$$-th vertex has integer coordinates $$$(x_i,y_i)$$$ ($$$0 \leq x_i \leq w$$$ and $$$0 \leq y_i \leq h$$$).

Ivan thinks Tomi's polygon is so good it can be sold to the local art museum. So he will cut the polygon out of the paper in such a way that the whole polygon will be cut out and every $$$1 \times 1$$$ square is either completely cut out or completely left in the original grid paper. Additionally, he will cut out as few $$$1 \times 1$$$ squares as possible.

Input

The first line of input contains 3 space separated integers: $$$n$$$, $$$w$$$ and $$$h$$$.

The $$$i$$$-th of the next $$$n$$$ lines contains 2 spaces separated integers: $$$x_i$$$ and $$$y_i$$$. You are guaranteed that every ordered pair $$$(x_i,y_i)$$$ will be different.

Output

Output a single integer: the number of $$$1 \times 1$$$ squares Ivan will cut.

Example
Input
9 8 5
1 4
4 5
5 3
7 3
8 2
5 1
4 0
0 2
2 3
Output
27
Note

A simple polygon is a polygon that does not intersect itself and has no holes.

The green squares are cut out in the solution for the sample case: