#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, nbr1 = 0, val1, val2, ind, ind2;
  cin >> n >> m;
  string s;
  bool res, res1 = true;
  for (int i = 0; i < n; i++) {
    cin >> s;
    res = true;
    for (int j = 0; j < m; j++) {
      if (s[j] == 'B') nbr1++;
      if (s[j] == 'B' && res) {
        ind = j;
        res = false;
      }
    }
    if (nbr1 != 0 && res1) {
      ind2 = i;
      res1 = false;
    }
  }
  nbr1 = (int)sqrt(nbr1);
  val1 = 1 + ind2 + nbr1 / 2;
  val2 = 1 + ind + nbr1 / 2;
  cout << val1 << " " << val2;
  return 0;
}
