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.Scanner;

/**
 * http://codeforces.com/contest/1028/problem/A
 */
public class SolutionA {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        int m = sc.nextInt();

        String[] arr = new String[n];

        for (int i = 0; i < n; i++) {
            arr[i] = sc.next();
        }

        int[] result = find(n, m, arr);

        out.println(result[0] + " " + result[1]);
        out.flush();
        out.close();

    }

    private static int[] find(int n, int m, String[] arr) {

        int first_line = -1;
        int col = 0;
        for (int i = 0; i < n; i++) {

            first_line = i + 1;
            if (arr[i].contains("B")) {
                first_line = i + 1;
                col = arr[i].indexOf("B") + 1 + (arr[i].lastIndexOf("B") - arr[i].indexOf("B"))/2;
                break;
            }
        }

        int last_line  = -1;

        for (int i = n - 1; i >= 0; i--) {
            if (arr[i].contains("B")) {
                last_line = i + 1;
                break;
            }
        }

        int line = first_line + (last_line - first_line)/2;

        return new int[]{line, col};
    }


    private static void test(int[] actual, int[] expected) {
        System.out.println("Actual: " + actual[0] + ", " + actual[1]);
        if (actual[0] != expected[0]) System.err.println(actual[0] + " != " + expected[0]);
        if (actual[1] != expected[1]) System.err.println(actual[1] + " != " + expected[1]);
    }

}