#include <bits/stdc++.h>
using namespace std;
long long i, j, n, m, fbi = 1000000000000000000, fbj = 1000000000000000000,
                      lbi = 0, lbj = 0;
char ch;
int main() {
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      scanf(" %c", &ch);
      if (ch == 'B') {
        fbi = min(fbi, i);
        lbi = max(lbi, i);
        fbj = min(fbj, j);
        lbj = max(lbj, j);
      }
    }
  }
  cout << ((fbi + lbi) / 2) << " " << ((fbj + lbj) / 2) << endl;
  return 0;
}
