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
# array=[4,2,2,7,8,1,2,8,10]
# i=0
# j=0
# requiredsum=8
# n=9
# currentsum=0
# currentlength=0
# minlength=99
# while(j<n):
#     currentsum+=array[j]
#     if (currentsum>=requiredsum):
#         currentlength=j-i+1
#         minlength=min(minlength,currentlength)
#     currentsum-=array[i]
#     i+=1
#     j+=1
# print(currentlength)
#longest substring with atmost k different characters
'''
s="lauda"
k=3
start=0
contains={}
maxlen=0
for end in range(len(s)):
    if not s[end] in contains:
        contains[s[end]]=0
    contains[s[end]]+=1
    while(len(contains))>k:
        left=s[start]
        contains[left]-=1
        if contains[left]==0:
            del contains[left]
        start+=1
    maxlen=max(maxlen,end-start+1)
print(maxlen)
'''
##word wrap
n,m=map(int,input().split())
l1=[]
for i in range(n):
    l1.append(input())
minx=miny=99999999999
maxx=maxy=-99999999999
for i in range(n):
    for j in range(m):
        if l1[i][j]=='B':
            minx=min(minx,i)
            miny=min(miny,j)
            maxx=max(maxx,i)
            maxy=max(maxy,j)
print((minx+maxx)//2+1,end=' ')
print((miny+maxy)//2+1)
