#include <bits/stdc++.h>
using namespace std;
const int maxn = 150;
int n, m;
char a[maxn][maxn];
int main() {
  scanf("%d%d", &n, &m);
  int x1, y1, x2, y2;
  for (int i = 0; i < n; i++) scanf("%s", a[i]);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B' && a[i - 1][j] != 'B' && a[i][j - 1] != 'B') {
        x1 = i + 1;
        y1 = j + 1;
      }
      if (a[i][j] == 'B' && a[i + 1][j] != 'B' && a[i][j + 1] != 'B') {
        x2 = i + 1;
        y2 = j + 1;
      }
    }
  }
  printf("%d %d", (x1 + x2) / 2, (y1 + y2) / 2);
  return 0;
}
