#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1 << 61;
int main() {
  long long n, m;
  cin >> n >> m;
  pair<long long, long long> first, last;
  bool was = false;
  vector<vector<char>> v(n, vector<char>(m));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> v[i][j];
      if (v[i][j] == 'B' && !was) {
        first = {i, j};
        was = true;
      }
      if (v[i][j] == 'B') {
        last = {i, j};
      }
    }
  }
  cout << (first.first + last.first) / 2 + 1 << " "
       << (first.second + last.second) / 2 + 1;
  return 0;
}
