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
#include <bits/stdc++.h>
using namespace std;
int N, M;
vector<vector<int>> A;
struct TwoDimCumSum {
 public:
  int R, C;
  TwoDimCumSum(vector<vector<int>>& X) {
    this->R = X.size();
    if (R == 0) return;
    this->C = X[0].size();
    this->cum = vector<vector<int>>(R + 1, vector<int>(C + 1, 0));
    for (int i = 0; i < R; ++i)
      for (int j = 0; j < C; ++j) {
        cum[i + 1][j + 1] = cum[i][j + 1] + cum[i + 1][j] - cum[i][j] + X[i][j];
      }
  }
  int query(int i1, int j1, int i2, int j2) {
    return cum[i2][j2] - cum[i1][j2] - cum[i2][j1] + cum[i1][j1];
  }

 private:
  vector<vector<int>> cum;
};
void solve() {
  TwoDimCumSum cum(A);
  for (int i = 0; i < (N); ++i)
    for (int j = 0; j < (M); ++j) {
      int ii = -1, jj = -1;
      for (int l = 1; l <= min(N, M); l += 2) {
        if (i + l > N) continue;
        if (j + l > M) continue;
        if (cum.query(i, j, i + l, j + l) == l * l) {
          ii = (i + (i + l)) / 2, jj = (j + (j + l)) / 2;
        }
      }
      if (ii != -1 && jj != -1) {
        cout << ii + 1 << " " << jj + 1 << endl;
        return;
      }
    }
  assert(false);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M;
  A.resize(N, vector<int>(M, 0));
  for (int i = 0; i < (N); ++i)
    for (int j = 0; j < (M); ++j) {
      char c;
      cin >> c;
      A[i][j] = c == 'B';
    }
  solve();
  return 0;
}
