#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXDIM = 115;
int h, w;
char g[MAXDIM][MAXDIM + 1];
void run() {
  scanf("%d%d", &h, &w);
  for (int x = (0); x < (h); ++x) scanf("%s", g[x]);
  int lx = INT_MAX, ly = INT_MAX, hx = INT_MIN, hy = INT_MIN;
  for (int x = (0); x < (h); ++x)
    for (int y = (0); y < (w); ++y)
      if (g[x][y] == 'B') {
        lx = min(lx, x);
        ly = min(ly, y);
        hx = max(hx, x);
        hy = max(hy, y);
      }
  int cx = lx + (hx - lx) / 2, cy = ly + (hy - ly) / 2;
  printf("%d %d\n", cx + 1, cy + 1);
}
int main() {
  run();
  return 0;
}
