#include <bits/stdc++.h>
int main() {
  int n, m, i, j, k = 0, a, b, c = 0, d = 0, e = 0;
  char s[200][200];
  scanf("%d%d", &n, &m);
  getchar();
  for (i = 0; i < n; i++) {
    gets(s[i]);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++)
      if (s[i][j] == 'B') {
        a = i + 1;
        b = j + 1;
        e = 1;
        break;
      }
    if (e) break;
  }
  e = 0;
  for (i = n - 1; i >= 0; i--) {
    for (j = m - 1; j >= 0; j--)
      if (s[i][j] == 'B') {
        c = i + 1;
        d = j + 1;
        e = 1;
        break;
      }
    if (e) break;
  }
  printf("%d %d", (a + c) / 2, (b + d) / 2);
  return 0;
}
