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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.Vector;

 

public class Main{
	
	
    public static void main(String[] args) {
        try {
            new Main().solve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    
    private void solve() throws Exception {
    	Scanner cin = new Scanner(System.in);
    //	InputReader cin = new InputReader(System.in);
        PrintWriter cout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n = cin.nextInt(),m=cin.nextInt(),fx = 0,fy = 0;
        char[][] maps = new char[n][m];
        int countB=0;
        for(int i=0 ; i<n ; i++)
        {
        	maps[i]=cin.next().toCharArray();
        }
        for(int i=0 ; i<n ; i++)
        {
        	if(countB>0)
        		break;
        	for(int j=0 ; j<m ; j++)
            {
        		countB = maps[i][j]=='B'?countB+1:countB;
            }
        }
  cc:   for(int i=0 ; i<n ; i++)
        {
        	for(int j=0 ; j<m ; j++)
            {
            	if(maps[i][j]=='B')
            	{
            		fx=i+1;fy=j+1;
            		break cc;
            	}
            }
        }
        if(countB==1)
        {
        	cout.print(fx+" "+fy);
        }
        else
        {
        	cout.print(fx+countB/2+" ");
        	cout.print(fy+countB/2);
        }
        cout.flush();
    }
}


class InputReader{
    StreamTokenizer tokenizer;
    public InputReader(InputStream stream){
        tokenizer=new StreamTokenizer(new BufferedReader(new InputStreamReader(stream)));
        tokenizer.ordinaryChars(33,126);
        tokenizer.wordChars(33,126);
    }
    public String next() throws IOException {
        tokenizer.nextToken();
        return tokenizer.sval;
    }
    public int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    public long nextLong() throws IOException {
        return Long.parseLong(next());
    }
    public double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
    public boolean hasNext() throws IOException {
        int res=tokenizer.nextToken();
        tokenizer.pushBack();
        return res!=tokenizer.TT_EOF;
    }
}