#include <bits/stdc++.h>
using namespace std;
int X, Y, n, m, cnt;
char s[1005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", s + 1);
    for (int j = 1; j <= m; j++)
      if (s[j] == 'B') cnt++, X += i, Y += j;
  }
  X /= cnt;
  Y /= cnt;
  printf("%d %d\n", X, Y);
  return 0;
}
