#include <bits/stdc++.h>
using namespace std;
int main() {
  int row, col;
  cin >> row >> col;
  string s;
  vector<pair<int, int>> v;
  for (int i = 0; i < row; i++) {
    cin >> s;
    for (int j = 0; j < col; j++) {
      if (s[j] == 'B') {
        pair<int, int> p;
        p.first = i;
        p.second = j;
        v.push_back(p);
      }
    }
  }
  row = v[0].first + v[v.size() - 1].first + 2;
  col = v[0].second + v[v.size() - 1].second + 2;
  row = row / 2;
  col = col / 2;
  cout << row << " " << col;
}
