#include <bits/stdc++.h>
using namespace std;
int n, m;
void output() {
  int maxx = 0, minx = 10000;
  int maxy = 0, miny = 10000;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      char c;
      cin >> c;
      if (c == 'B') {
        maxx = max(maxx, i), minx = min(minx, i);
        maxy = max(maxy, j), miny = min(miny, j);
      }
    }
  cout << (minx + maxx) / 2;
  cout << ' ' << (maxy + miny) / 2 << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  output();
  return 0;
}
