#include <bits/stdc++.h>
using namespace std;
int n, m, r1, c1, r2, c2;
char s[200];
int main() {
  r1 = r2 = c1 = c2 = 0;
  int r, c;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    scanf("%s", s);
    for (int j = 0; j < m; ++j)
      if (s[j] == 'B') {
        if (!r1) {
          r1 = i, c1 = j + 1;
        }
        r2 = i, c2 = j + 1;
      }
  }
  printf("%d %d", (r1 + r2) >> 1, (c1 + c2) >> 1);
}
