#include <bits/stdc++.h>
using namespace std;
__attribute__((constructor)) void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
signed main() {
  long long n, m;
  cin >> n >> m;
  bool topFlag = false;
  long long topPoint = 0;
  long long bottomPoint = 0;
  bool leftFlag = false;
  long long leftPoint = 0;
  long long rightPoint = 0;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < m; ++j) {
      char tmp;
      cin >> tmp;
      if (tmp == 'B') {
        if (!topFlag) {
          topFlag = true;
          topPoint = i;
        }
        bottomPoint = i;
        if (!leftFlag) {
          leftFlag = true;
          leftPoint = j;
        }
        rightPoint = j;
      }
    }
  }
  cout << ((topPoint + bottomPoint) / 2) + 1 << " "
       << ((leftPoint + rightPoint) / 2) + 1 << endl;
}
