#include <bits/stdc++.h>
using namespace std;
int n, m, sx, sy, ex, ey, ansx, ansy, flag;
char s[120][120];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == 'B') {
        sx = i;
        sy = j;
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  for (int i = sx; i <= n; i++)
    for (int j = sy; j <= m; j++) {
      if (s[i + 1][j] != 'B' && s[i][j + 1] != 'B' && s[i][j] == 'B') {
        ex = i;
        ey = j;
        break;
      }
    }
  ansx = (sx + ex) / 2;
  ansy = (sy + ey) / 2;
  printf("%d %d\n", ansx, ansy);
  return 0;
}
