#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e2 + 10;
const int maxm = 2e5 + 10;
const int INF = 0x3f3f3f3f;
char Map[maxn][maxn];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", Map[i] + 1);
  }
  int r1 = 0, r2 = 0, l1 = 0, l2 = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (Map[i][j] == 'B') {
        if (!r1) {
          r1 = r2 = i;
          break;
        } else
          r2 = i;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (Map[j][i] == 'B') {
        if (!l1) {
          l1 = l2 = i;
          break;
        } else
          l2 = i;
      }
    }
  }
  printf("%d %d\n", (r1 + r2) / 2, (l1 + l2) / 2);
  return 0;
}
