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

@SuppressWarnings("WeakerAccess")
public class Main {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Main().run();
        // Sworn to fight and die
    }

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    class Point {
        double [] a;

        public Point(int n) {
            this.a = new double[n];
        }

        double scalar(Point b) {
            double result = 0;
            for (int i = 0; i < a.length; i++) {
                result += a[i] * b.a[i];
            }

            return result;
        }

        double len() {
            double res = 0;

            for (int i = 0; i < a.length; i++) {
                res += (a[i] * a[i]);
            }

            return Math.sqrt(res);
        }

        double dist(Point b) {
            double res = 0;

            for (int i = 0; i < a.length; i++) {
                res += ((a[i] - b.a[i]) * (a[i] - b.a[i]));
            }

            return Math.sqrt(res);
        }

        void alphaScalar(double alpha) {
            for (int i = 0; i < a.length; i++) {
                a[i] *= alpha;
            }
        }

    }

    public class LOL implements Comparable<LOL> {
        int a;
        int b;
        public LOL(int a, int b) {
            this.a = a;
            this.b = b;
        }
        public int compareTo(LOL o) {

            int xCompare = Integer.compare(o.a, a);

            if (xCompare != 0) {
                return xCompare;
            }

            return Integer.compare(o.b, b);
        }
    }



    public void solve() throws IOException {
        int n = readInt();
        int m = readInt();

        boolean isFistRowFound = false;
        int width = -1;
        int firstRowIndex = -1;
        int firstColumnIndex = -1;
        int length = -1;

        for (int i = 0; i < n; i++) {
            String currString = readString();
            boolean containsBlack = false;
            for (int j = 0; j < m; j++) {
                if (currString.charAt(j) == 'B') {
                    containsBlack = true;
                    if (!isFistRowFound) {
                        isFistRowFound = true;
                        firstRowIndex = i;
                        firstColumnIndex = j;
                    }
                } else if (containsBlack) {
                    width = (j - firstColumnIndex);
                    break;
                }
            }
            if (containsBlack && width == -1) {
                width = m - firstColumnIndex;
            }

            if (!containsBlack && isFistRowFound) {
                length = (i - firstRowIndex);
                break;
            }
        }

        if (length == -1) {
            length = n - firstRowIndex;
        }

        out.print(++firstRowIndex + (length == 1 ? 0 : length / 2));
        out.print(" ");
        out.print(++firstColumnIndex + (width == 1 ? 0 : width / 2));




    }

}