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

public class Main implements Runnable
{
    boolean multiple = false;
    long MOD = 1000000007;

    @SuppressWarnings("Duplicates")
    void solve() throws Exception
    {
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[][] a = new boolean[n][m];
        for (int i = 0; i < n; i++)
        {
            String s = sc.nextToken();
            for (int j = 0; j < m; j++)
                a[i][j] = s.charAt(j) == 'B';
        }

        int xStart = -1, xEnd = -1;
        outer: for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < m; j++)
            {
                if (a[i][j])
                {
                    xStart = j;
                    break outer;
                }
            }
        }

        outer: for (int i = 0; i < n; i++)
        {
            for (int j = m - 1; j >= 0; j--)
            {
                if (a[i][j])
                {
                    xEnd = j;
                    break outer;
                }
            }
        }

        int yStart = -1, yEnd = -1;
        outer: for (int j = 0; j < m; j++)
        {
            for (int i = 0; i < n; i++)
            {
                if (a[i][j])
                {
                    yStart = i;
                    break outer;
                }
            }
        }
        outer: for (int j = 0; j < m; j++)
        {
            for (int i = n - 1; i >= 0; i--)
            {
                if (a[i][j])
                {
                    yEnd = i;
                    break outer;
                }
            }
        }
        System.out.println((1 + ((yStart + yEnd) / 2)) + " " + (((xEnd + xStart) / 2) + 1));
    }

    /*I/O, and other boilerplate*/ @Override public void run() { try { in = new BufferedReader(new InputStreamReader(System.in));out = new PrintWriter(System.out);sc = new FastScanner(in);if (multiple) { int q = sc.nextInt();for (int i = 0; i < q; i++) solve(); } else solve(); } catch (Throwable uncaught) { Main.uncaught = uncaught; } finally { out.close(); }} public static void main(String[] args) throws Throwable{ Thread thread = new Thread(null, new Main(), "", (1 << 26));thread.start();thread.join();if (Main.uncaught != null) {throw Main.uncaught;} } static Throwable uncaught; BufferedReader in; FastScanner sc; PrintWriter out; } class FastScanner { BufferedReader in; StringTokenizer st; public FastScanner(BufferedReader in) {this.in = in;}public String nextToken() throws Exception { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(in.readLine()); }return st.nextToken(); }public int nextInt() throws Exception { return Integer.parseInt(nextToken()); }public long nextLong() throws Exception { return Long.parseLong(nextToken()); }public double nextDouble() throws Exception { return Double.parseDouble(nextToken()); }
}