codeforces#P1028A. Find Square
Find Square
Description
Consider a table of size , initially fully white. Rows are numbered through from top to bottom, columns through from left to right. Some square inside the table with odd side length was painted black. Find the center of this square.
The first line contains two integers and () — the number of rows and the number of columns in the table.
The -th of the next lines contains a string of characters ( is 'W' for white cells and 'B' for black cells), describing the -th row of the table.
Output two integers and (, ) separated by a space — the row and column numbers of the center of the black square.
Input
The first line contains two integers and () — the number of rows and the number of columns in the table.
The -th of the next lines contains a string of characters ( is 'W' for white cells and 'B' for black cells), describing the -th row of the table.
Output
Output two integers and (, ) separated by a space — the row and column numbers of the center of the black square.