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
n, m = map(int, input().split())

matrix = []

find_B_start = True
B_col_start = B_row_start = B_side = 0

for i in range(n):
    row = list(str(input()))
    for j in range(m):
        if row[j] == 'B':
            if(find_B_start):
                B_col_start = j + 1
                B_row_start = i + 1
                find_B_start = False
            B_side += 1
            break

middle_x = B_col_start + (B_side // 2)
middle_y = B_row_start + (B_side // 2)

print(middle_y, end=' ')           
print(middle_x)           





# n, m = map(int, input().split())

# matrix = []
# c = 0


# for i in range(n):
#     row = list(str(input()))
#     matrix.append(row)

# for i in range(n):
#     for j in range(m):
#         if matrix[i][j] == 'B':
#             c += 1
#             break
#         if c==1:
#             break

# for x in range(n):
#     for y in range(m):
#         if matrix[x][y] == 'B':
#             a = x + 1
#             b = y + 1

# i += 1
# j += 1

# print((i+x)//2, end=' ')           
# print((j+y)//2)           



# import math

# rows, cols = [ int(x) for x in input().split()]

# row = []
# B_rows = set()
# col = -1

# for i in range(rows):
#     row.append(str(input()))
#     if( row[i].find('B') != -1):
#         B_rows.add(i)
#     col = max(col, row[i].find('B'))

# B_cols = [int(x) for x in range(col, col+len(B_rows))]
# B_rows = list(B_rows)

# center_cell_col = math.floor((B_cols[0] + B_cols[-1]) / 2)
# center_cell_row = math.floor((B_rows[0] + B_rows[-1]) / 2)
# center_cell_col = int(center_cell_col)
# center_cell_row = int(center_cell_row)

# # print(f'{B_cols}')

# print(f'{center_cell_row+1} {center_cell_col+1}')
