At the intersection#1463

At the intersection

1 second
64 megabytes
Very easy

Given an N \times N table, the excitement of a row or column is defined as the sum of its numbers. Find the number located at the intersection of the most excited row and the least excited column. If there are multiple such intersections, choose the one that is highest up in the table, and among those, the leftmost.

Input

The first line of the input contains the integer (1 \leq N \leq 100). The following lines each contain natural numbers, representing the table. Each number in the table does not exceed .

Output

Output a single number, which is the answer to the problem.

Examples

Example 1

Loading
Loading