1877: 【CSP二维数组】靶心数▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

James 同学发现了在二维数组中有这样一类数,这个数正好比自己上下左右四个方向的数都大(由于需要比四个方向的数都大,因此这个数不可能在第一行、最后一行、第一列、最后一列), lns="http://www.w3.org/1998/Math/MathML">James 把它们称为靶心数。

请你编程求出一个二维数组的靶心数有哪些,输出他们。

Input

第一行是两个整数 lns="http://www.w3.org/1998/Math/MathML">n 和 lns="http://www.w3.org/1998/Math/MathML">mlns="http://www.w3.org/1998/Math/MathML">n 和 lns="http://www.w3.org/1998/Math/MathML">m 都是 lns="http://www.w3.org/1998/Math/MathML">4100 之间的整数),代表接下来的二维数组有 lns="http://www.w3.org/1998/Math/MathML">n 行 lns="http://www.w3.org/1998/Math/MathML">m 列。

接下来 lns="http://www.w3.org/1998/Math/MathML">n 行,每行有 lns="http://www.w3.org/1998/Math/MathML">m 个整数。

Output

请按照输入的顺序输出满足条件的靶心数,每行 lns="http://www.w3.org/1998/Math/MathML">1 个。

Sample Input Copy

4 4
1 2 3 4
5 6 5 8
9 1 11 10
13 4 5 16

Sample Output Copy

6
11