#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[120][120];
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) scanf("%s", &s[i]);
  int x1, x2, y1, y2;
  int t = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == 'B' && t == 0) {
        x1 = j;
        y1 = i;
        x2 = j;
        y2 = i;
        t = 1;
      } else if (s[i][j] == 'B' && t) {
        x2 = j;
        y2 = i;
      }
    }
  }
  int a1 = (x1 + x2) / 2 + 1;
  int a2 = (y1 + y2) / 2 + 1;
  cout << a2 << " " << a1 << endl;
  return 0;
}
