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.util.*;
import java.io.*; 
import java.text.*;
//Solution Credits: Taranpreet Singh
public class Main{
    //SOLUTION BEGIN
    void solve(int TC) throws Exception{
        int n = ni(), m = ni();
        int minR = 1000, minC = 1000, maxR = 0, maxC = 0;
        for(int i = 0; i< n; i++){
            String s = n();
            for(int j = 0; j< m; j++){
                if(s.charAt(j)=='B'){
                    minR = Math.min(i,minR);
                    minC = Math.min(minC, j);
                    maxR = Math.max(i,maxR);
                    maxC = Math.max(maxC, j);
                }
            }
        }
        pn((minR+maxR+2)/2 + " " + (minC+maxC+2)/2);
    }
    //SOLUTION ENDS
    long mod = (int)1e9+7, IINF = (long)1e18;
    final int MAX = (int)1e6+1, INF = (int)1e9, root = 3;
    DecimalFormat df = new DecimalFormat("0.00000000");
    double PI = 3.141592653589793238462643383279502884197169399375105820974944, eps = 1e-8;
    static boolean multipleTC = false, memory = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        in = new FastReader();
        out = new PrintWriter(System.out);
        int T = (multipleTC)?ni():1;
        //Solution Credits: Taranpreet Singh
        for(int i = 1; i<= T; i++)solve(i);
        out.flush();
        out.close();
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new Main().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new Main().run();
    }
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object o){out.print(o);}
    void pn(Object o){out.println(o);}
    void pni(Object o){out.println(o);out.flush();}
    String n(){return in.next();}
    String nln(){return in.nextLine();}
    int ni(){return Integer.parseInt(in.next());}
    long nl(){return Long.parseLong(in.next());}
    double nd(){return Double.parseDouble(in.next());}

    class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}
        public FastReader(String s) throws Exception{br = new BufferedReader(new FileReader(s));}
        String next(){
            while (st == null || !st.hasMoreElements())
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){e.printStackTrace();}
            return st.nextToken();
        }
        String nextLine(){
            String str = "";
            try{    
                str = br.readLine();
            }catch (IOException e){e.printStackTrace();}   
            return str;
        }
    }
}   