#include <bits/stdc++.h>
using namespace std;
int q, a, b, c, d, fa, fb;
int n, k = 0, m, t;
char ch;
int main() {
  int p = 0;
  int x1, y1, x2, y2;
  scanf("%d %d\n", &n, &m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      ch = getchar();
      if (!p && ch == 'B') {
        x1 = i + 1;
        y1 = j + 1;
        p = 1;
      }
      if (ch == 'B') {
        x2 = i + 1;
        y2 = j + 1;
      }
    }
    getchar();
  }
  printf("%d %d\n", (x1 + x2) / 2, (y1 + y2) / 2);
}
