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.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        FastReader read = new FastReader();
        StringBuilder out = new StringBuilder();
        int n  =read.nextInt(); 
        int m = read.nextInt();
        char grid[][] = new char[n][m];
        for (int i = 0; i < n; i++) {
            grid[i] = read.nextLine().toCharArray();
        }
        int r = -1 , c = -1 , r2 = -1 , c2 = -1, l = 1; 
        for (int i = 0; i <  n; i++) {
            for (int j = 0; j < m; j++) {
                if(grid[i][j] == 'B' && r == -1 && c == -1){
                    r = i; 
                    c = j; 
                }else if(grid[i][j] == 'B'){
                    r2 = i; 
                    c2 = j;
                }
            }
        }
        if(c2 == -1 && r2 == -1){
            System.out.println((r+1)  + " " + (c+1));
        }else {
            int ra = (r2  - r) / 2;
            int ca = (c2 - c) / 2; 
            if(r2 - r % 2 != 0 ){
                ra++;
            }if(c2 - c %2 != 0 ){
                ca++;
            }
            System.out.println((r + ra)+" " + (c+ca));
        }
    }
}

class Point {

    int x, y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
}

class Pair implements Comparable<Pair> {

    int x, y;

    public Pair(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public int compareTo(Pair o) {
        if (this.x - o.x != 0) {
            return this.x - o.x;
        } else {
            return o.y - this.y;
        }
    }

}

class FastReader {

    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}
