Consider a table of size n × m, initially fully white. Rows are numbered 1 through n from top to bottom, columns 1 through m from left to right. Some square inside the table with odd side length was painted black. Find the center of this square.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 115) — the number of rows and the number of columns in the table.

The i-th of the next n lines contains a string of m characters s_{i1} s_{i2} … s_{im} (s_{ij} is 'W' for white cells and 'B' for black cells), describing the i-th row of the table.

Output

Output two integers r and c (1 ≤ r ≤ n, 1 ≤ c ≤ m) separated by a space — the row and column numbers of the center of the black square.

Examples

Input

5 6
WWBBBW
WWBBBW
WWBBBW
WWWWWW
WWWWWW


Output

2 4


Input

3 3
WWW
BWW
WWW


Output

2 1
import sys

line1 = str(sys.stdin.readline())
n = int(line1.split(' ')[0])
m = int(line1.split(' ')[1])
table = []
for i in range(n):
    table.append(str(sys.stdin.readline()).rstrip())

#group_member = [int(n) for n in line1.rstrip().split(' ')]
#print(n, m)
#print(table)

x1 = -1
y1 = -1
x2 = -1
y2 = -1
def findstart():
    for i in range(m):
        for j in range(n):
            #print(table[j][i])
            if table[j][i] == "B":
                x1 = i
                y1 = j
                return x1, y1
    return -1,-1
x1, y1 = findstart()
#print(x1, y1)
#print(n, m)
def findend():
    for i in range(m-1, -1, -1):
        for j in range(n-1, -1, -1):
            #print(table[j][i], i, j)
            if table[j][i] == "B":
                x = i
                y = j
                return x, y
    return -1,-1
x2, y2 = findend()
#print(x2, y2)

print(str(str(int((y2-y1)/2)+y1+1) + " "+ str(int((x2-x1)/2)+x1+1)))
