codeforces#P1028A. Find Square

Find Square

Description

Consider a table of size n×mn \times m, initially fully white. Rows are numbered 11 through nn from top to bottom, columns 11 through mm 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 nn and mm (1n,m1151 \le n, m \le 115) — the number of rows and the number of columns in the table.

The ii-th of the next nn lines contains a string of mm characters si1si2sims_{i1} s_{i2} \ldots s_{im} (sijs_{ij} is 'W' for white cells and 'B' for black cells), describing the ii-th row of the table.

Output two integers rr and cc (1rn1 \le r \le n, 1cm1 \le c \le m) separated by a space — the row and column numbers of the center of the black square.

Input

The first line contains two integers nn and mm (1n,m1151 \le n, m \le 115) — the number of rows and the number of columns in the table.

The ii-th of the next nn lines contains a string of mm characters si1si2sims_{i1} s_{i2} \ldots s_{im} (sijs_{ij} is 'W' for white cells and 'B' for black cells), describing the ii-th row of the table.

Output

Output two integers rr and cc (1rn1 \le r \le n, 1cm1 \le c \le m) separated by a space — the row and column numbers of the center of the black square.

Samples

输入数据 1

5 6
WWBBBW
WWBBBW
WWBBBW
WWWWWW
WWWWWW

输出数据 1

2 4

输入数据 2

3 3
WWW
BWW
WWW

输出数据 2

2 1