#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7;
char maps[N][N];
int main() {
  int n, m, flag = 1, nowx, nowy, wide = 0;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", maps[i] + 1);
    for (int j = 1; j <= m && flag; ++j) {
      if (maps[i][j] == 'B' && flag) {
        wide = 1;
        nowx = i, nowy = j;
        ++j;
        while (j <= m && maps[i][j] == 'B') {
          wide++;
          ++j;
        }
        flag = 0;
      }
    }
  }
  printf("%d %d\n", nowx + (wide) / 2, nowy + (wide) / 2);
}
