#include <bits/stdc++.h>
int n, m, lx = 116, rx = -1, ly = 116, ry = -1;
char s[115][115];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%s", s[i]);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j)
      if (s[i][j] == 'B') {
        if (i < lx) lx = i;
        if (i > rx) rx = i;
        if (j < ly) ly = j;
        if (j > ry) ry = j;
      }
  printf("%d %d\n", ((lx + rx) >> 1) + 1, ((ly + ry) >> 1) + 1);
}
