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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.StringTokenizer;

public class A {
	public static void main(String[] args) throws IOException {
		FastScanner in= new FastScanner(System.in);
		PrintWriter out= new PrintWriter(System.out);
		
		int n= in.nextInt();
		int m= in.nextInt();
		
		char [][] g= new char[n][m];
		for (int i = 0; i < n; i++) {
			g[i]= in.next().toCharArray();
		}
		int sx=-1;
		int ex=-1;
		int ty=-1;
		for (int i = 0; i < n; i++) {
			
			int j;
			for (j = 0; j < m; j++) {
				if(g[i][j]=='B') {
					sx= j;
					ex= j;
					break;
				}
			}
			for(j= sx+1; j<m; j++) {
				if(g[i][j]=='B') {
					ex=j;
				}
			}
			if(sx!=-1) {
				ty=i;
				break;
			}
		}
		
		int len= ex-sx+1;
		int d= len/2;
		int mm= d+ty;
//		System.out.println(sx+" "+ ex+" " + ty+" "+ mm);
		
		System.out.println(mm+1+" "+ (sx+len/2+1));
		
	}
	static class p implements Comparable<p>{
		int x;
		int y;
		public p(int a, int b) {
			x=a;
			y=b;
		}
		public int compareTo(p o) {
			if(o.x-this.x==0) return this.y-o.y;
			return o.x-this.x;
		}
	}
	static class FenwickTree {
		long[] ft;
		public FenwickTree(int n) {
			ft = new long[n + 1];
		}

		int rsq(int b) {
			int sum = 0;
			for (; b > 0; b -= (b & (-b)))
				sum += ft[b];
			return sum;
		}

		int rsq(int a, int b) {
			return rsq(b) - (a == 1 ? 0 : rsq(a - 1));
		}

		void update(int k, int v) {
			for (; k < ft.length; k += (k & (-k)))
				ft[k] += v;
		}
	}
	public static long gcd(long a, long b) {
		return b==0 ? a: gcd(b, a%b);
	}
	public static long lcm(long a, long b) {
		return a*b/ gcd(a,b);
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public String next() throws IOException {
			if (!st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
				return next();
			}
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}