At the intersection#5090

At the intersection

1 second
122.174 megabytes
Very easy

There is an N \times N table. The liveliness of a row or column is defined as the sum of the numbers within it. We need to find the number located at the intersection of the row with the highest liveliness and the column with the lowest liveliness. If there are multiple such intersections, choose the one that is higher up in the table, and among those, the one further to the left. This will maximize the probability of passing the test.

Input

The first line contains the integer (1 \leq N \leq 100). The following lines contain the table, with each number being a natural number not exceeding .

Output

Output one number — the answer to the problem.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading