#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  string s[n];
  int rstart, cstart, len = 0, c = 0, p = 0, cend, rend;
  for (long long int i = 0; i < n; i++) {
    cin >> s[i];
    for (int j = 0; j < m && c == 0; j++) {
      if (s[i][j] == 'B') {
        p = 1;
        rstart = i + 1;
        cend = j + 1;
        len++;
      }
    }
    if (p == 1) c = 1;
  }
  rend = rstart + len - 1, cstart = cend - len + 1;
  cout << (rstart + rend) / 2 << " " << (cstart + cend) / 2;
  return 0;
}
