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 A {
	
	void solve() throws IOException {
		int n = readInt();
		int m = readInt();
		char[][] fild = new char[n][];
		
		for (int i = 0; i < n; i++) 
			fild[i] = readString().toCharArray();
		
		int count, x;
		for (int i = 0; i < n; i++) {
			count = 0;
			x = 0;
			for (int j = 0; j < m; j++) {
				if (fild[i][j] == 'B') { 
					count++;
					x = j;
				}
			}
			if (count != 0) {
				out.print(i + 1 + (count / 2));
				out.println(" " + (x + 1 - (count / 2)));
				return;
			}
		}
	}
	
	/////////////////////////////////////////////////////////////////////////////
	
	void init() throws FileNotFoundException {
		
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
		
		tok = new StringTokenizer(" ");
	}
	
	/////////////////////////////////////////////////////////////////////////////
	
	long arifProg (long start, long end, long kol) {
		return ((start + end) * kol) >> 1;
	}
	
	long minArr (long[] a, long l, long r) {
		long min = Long.MAX_VALUE;
		
		for (int i = (int) l; i <= r && i < a.length; i++)
			if (min >= a[i]) min = a[i];
		
		return min;
	}
	
	long maxArr (long[] a, long l, long r) {
		long max = Long.MIN_VALUE;
		
		for (int i = (int) l; i <= r && i < a.length; i++)
			if (max <= a[i]) max = a[i];
		
		return max;
	}
	
	long sqrt (long a) {
		long l = 0;
		long r = Math.min((long)Math.sqrt(a) + 1000000000, a);
		long m = 0;
		while (r - l > 1) {
			m = (l + r) / 2;
			if (m*m < a)
				l = m;
			else 
				r = m;
		}
		
		if (r*r == a)
			return r;	
		return l;
	}
	
	long binpow (long a, long n, long m) {
		long res = 1;
		while (n > 0) {
			if ((n & 1) == 1) {
				res *= a;
				if (m != 0) res %= m;
				n--;
			} else {
				a *= a;
				if (m != 0) a %= m;
				n >>= 1;
			}
		}
		return res;
	}
	
	//////////////////////////////////////////////////////////////////////////////
	
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	public static void main(String[] args) {
		new A().run();
	}
	
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	
	void run() {
		try {
			long timeStart = System.currentTimeMillis();
			
			init();
			solve();
			
			out.close();
			
			long timeEnd = System.currentTimeMillis();
			System.err.println("Time = " + (timeEnd - timeStart));
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}
	
	//READ//////////////////////////////////////////////////////////////////
	
	String readLine() throws IOException {
		return in.readLine();
	}
	 
	String delimiter = " ";
	
	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine) return null;
			
			tok = new StringTokenizer(nextLine);
		}
		
		return tok.nextToken(delimiter);
	}
	
	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}
	
	long readLong() throws IOException {
		return Long.parseLong(readString());
	}
	
	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}
	
	//ARRAYS READ///////////
	
	int[] readIntArr(int n) throws IOException {
		int a[] = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = readInt();
		}
		return a;
	}
	
	long[] readLongArr(int n) throws IOException {
		long a[] = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = readLong();
		}
		return a;
	}
	
	double[] readDoubleArr(int n) throws IOException {
		double a[] = new double[n];
		for (int i = 0; i < n; i++) {
			a[i] = readDouble();
		}
		return a;
	}
	
	//*********************************************************************
}