eolymp
bolt
Try our new interface for solving problems
Problems

DVD and a napkin

DVD and a napkin

And what will happen if the problem Marinka "\href{/problems/385}{DVD and slut}" накроет all scattered disks just one napkin? Of course, the napkin she should choose the smallest possible size! \textbf{Input} In the first line of input data recorded four integers: \begin{itemize} \item \textbf{X}, \textbf{Y} - the size of the table horizontally and vertically (\textbf{0} < \textbf{X}, \textbf{Y} ≤ \textbf{1000}), \item \textbf{R} - radius of one disc DVD (\textbf{0} < \textbf{R} ≤ \textbf{1000}), \item \textbf{N} - number of discs on the table (\textbf{0} ≤ \textbf{N} ≤ \textbf{1000}). \end{itemize} Then follow \textbf{N} lines, each of which contains \textbf{x}\[\textbf{i}\], \textbf{y}\[\textbf{i}\] - coordinates of the entire center of the disk. It is guaranteed that all wheels are on the table and not hang over the edge of the table. \textbf{Output} Display area of the table, free from a rectangular sheet, nakryvayuschkgo all drives.
Time limit 1 second
Memory limit 64 MiB
Input example #1
10 10 1 3
1 1
2 8
6 4
Output example #1
37
Source Отборочный тур Всероссийской командной олимпиады школьников 2009/2010 учебный год