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.Arrays;
import java.util.Scanner;

public class B {

    public static void main(String []arg) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();
        String xx[][] = new String[n][m];
        for (int i = 0; i < n; ++i) {
            String o =sc.next();
            for (int j = 0; j < m; ++j) {
                xx[i][j] = String.valueOf(o.charAt(j));
            }
        }

        boolean test =true;
        int ii =0,jj=0;
        for (int i = 0; i < n  ; ++i) {
            for (int j = 0; j < m ; ++j) {

                if(xx[i][j].equals("B")){
                    test = false;
                    ii=i;
                    jj =j;
                    break;
                }

            }
            if(!test){
                break;
            }
        }

        int iii=0,jjj=0;
        for(int i=ii;i<n;++i){
            if(!xx[i][jj].equals("B")){
                iii = i -1;
                break;
            }
            if(i+1==n){
                iii = i;
            }
        }
        for(int j=jj;j<m;++j){

            if(!xx[ii][j].equals("B")){

                jjj = j -1;
                break;
            }
            if(j+1==m){
                jjj = j;
            }
        }


        ii += ((iii-ii)/2)+1;
        jj += ((jjj-jj)/2)+1;
        System.out.println(ii+" "+jj);
    }

    static  boolean isPrime( long n)
    {
        if (n < 2)  return false;
        if (n < 4)  return true;

        if (n%2 == 0 || n%3 == 0) return false;

        for (long i = 5 ; i * i <= n ; i = i + 6 )
            if ( n % i == 0 || n % ( i + 2 ) == 0)
                return false ;

        return true;
    }
    static long gcd(long a, long b)
    {
        return b == 0 ? (a < 0 ? -a : a) : gcd(b, a % b);
    }
    static long lcm(long a, long b)
    {
        long lcm = (a / gcd(a, b)) * b;
        return lcm > 0 ? lcm : -lcm ;
    }

}