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

public class A764 {
    public static void main(String [] args) {
        InputStream inputReader = System.in;
        OutputStream outputReader = System.out;
        InputReader in = new InputReader(inputReader);
        PrintWriter out = new PrintWriter(outputReader);
        Algorithm solver = new Algorithm();
        solver.solve(in, out);
        out.close();
    }
}

class Algorithm {
    void solve(InputReader ir, PrintWriter pw) {

        int n = ir.nextInt(), m = ir.nextInt(), posX = 0, posY = 0, posXX = 0, posYY = 0;
        char [][] letters = new char[n][m];

        for (int i = 0; i < n; i++) letters[i] = ir.next().toCharArray();


        for(int i = 0; i < n; i++){
            boolean stop = false;
            for (int j = 0; j < m; j++) {
                if (letters[i][j] == 'B') {
                    posY = i;
                    posX = j;
                    stop = true;
                    break;
                }
            }
            if (stop) break;
        }

        for (int i = m - 1; i >= posX; i--) {
            if (letters[posY][i] == 'B') {
                posXX = i;
                break;
            }
        }

        for (int i = n - 1; i >= posY; i--) {
            if (letters[i][posX] == 'B') {
                posYY = i;
                break;
            }
        }

        pw.print(posY != posYY ? (posY + ((posYY - posY) / 2) + 1) : (posY + 1));
        pw.print(" ");
        pw.print(posX != posXX ? (posX + ((posXX - posX) / 2) + 1) : (posX + 1));

    }

    private static void Qsort(int[] array, int low, int high) {

        int i = low;
        int j = high;
        int x = array[low + (high - low) / 2];

        do {
            while (array[i] < x) ++i;
            while (array[j] > x) --j;
            if (i <= j) {
                int tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
                i++;
                j--;
            }
        } while (i <= j);

        if (low < j) Qsort(array, low, j);
        if (i < high) Qsort(array, i, high);

    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }
    double nextDouble() {
        return Double.parseDouble(next());
    }
    long nextLong() {
        return Long.parseLong(next());
    }

}