#P10727. [NOISG 2023 Qualification] Area

[NOISG 2023 Qualification] Area

Problem Description

Stuart has nn rectangles. For the ii-th rectangle, its length is hih_i and its width is wiw_i.

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

Input Format

The first line contains an integer nn.

The next nn lines each contain two integers hi,wih_i, w_i, representing the length and width of the ii-th rectangle.

Output Format

Output one integer, the maximum area.

3
5 9
19 4
8 10
80
5
8 2
4 9
3 8
1 7
9 4

36

Hint

Constraints

Subtask\text{Subtask} Score Special property
11 5050 n=1n=1
22 None

For all testdata, 1n1001 \le n \le 100, 1hi,wi10001 \le h_i, w_i \le 1000.

Translated by ChatGPT 5