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
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
// package coding;

import java.io.*;
import java.util.*;

/**
 *
 * @author Mostafa
 */
public class Coding {

        /**
         * @param args the command line arguments
         */
    public static class FastReaderFile
    {
        BufferedReader br;
        StringTokenizer st;
        public FastReaderFile(InputStream in)
        {
            br = new BufferedReader(new
                     InputStreamReader(in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
 public static PrintWriter out;
    
    public static int ser ( int x[] , int start , int end , int val )
    {
        while ( start <= end )
	{
            int mid = ( start + end ) / 2 ;
            if ( x[ mid ] <= val )
                start = mid + 1 ;
            else
                end = mid - 1 ;
	}
        return -1 ;
    }
    
 public static  boolean isPrime( long n)
{
    // Corner cases
    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 ;
    }
    
    
    
    public static int search( int x[] , int val )
    {
        return ser( x , 0 , x.length - 1 , val );
    }
    public static String remove ( String s , int i )
    {
        s = s.substring(0, i) + s.substring(i+1) ;
        return s ;
    }
    public static long ret( long a , long b   )
    {
            long c = Math.max(a, b);
            a = Math.min(a, b) ;
            out.println(c + "=("+a+")." + (c/a) + "+" + (c%a));
//            out.println(r);
            

        if ( c % a == 0 )
                    return a ;
            else
                return ret(c%a , a);
    }
    
    //    for (Map.Entry<Integer, Integer> e : x.entrySet()) 
    //            {
    //                e.getValue() , e.getKey
   
        public static void main(String[] args) throws FileNotFoundException {
//             TODO code application logic here
            FastReader in = new FastReader();
    //        Scanner in = new Scanner(System.in) ;
    //        FastReaderFile in = new FastReaderFile(new FileInputStream("fruits.in")) ;
            StringBuilder r = new StringBuilder();
            out = new PrintWriter(new BufferedOutputStream(System.out), true) ;
            int n = in.nextInt() , m = in.nextInt() ;
            String s[] = new String [n] ;
            for ( int i = 0 ; i < n ; ++i )
                    s[i] = in.next() ;
            int h = 0 , v = 0 , c = 0 ;
            for ( int i = 0 ; i < n ; ++i )
            {
                    for ( int j = 0 ; j < m ; ++j )
                    {
                            if ( s[i].charAt(j) == 'B' )
                            {
                                    h += j+1 ;
                                    v += i+1 ;
                                    ++c ;
                            }
                    }
            }
            out.println( v / c + " " + h / c );
        }
}
