#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, c = 0;
  cin >> n >> m;
  vector<int> co, ro;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char s;
      cin >> s;
      if (s == 'B') {
        c += 1;
        co.push_back(j);
        ro.push_back(i);
      }
    }
  }
  int nu = sqrt(c), fco = co[0], fro = ro[0], r1 = (1 + nu) / 2,
      c1 = (1 + nu) / 2, r, cute;
  r = (fro + r1);
  cute = (fco + c1);
  cout << r << " " << cute;
  return 0;
}
