#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  string s;
  int ii = 0;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (int j = 0; j < m; ++j) {
      if (s[j] == 'B') {
        int r = j;
        while (r != m && s[r] == 'B') {
          ++r;
        }
        int sh = (r - j) / 2 + 1;
        cout << ii + sh << ' ' << j + sh << endl;
        return 0;
      }
    }
    ++ii;
  }
  return 0;
}
