A square wall of size N×N is filled with N2/2 bricks of size 2×1, packed with no gaps. N is even. The bricks are numbered from 1 to N2/2. Some of them lie horizontally and the rest lie vertically. The wall has no empty cell. Two cells carrying the same number form one brick.

You cut a square hole in the wall to fit a window. The hole must satisfy all of the following.
Write a program that finds a square hole with the longest side among those that satisfy the conditions. At least one such hole is guaranteed to exist.
The first line contains the side length N of the wall. N is even and 4≤N≤200.
Each of the next N lines contains N integers describing the brick layout. Each integer is between 1 and N2/2, every value appears exactly twice, and the two cells with the same value are adjacent.
On the first line print the side length of the square hole, then the row number and the column number of its upper left cell, separated by spaces. The upper left cell of the wall is (1,1).
If several holes share the longest side, print the one with the smallest row number. If several of those remain, print the one with the smallest column number among them.
In the example the longest square hole has side 2. Removing bricks 6 and 7 works, and removing bricks 10 and 11 works as well, but the answer is (3,2) because its row number is smaller.