Voice advertising
One sector in a soccer stadium has a rectangle shape with H
rows and W seats in each row. Some seats are empty and some are filled with
soccer fans. During the game, fans shout different slogans. It goes as follows:
If fan A from one seat starts shouting, then fans sitting on
his left, right, up, and down do the same. Then, the neighbors of these do the
same, and so on. A sponsor of the soccer
team would like that the fans "spontaneously" shout the slogan of his
company. They have hired Mirko to sit on a free seat
and starts shouting the slogan of the company. A sponsor aims that the number
of people who shout their slogan is as large as possible. Your duty is to help out Mirko
to pick a seat that will allow him to induce a shout of a maximum number of
fans.
Input: The first row of the input file contains the numbers W
and H, 2<=W, H ≤ 2000.
The next H lines of
the file contain W characters. Each character is either a '.' (ASCII code 46)
–marking a free seat, or '#’ (ASCII code 35) – marking an occupied seat. There
is at least one free seat.
Output:
Print two integers x and y, separated by a blank, that marks the number of
seats and the number of rows.
Rows are marked with 1 to H, in top-bottom order. Seats are
enumerated with numbers 1 to W from left to right
Example:
|
Test case 1
|
Test case 2
|
Test case 3
|
Input
|
2 2
#.
.#
|
5 5 ..#.# ..### #..##
#.##. #....
|
6 4 ###### .....# ..##.#
...#.#
|
Output
|
2 1
|
2 4
|
3 2
|
Для отправки решений необходимо