#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  char tab[120];
  int startX, startY, lastX, lastY;
  bool started = false;
  for (int i = 0; i < n; i++) {
    scanf("%s", tab);
    for (int j = 0; j < m; j++) {
      if (tab[j] == 'B') {
        if (!started) {
          started = true;
          startX = j;
          startY = i;
        }
        lastX = j;
        lastY = i;
      }
    }
  }
  cout << (lastY + startY) / 2 + 1 << " " << (lastX + startX) / 2 + 1 << endl;
}
