#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int rmin, rmax, cmin, cmax;
  rmin = cmin = 116;
  rmax = cmax = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      if (c == 'B') {
        rmin = min(rmin, i);
        rmax = max(rmax, i);
        cmin = min(cmin, j);
        cmax = max(cmax, j);
      }
    }
  }
  cout << (rmin + rmax) / 2 + 1 << " " << (cmin + cmax) / 2 + 1 << "\n";
}
