#include <bits/stdc++.h>
using namespace std;
void solve() {
  int i, j, tb = 0, q = 0, w = 0;
  cin >> i >> j;
  vector<string> v;
  string s;
  for (int x = 0; x < i; x++) {
    cin >> s;
    v.push_back(s);
  }
  for (int x = 0; x < i; x++) {
    for (int y = 0; y < j; y++) {
      if (v[x][y] == 'B') {
        if (q == 0 && w == 0) {
          q = x + 1;
          w = y + 1;
        }
        tb++;
      }
    }
  }
  tb = sqrt(tb) / 2;
  cout << tb + q << " " << tb + w;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
