#include <bits/stdc++.h>
using namespace std;
const int N = 500;
const int M = 1e6 + 500;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int LOG = 20;
const int OFF = (1 << 20);
const double EPS = 1e-9;
const double PI = 3.1415926535;
char s[N][N];
int mxx, mix = INF, mxy, miy = INF, n, m;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf(" %c", &s[i][j]);
      if (s[i][j] == 'B') {
        mix = min(mix, i);
        miy = min(miy, j);
        mxx = max(mxx, i);
        mxy = max(mxy, j);
      }
    }
  }
  printf("%d %d\n", (mix + mxx) / 2, (miy + mxy) / 2);
  return 0;
}
