P28115 [洛谷] [NOISG 2023 Qualification] Area
普及-
题目描述

Problem Description

Stuart has $n$ rectangles, where the $i$-th rectangle has a length of $h_i$ and a width of $w_i$.

The area of a rectangle is the size of the region it covers. Stuart wants you to help him find the area of the largest rectangle among these $n$ rectangles.

Input Format

The first line contains an integer $n$.

The next $n$ lines each contain two integers $h_i$ and $w_i$, representing the length and width of the $i$-th rectangle.

Output Format

An integer representing the maximum area.

Sample Input and Output

Sample Input #1

3
5 9
19 4
8 10

Sample Output #1

80

Sample Input #2

5
8 2
4 9
3 8
1 7
9 4

Sample Output #2

36

Notes

Data Range

Subtask Score Special Condition
1 50 $n=1$
2 50 None

For all data, $1 \le n \le 100, 1 \le h_i, w_i \le 1000$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 5 9 19 4 8 10
样例输出
80