프로그램 명: boi_camp(special judge)
제한시간: 1 초

Squad commander is looking for a location to build a camouflaged camp of a certain size. He has a digital topographic map of the area, which is a rectangular grid with every element defining the altitude at a certain coordinate. Coordinates of any point on the map are identified by the row and the column in the table.

The camp location should be a rectangle fully located within the map area and satisfy certain characteristics. Each characteristic consists of two identical adjacent rectangular areas and the requirement for their altitudes. It is defined by

The camp location satisfies the characteristic if the altitude requirement is satisfied. Write a program which given the topographic map of the area and the characteristics would find the best (the one that satisfies most characteristics) location for building the camouflaged camp. In case of several solutions, output any of them.

입력

출력

The first line should contain two integers - the coordinates of top-left corner of camp location.

입출력 예

입력

5 6 
2 2 2 2 2 2 
2 6 6 4 3 2 
3 5 8 7 7 4 
4 6 8 9 8 6 
5 7 8 8 8 7 
3 5 
3 
1 1 1 3 1 0 
2 2 2 2 0 0 
2 4 1 1 1 1

출력

3 1 

Location (3, 1) satisfies all three characteristics
출처:boi 2005 

[질/답] [제출 현황] [푼 후(0)]
[ 채 점 ] [홈으로]  [뒤 로]