#include <bits/stdc++.h>
using namespace std;
int n, m;
char mp[120][120];
int main() {
  int i, j, ct = 1, t;
  while (~scanf("%d%d", &n, &m)) {
    int x, y = -1;
    for (i = 0; i < n; i++) {
      scanf("%s", mp[i]);
      if (y == -1)
        for (j = 0; j < m; j++) {
          if (mp[i][j] == 'B' && y == -1) {
            x = i;
            y = j;
          }
        }
    }
    int h = 0, w = 0;
    for (i = x; i < n; i++) {
      if (mp[i][y] == 'B')
        h++;
      else
        break;
    }
    for (i = y; i < m; i++) {
      if (mp[x][i] == 'B')
        w++;
      else
        break;
    }
    printf("%d %d\n", x + 1 + w / 2, y + 1 + h / 2);
  }
  return 0;
}
