polja
문제
Mickey is in the airplane above ground. On the ground, he sees fields of rectangular shapes and different colors, depending on planted vegetation.
Mickey wants to know what is the area of the largest one-colored rectangle on the ground.
On the picture you can see examples from the bottom of the page (solution for each example is marked):
[이미지 1]
Write a program that will calculate the area of the largest one-colored rectangle on the ground.
Two different fields will not overlap, however they may touch in corners or along sides.
입력
First line of input contains an integer N, 1 ≤ N ≤ 2500, the number of fields on the ground. Each of the following N lines contains five integers X1, Y1, X2, Y2 (X1<X2, Y1<Y2) and C.
These numbers represents one field (with sides parallel to coordinate axes) with coordinates of diagonal corners (X1,Y1) and (X2,Y2) and with color C, 1 ≤ C ≤ 100. All the coordinates will be integers between 0 and 1,000,000,000 (inclusive).
출력
First and only line of output should contain the area from the problem statement.
Note: solution will always fit into the signed 64-bit integer data type (int64 in Pascal, long long in C/C++).
예제
예제 1
5 1 1 3 3 1 3 1 5 3 1 1 4 3 6 1 3 4 5 6 1 0 3 6 4 2
8
예제 2
5 5 5 6 6 22 3 4 6 5 22 6 3 7 6 22 5 6 8 7 22 4 5 5 8 22
9
예제 3
7 0 0 4 3 1 6 2 9 7 2 6 7 10 9 3 4 0 6 3 1 0 6 6 9 3 0 3 6 6 2 7 0 8 2 2
27