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;
const long long LL_INF = 1e18 + 5;
const int INT_INF = 1e9 + 5;
const int MOD_9 = 1e9 + 7;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long binpow(long long n, long long power) {
  if (power == 0) return 1;
  if (power % 2) return binpow(n, power - 1) * n;
  long long b = binpow(n, power / 2);
  return b * b;
}
unsigned int max_prefix_func(const string s) {
  unsigned int best = 0;
  size_t size = s.length();
  for (size_t i = 1; i < size; i++)
    if (s.substr(0, i) == s.substr(size - i)) best = i;
  return best;
}
struct Segment {
  long long l, r;
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<char>> d(n, vector<char>(m));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> d[i][j];
  pair<int, int> up_left, down_left, up_right;
  bool flag = false;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (d[i][j] == 'B') {
        up_left.first = i;
        up_left.second = j;
        flag = true;
        break;
      }
    if (flag) break;
  }
  for (int j = m - 1; j >= 0; j--) {
    if (d[up_left.first][j] == 'B') {
      up_right.first = up_left.first;
      up_right.second = j;
      break;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (d[i][up_left.second] == 'B') {
      down_left.first = i;
      down_left.second = up_left.second;
      break;
    }
  }
  cout << (up_left.first + down_left.first) / 2 + 1 << ' ';
  cout << (up_left.second + up_right.second) / 2 + 1;
  return 0;
}
