#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  string s[200];
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  pair<int, int> mn = {n, m}, mx = {0, 0};
  for (int i = 0; i < n; i++) {
    for (int l = 0; l < m; l++) {
      if (s[i][l] == 'B') {
        mn = min(mn, {i, l});
        mx = max(mx, {i, l});
      }
    }
  }
  int x = (mx.first + mn.first) / 2;
  int y = (mx.second + mn.second) / 2;
  cout << x + 1 << " " << y + 1 << endl;
  return 0;
}
