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 java.io.*;
import java.util.*;

public class Main {

	static InputStreamReader isr;
	static BufferedReader br;
	static OutputStreamWriter osw;
	static BufferedWriter bw;
	static StringTokenizer st;
	
	static StringBuilder table[] = null;
	static int sRow = -1, sCol = -1;
	static int N = 0;
	static int M = 0;
	
	public static void main(String[] args) throws IOException {
		isr = new InputStreamReader(System.in);
		br = new BufferedReader(isr);
		osw = new OutputStreamWriter(System.out);
		bw = new BufferedWriter(osw);

		st = new StringTokenizer(br.readLine());
		N = Integer.parseInt(st.nextToken());
		M = Integer.parseInt(st.nextToken());
		
		table = new StringBuilder[N];
		
		for(int i = 0; i < N; i++){
			table[i] = new StringBuilder(br.readLine());
			char[]array = table[i].toString().toCharArray();
			
			for(int k = 0; k < array.length; k++){
				if(array[k] == 'B' && sRow == -1 && sCol == -1){
					sRow = i+1;
					sCol = k+1;
				}
			}
		}
		
		int[] resultArr = process();
		
		bw.write(resultArr[0] + " " + resultArr[1] + "\n");
		bw.flush();
		bw.close();
		br.close();
	}
	
	private static int[] process(){
		
		int r = sRow - 1;
		int c = sCol - 1;
		int rowCount = 1;
		int colCount = 1;
		
		// 가로
		while(table[r].charAt(c) == 'B'){
			c++;
			colCount += 1;
			
			if(c >= M)
				break;
		}

		c = sCol - 1;
		
		// 세로
		while(table[r].charAt(c) == 'B'){
			r++;
			rowCount += 1;
			
			if(r >= N)
				break;
		}
		
		colCount -= 1;
		rowCount -= 1;
		
//		System.out.println(rowCount + ", " + colCount);
		
		return new int[]{rowCount / 2 + sRow, colCount / 2 + sCol};
//		System.out.println(result_R + ", " + result_C);
	}
}