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

/**
 * Write a description of class Basic here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */
import java.util.Scanner;
import java.util.ArrayList;

public class A_Problems
{
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        //Pair Of Toys:
        //System.out.println("First enter the mount of toys, then the cost.");
        /*long n = input.nextLong();
        long k = input.nextLong();
        long combos = pairOfToys(n, k);
        System.out.println(combos);*/
        
        //The Rank
        /*
        ArrayList<Integer> ar= new ArrayList<Integer>();
        int students = input.nextInt() - 1;
        int thomas = input.nextInt() + input.nextInt() + input.nextInt() + input.nextInt();
        for (int i = 0; i < students; i++) {
            ar.add(input.nextInt() + input.nextInt() + input.nextInt() + input.nextInt());
        }
        System.out.println(theRank(ar, thomas));*/
        
        //Tricky Alchemy
        /*System.out.println(trickyAlchemy(input.nextLong(), input.nextLong(),
            input.nextLong(), input.nextLong(), input.nextLong()));
        */
       
        //Modular Exponentiation
        //System.out.println(modularExponentiation(input.nextLong(), input.nextLong()));
        
        //Garden
        /*int n = input.nextInt();
        int k = input.nextInt();
        ArrayList<Integer> ar = new ArrayList<Integer>();
        for (int i = 0; i < n; i++) {
            ar.add(input.nextInt());
        }
        System.out.println(garden(n, k, ar));*/
        
        //Find Square
        int n = input.nextInt();
        int m = input.nextInt();
        
        int[][] ar = new int[n][m];
        for (int i = 0; i < n; i++) {
            String str = input.next();
            for (int j = 0; j < m; j++) {
                if (str.substring(j, j+1).equals("W")) {
                    ar[i][j] = 0;
                }
                else {
                    ar[i][j] = 1;
                }
            }
        }
        ArrayList<Integer> aray = findSquare(ar, n, m);
        System.out.println(aray.get(0) + " " + aray.get(1));
        
        
        input.close();
    }

    public static long pairOfToys(long n, long k) {
        long combos;
        long x;
        if (2*n-1 < k) {
            combos = 0;
        }
        else {
            if (k <= n) {
                x = k;
            }
            else {
                x = 2*n-k+2;
            }
            if (x%2 == 0) {
                combos = x/2 - 1;
            }
            else {
                combos = (x - 1) / 2;
            }
        }

        return combos;
    }
    
    public static int theRank(ArrayList<Integer> ar, int thomas) {
        int rank = 1;
        for (int i = 0; i < ar.size(); i++) {
            if (ar.get(i) > thomas) {
                rank ++;
            }
        }
        return rank;
    }
    
    public static long trickyAlchemy(long yellowC, long blueC, long yellowB, long greenB, long blueB) {
        long missingC = 0;
        long neededBC = greenB + 3*blueB;
        long neededYC = greenB + 2*yellowB;
        
        if (neededBC > blueC) {
            missingC += (neededBC - blueC);
        }
        if (neededYC > yellowC) {
            missingC += (neededYC - yellowC);
        }
        
        return missingC;
    }
    
    public static long modularExponentiation(long n, long m) {
        long answer = 0;
        if (m > n) {
            long n2 = n;
            long x = 1;
            while (m >= x) {
                x *= 2;
                n2--;
                if (n2 == 0) {
                    answer = m % x;
                    break;
                }
            }
            if (n2 != 0) {
                answer = m;
            }
        }
        else {
            answer = m;
        }

        return answer;
    }
    
    public static int garden(int n, int k, ArrayList<Integer> ar) {
        int minHours = 100;
        ArrayList<Integer> acc = new ArrayList<Integer>();
        for (int i = 0; i < ar.size(); i++) {
            if (k % ar.get(i) == 0) {
                acc.add(ar.get(i));
            }
        }
        
        for (int i = 0; i < acc.size(); i++) {
            if (k/acc.get(i) < minHours) {
                minHours = k/acc.get(i);
            }
        }
        
        return minHours;
    }
    
    public static ArrayList<Integer> findSquare(int[][] ar, int n, int m) {
        ArrayList<Integer> ans = new ArrayList<Integer>();
        int topLeftX = 0;
        int topLeftY = 0;
        boolean out = true;
        int length = 0;
        for (int i = 0; i < n && out; i++) {
            for (int j = 0; j < m; j++) {
                if (ar[i][j] == 1) {
                    topLeftX = i;
                    topLeftY = j;
                    out = false;
                    break;
                }
            }
            
        }
        
        for (int i = topLeftX; i < n && ar[i][topLeftY] == 1; i++) {
            length++;
        }
        
        ans.add(topLeftX + ((length + 1)/2));
        ans.add(topLeftY + ((length + 1)/2));
        
        
        return ans;
    }
}