#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, c = 0, j, pos, f = 0;
  cin >> n >> m;
  string s;
  for (i = 0; i < n; i++) {
    cin >> s;
    if (f == 1) continue;
    pos = s.find("B");
    while (pos >= 0) {
      c++;
      j = i;
      f = 1;
      pos = s.find("B", pos + 1);
    }
    pos = s.find("B") + (c + 1) / 2;
  }
  j += (c + 1) / 2;
  cout << j << " " << pos;
  return 0;
}
