#include <bits/stdc++.h>
using namespace std;
string str;
int main() {
  pair<long long, long long> start;
  pair<long long, long long> finish;
  start.first = -1;
  start.second = -1;
  finish.first = -1;
  finish.second = -1;
  long long n, m;
  scanf("%lld %lld", &n, &m);
  for (long long i = 0; i < n; i++) {
    cin >> str;
    for (long long j = 0; j < m; j++) {
      if (str[j] == 'B') {
        if (start.first == -1) {
          start.first = i + 1;
          start.second = j + 1;
        }
        finish.first = i + 1;
        finish.second = j + 1;
      }
    }
  }
  long long x = (start.first + finish.first) / 2;
  long long y = (start.second + finish.second) / 2;
  cout << x << " " << y << endl;
  return 0;
}
