#include <bits/stdc++.h>
using namespace std;
int n, m;
char s[1009];
int main() {
  scanf("%d%d", &n, &m);
  int l1 = m, l2 = 0;
  int r1 = n, r2 = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%s", s);
    for (int j = 0; j < m; ++j) {
      if (s[j] == 'B') {
        l1 = min(l1, j);
        r1 = min(r1, i);
        l2 = max(l2, j);
        r2 = max(r2, i);
      }
    }
  }
  printf("%d %d\n", (r1 + r2) / 2 + 1, (l1 + l2) / 2 + 1);
  return 0;
}
