#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  int min_i = 1000, max_i = -1, min_j = 1000, max_j = -1;
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      char c;
      cin >> c;
      if (c == 'B') {
        min_i = min(min_i, i);
        max_i = max(max_i, i);
        min_j = min(min_j, j);
        max_j = max(max_j, j);
      }
    }
  cout << (min_i + max_i) / 2 << ' ' << (min_j + max_j) / 2 << endl;
  return 0;
}
