You are an artist working on an infinitely large 2D pixel art canvas. Your goal is to fill a specific rectangular area with color, using the minimum number of new pixels.
The rectangular area to be filled is defined by its top-left corner $$$(X_1, Y_1)$$$ and its bottom-right corner $$$(X_2, Y_2)$$$, inclusive. On this canvas, the y-coordinates increase upwards.
To start, you are given $$$n$$$ pixels that are already colored at positions $$$(x_i, y_i)$$$.
You have two ways to color a new pixel:
Your task is to find the minimum number of new pixels you must color to ensure the entire rectangular area from $$$(X_1, Y_1)$$$ to $$$(X_2, Y_2)$$$ is completely filled.
The first line contains a single integer $$$n$$$ ($$$0 \le n \le 10^5$$$), the number of initially colored pixels.
The second line contains four integers $$$X_1, Y_1, X_2, Y_2$$$ ($$$1 \le X_1 \le X_2 \le 10^9$$$, $$$1 \le Y_2 \le Y_1 \le 10^9$$$), defining the target rectangle.
The next $$$n$$$ lines each contain two integers $$$x_i$$$ and $$$y_i$$$ ($$$1 \le x_i, y_i \le 10^9$$$), the coordinates of an initially colored pixel.
Print a single integer: the minimum number of new pixels required to fill the target rectangle.
33 6 6 45 53 28 5
11
04 4 4 4
4
13 4 4 33 2
4
13 6 6 47 5
12