#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  string s[116];
  for (int i = 0; i < n; i++) cin >> s[i];
  int width = 0, height = 0;
  int k, y, x;
  for (int i = 0; i < n; i++) {
    k = s[i].find('B');
    if (k != string::npos && height == 0) {
      height++;
      width++;
      y = k;
      x = i;
      for (int g = k + 1; g < m; g++) {
        if (s[i][g] == 'B')
          width++;
        else
          break;
      }
    } else if (k != string::npos && s[i][k] == 'B')
      height++;
  }
  x += width / 2;
  y += height / 2;
  if (width % 2 != 0) x++;
  if (height % 2 != 0) y++;
  cout << x << " " << y << endl;
  return 0;
}
