#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  bool status = true;
  pair<int, int> u = {-1, -1};
  pair<int, int> v = {-1, -1};
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (int j = 1; j <= m; j++) {
      if (s[j - 1] == 'B') {
        if (status) {
          status = false;
          u = {i, j};
        }
        v = {i, j};
      }
    }
  }
  int y = ((v.first - u.first + 1) / 2) + u.first;
  int x = ((v.second - u.second + 1) / 2) + u.second;
  cout << y << " " << x << '\n';
  return 0;
}
