#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  char c;
  int bx = -1, by = -1, ex, ey;
  for (int i = (1); i != (n + 1); ++i) {
    for (int j = (1); j != (m + 1); ++j) {
      cin >> c;
      if (c == 'B') {
        if (bx < 0) {
          bx = i;
          by = j;
        }
        ex = i;
        ey = j;
      }
    }
  }
  cout << (bx + ex) / 2 << ' ' << (by + ey) / 2 << endl;
  return 0;
}
