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 Mukesh Singh
 *
 */

import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
@SuppressWarnings("unchecked")



public class Main {	
	//solve test cases
	
	void solve() throws Exception {
		//int T = in.nextInt();
		//for(int tid = 1; tid <= T; ++tid)
			solveT(0);
	}
	void solveT(int tid) throws Exception{
		int n = in.nextInt();
		int m = in.nextInt();
		int minX = n;
		int minY = m;
		int maxX = 0;
		int maxY =  0;
		String[] ar = new String[n];
		for(int i = 0 ; i  <n ; ++i){
			ar[i] = in.nextToken();
		}
		for(int i = 0 ; i < n ; ++i){
			for(int j = 0 ; j < m ; ++j){
				if(ar[i].charAt(j) == 'B'){
					minX = Math.min(minX, i);
					minY = Math.min(minY, j);
					maxX = Math.max(maxX , i);
					maxY = Math.max(maxY, j);
				}
			}
		}
		int c1 = 1+minX + (maxX-minX)/2;
		int c2 = 1+minY + (maxY - minY)/2;
		System.out.println(c1+" "+c2);
	}
	//@ main function
	public static void main(String[] args) throws Exception {
		new Main();
	}
	
	InputReader in;
	PrintStream out ;
	DecimalFormat df ;
	Main() {
		try {
			File defaultInput = new File("file.in");
			if (defaultInput.exists()) 
				in = new InputReader("file.in");
			else 
				in = new InputReader();
			defaultInput = new File("file.out");
			if (defaultInput.exists()) 
				out = new PrintStream(new FileOutputStream("file.out"));
			else
				out = new PrintStream(System.out);
			df = new DecimalFormat("######0.00");
			solve();
			out.close();
		} 
		catch (Exception e) {
			e.printStackTrace();
			System.exit(261);
		}
	}
	
	class InputReader {
		BufferedReader reader;
		StringTokenizer tokenizer;
		
		InputReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
		}
		
		InputReader(String fileName) throws FileNotFoundException {
			reader = new BufferedReader(new FileReader(new File(fileName)));
		}
		
		String readLine() throws IOException {
			return reader.readLine();
		}
		
		String nextToken() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens())
				tokenizer = new StringTokenizer(readLine());
			return tokenizer.nextToken();
		}
		
		boolean hasMoreTokens() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				String s = readLine();
				if (s == null)
					return false;
				tokenizer = new StringTokenizer(s);
			}
			return true;
		}
		
		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(nextToken());
		}
		
		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(nextToken());
		}
		
		double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(nextToken());
		}
	}
}