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
//Author: Mo Abjal, MJP Rohilkhand University Bareilly, UP, India 2018.
import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
public class Main{
	public static StringTokenizer token = new StringTokenizer("");
	public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static PrintWriter output = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {		
		int N = ni();
		int M = ni();
		char C[][] = acc(N,M);
		int a = -1, b = -1, c = -1, d = -1;	
		boolean flag = false;	
		for(int i=0;i<N;i++){
			for(int j=0;j<M;j++){
				if(C[i][j]=='B'){
					if(a==-1 && b==-1) {a = i; b = j; c = a; d = b;}
					else{c = i; d = j;}
					flag = true;
				}
			}
		}
		a++;b++;c++;d++;
		System.out.println((a+c)/2+" "+(b+d)/2);
		//output.println(a+" "+b+" "+c+" "+d);
		output.close();

	}
	//Scanning Inputs and Converting data library
	//Parse Integer
	public static Integer pi(String str){
		return Integer.parseInt(str);
	}
	//Parse Long
	public static Long pl(String str){
		return Long.parseLong(str);
	}
	//Converting Integer into String
	public static String ps(Integer N){
		return Integer.toString(N);
	}
	//Taking Integer Input
	public static Integer ni() throws IOException{
		if(!token.hasMoreElements()){
			token = new StringTokenizer(br.readLine());
		}
		return Integer.parseInt(token.nextToken());
	}
	//Taking Long Input
	public static Long nl() throws IOException{
		if(!token.hasMoreElements()){
			token = new StringTokenizer(br.readLine());
		}
		return Long.parseLong(token.nextToken());
	}
	//Taking String Input
	public static String ns() throws IOException{
		return new StringTokenizer(br.readLine()).nextToken();
	}
	//Taking Integer Array
	public static Integer[] ai(int N) throws IOException{
		Integer A[] = new Integer[N];
		token = new StringTokenizer(br.readLine());
		for(int i=0;i<A.length;i++){
			A[i] = pi(token.nextToken());
		}
		return A;
	}
	//Taking 2D Char Array
	public static char[][] acc(int N,int M) throws IOException{
		char C[][] = new char[N][M];
		for(int i=0;i<N;i++){
			token = new StringTokenizer(br.readLine());
			String s = token.nextToken();
			for(int j=0;j<M;j++){
				C[i][j] = s.charAt(j);
			}
		}
		return C;
	}
	//Taking String Array
	public static String[] as(String S[]) throws IOException{
		token = new StringTokenizer(br.readLine());
		for(int i=0;i<S.length;i++){
			S[i] = token.nextToken();
		}
		return S;
	}

	//Calculating factorial
	public static long fact(long N){
		long fact = 1;
		for(int i=1;i<=N;i++){
			fact = fact * i;
		}
		return fact;
	}
	public static BigInteger factB(int N){
		BigInteger b = new BigInteger("1");
		for(int i=1;i<=N;i++){
			b = b.multiply(BigInteger.valueOf(i));
		}
		return b;
	}
	//Making Paares of given size
	public static long mp(long N,long size){
		long mul=1;
		long temp = N;
		for(long i=N;i>N-size;i--){
			mul = mul*temp--;
		}
		long fact = fact(size);
		if(mul/fact==0) return 1;
		return mul/fact;
	}
}



//Copyright Reserved - Mo Abjal.