#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int sx, sy, ex, ey;
  int f = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char a;
      cin >> a;
      if (a == 'B') {
        if (f == 0) {
          sx = i + 1;
          sy = j + 1;
          f = 1;
        }
        ex = i + 1;
        ey = j + 1;
      }
    }
  }
  cout << (sx + ex) / 2 << " " << (sy + ey) / 2;
}
