#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  int n, left = 1e9, right = -1e9, down = -1e9, up = 1e9, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int j = 0; j < m; j++) {
      if (s[j] == 'B') {
        left = min(left, j);
        right = max(right, j);
        up = min(up, i);
        down = max(down, i);
      }
    }
  }
  cout << 1 + down + (up - down) / 2 << " " << 1 + left + (right - left) / 2
       << endl;
  return 0;
}
