#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  char c;
  int x1, y1, x2, y2;
  x1 = n;
  y1 = m;
  x2 = 1;
  y2 = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> c;
      if (c == 'B') {
        if (x1 > i || y1 > j) {
          x1 = i;
          y1 = j;
        }
        if (x2 < i || y2 < j) {
          x2 = i;
          y2 = j;
        }
      }
    }
  }
  cout << (x1 + x2) / 2 << ' ' << (y1 + y2) / 2 << endl;
}
