#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, t, tt, a[110], sb = 0, so = 0, ub = 0, uo = 0;
  char s[116][116];
  cin >> n >> m;
  for (t = 1; t <= n; t++)
    for (tt = 1; tt <= m; tt++) cin >> s[t][tt];
  for (t = 1; t <= n; t++)
    for (tt = 0; tt <= m; tt++) {
      if (s[t][tt] == 'B' && sb == 0) {
        sb = t;
        ub = tt;
      }
      if (s[t][tt] == 'B' && sb > 0) {
        so = t;
        uo = tt;
      }
    }
  cout << (so + sb) / 2 << " " << (uo + ub) / 2 << endl;
  return 0;
}
