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 javafx.util.Pair;

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

public class Main {

    void solve() throws IOException {
        int n = readInt(), m = readInt();
        char[][] a = new char[n][m];
        for (int i = 0; i < n; i++) a[i] = readString().toCharArray();
        int minx = 123213123;
        int maxx = 0;
        int miny = 12312312;
        int maxy = 0;
        for (int i = 0; i < n; i++) {
            for (int j=0;j<m;j++){
                if(a[i][j]=='B'){
                    minx = minInt(minx,i);
                    miny = minInt(miny,j);
                    maxx = maxInt(maxx,i);
                    maxy  = maxInt(maxy,j);
                }
            }
        }
        out.print((maxx+minx)/2+1+" ");out.print((maxy+miny)/2+1+" ");
    }

    void print(char... values) {
        for (char i : values) {
            out.print(i + " ");
        }
    }

    void print(String... values) {
        for (String i : values) {
            out.print(i + " ");
        }
    }

    void print(long... values) {
        for (long i : values) {
            out.print(i + " ");
        }
    }

    void ln() {
        out.println();
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    Main() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
        tok = new StringTokenizer("");
    }

    void run() throws IOException {
        solve();
        out.close();
    }


    class Fenwik {
        private long[] t;
        private int length;

        Fenwik(int[] a) {
            this.length = a.length + 100;
            this.t = new long[length];
            for (int i = 0; i < a.length; ++i) this.inc(i, a[i]);
        }

        void inc(int i, int delta) {
            for (; i < this.length; i = i | (i + 1)) t[i] += delta;
        }

        long getSum(int r) {
            long sum = 0;
            for (; r >= 0; r = (r & (r + 1)) - 1) sum += this.t[r];
            return sum;
        }

    }

    String delimiter = " ";

    String readLine() throws IOException {
        return in.readLine();
    }

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

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

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

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

    int[] readIntArray(int b) {
        int a[] = new int[b];
        for (int i = 0; i < b; i++)
            try {
                a[i] = readInt();
            } catch (IOException e) {
                e.printStackTrace();
            }
        return a;
    }

    int[] readIntArrayWithDec(int b) {
        int a[] = new int[b];
        for (int i = 0; i < b; i++)
            try {
                a[i] = readInt() - 1;
            } catch (IOException e) {
                e.printStackTrace();
            }
        return a;
    }

    int[] readSortedIntArray(int size) throws IOException {
        Integer[] array = new Integer[size];
        for (int index = 0; index < size; ++index) array[index] = readInt();
        Arrays.sort(array);
        int[] sortedArray = new int[size];
        for (int index = 0; index < size; ++index) sortedArray[index] = array[index];
        return sortedArray;
    }

    int[] sortedIntArray(int size, int[] array) throws IOException {
        for (int index = 0; index < size; ++index) array[index] = readInt();
        Arrays.sort(array);
        int[] sortedArray = new int[size];
        for (int index = 0; index < size; ++index) sortedArray[index] = array[index];
        return sortedArray;
    }

    int minInt(int... values) {
        int min = Integer.MAX_VALUE;
        for (int value : values) min = Math.min(min, value);
        return min;
    }

    int maxInt(int... values) {
        int max = Integer.MIN_VALUE;
        for (int value : values) max = Math.max(max, value);
        return max;
    }

    long minLong(long... values) {
        long min = Long.MAX_VALUE;
        for (long value : values) min = Math.min(min, value);
        return min;
    }

    long maxLong(long... values) {
        long max = Long.MIN_VALUE;
        for (long value : values) max = Math.max(max, value);
        return max;
    }

    boolean checkIndex(int index, int size) {
        return (0 <= index && index < size);
    }

    int abs(int a) {
        if (a < 0) return -a;
        return a;
    }
}