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.BufferedReader;
import java.io.IOException;
import java.util.*;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;

public class A1028 {
    static class OutputWriter {
        private final PrintWriter writer;
    
        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }
    
        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }
    
        public void print(int[] array) {
            for (int i = 0; i < array.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(array[i]);
            }
        }
    
        public void printLine(int[] array) {
            print(array);
            writer.println();
        }
    
        public void close() {
            writer.close();
        }
    
    }
    static class Pair {
        int value;
        int index;
        Pair(int value, int index) {
            this.value = value;
            this.index = index;
        }
    }
    static class MyComparator implements Comparator<Pair> {
        @Override
        public int compare(Pair p1, Pair p2) {
            if (p1.value != p2.value) return p1.value - p2.value;
            return p1.index - p2.index;
        }
    }
    public static void main(String[] args) {
		OutputStream outputStream = System.out;
        OutputWriter out = new OutputWriter(outputStream);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc=  new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        //int c =sc.nextInt();
        //int d = sc.nextInt();
		// String[] s = br.readLine().split("\\s+");
        int[] arr = new int[n];
        char[][] matrix = new char[n][m];
        sc.nextLine();
        int startrow = -1, startcol = -1;
        for (int i=0; i<n; i++) {
            String s = sc.nextLine();
            for (int j=0; j<m; j++) {
                matrix[i][j] = s.charAt(j);
                if (matrix[i][j] == 'B' && startrow == -1) {
                    startcol=j; 
                    startrow=i;
                }
            }
        }
        int endrow = -1;
        for (int i=startrow; i<n; i++) {
            if (matrix[i][startcol]=='B') {
                endrow = i;
            } else {
                break;
            }
        }
        int endcol = -1;
        for (int i=startcol; i<m; i++) {
            if (matrix[startrow][i]=='B') {
                endcol = i;
            } else {
                break;
            }
        }
        System.out.println(((endrow+startrow)/2+1) + " " + ((endcol+startcol)/2+1));
        //out.printLine(arr);
        out.close();
    }
}