#include <bits/stdc++.h>
const int N = 1e5 + 7;
const int INF = 1e9 + 7;
using namespace std;
int n, i, m;
string s[1007];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> s[i];
  int lu = -1, ld, ldj, luj;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) {
      if (s[i][j] == 'B') {
        if (lu == -1) {
          lu = i;
          luj = j;
        }
        ld = i;
        ldj = j;
      }
    }
  cout << lu + (ld - lu) / 2 + 1 << ' ' << luj + (ldj - luj) / 2 + 1;
}
