#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  pair<int, int> mn(1000000008, 1000000008);
  pair<int, int> mx(0, 0);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char a;
      scanf(" %c", &a);
      if (a == 'B') {
        mn = min(mn, pair<int, int>(i, j));
        mx = max(mx, pair<int, int>(i, j));
      }
    }
  }
  printf("%d %d\n", (mn.first + mx.first) / 2 + 1,
         (mn.second + mx.second) / 2 + 1);
  return 0;
}
