#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x1 = -1, y1 = -1, x2 = -1, y2 = -1;
  string s[120];
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (x1 == y1 && x1 == -1 && s[i][j] == 'B') {
        x1 = i, y1 = j;
      }
      if (s[i][j] == 'B') {
        x2 = i, y2 = j;
      }
    }
  }
  cout << (x1 + x2 + 2) / 2 << ' ' << (y1 + y2 + 2) / 2 << endl;
  return 0;
}
