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
//package contest_488;

import java.util.*;
import java.io.*;
//import contest_488.InputReader.SpaceCharFilterimport java.io.*;


public class q1
{
 	public class Node
 	{
 		int a;
 		int b;
 		public Node(int a,int b)
 		{
 			this.a=a;
 			this.b=b;
 		}
 	}
	
	
public static void main(String[] args)
{
    InputReader in=new InputReader(System.in);
   OutputWriter out=new OutputWriter(System.out);
   Scanner sc=new Scanner(System.in);
   int n=in.readInt();
   int m=in.readInt();
   String[] s=new String[n];
   char[][] ch=new char[n][m];
   for(int i=0;i<n;i++)
   {
	   s[i]=in.readString();
	   ch[i]=s[i].toCharArray();
   }
   int start=2000;
   int end=-1;;
   for(int i=0;i<n;i++)
   {
	  if(s[i].indexOf("B")==-1)
		  continue;
	  else
	  {
		  start=Math.min(i, start);
		  end=Math.max(i, end);
	  }
   }
  // out.print(start+" "+end+" ");
   int x=(start+end)/2;
   start=2000;
   end=-1;
   int k=0;
   for(int i=0;i<n;i++)
   {
	   for(int j=0;j<m;j++)
	   {
		   if(ch[i][j]=='B')
		   {
			   k=1;
			   start=Math.min(j, start);
			  end=Math.max(j, end);
		   }
			
	   }
	   if(k==1)
		   break;
   }
   int y=(start+end)/2;
   out.print((x+1)+" "+(y+1));
   
   	out.flush();
   	out.close();


}
}
class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public String next() {
        return readString();
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

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(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}

class IOUtils {

    public static int[] readIntArray(InputReader in, int size) {
        int[] array = new int[size];
        for (int i = 0; i < size; i++)
            array[i] = in.readInt();
        return array;
    }

}