#P10727. Maximum Rectangle Area

    ID: 12760 Type: Default 1000ms 256MiB

Maximum Rectangle Area

Maximum Rectangle Area

Stuart has n rectangles. The i-th rectangle has height \(h_i\) and width \(w_i\). The area of a rectangle is computed as \(h_i \times w_i\). Your task is to determine the maximum area among these rectangles.

inputFormat

The first line contains a single integer \(n\), the number of rectangles. The second line contains \(n\) space-separated integers representing the heights \(h_1, h_2, \dots, h_n\). The third line contains \(n\) space-separated integers representing the widths \(w_1, w_2, \dots, w_n\).

outputFormat

Output a single integer representing the maximum area among the given rectangles.

sample

3
1 2 3
2 4 1
8