#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, l = 200, r = 0, t = 200, b = 0;
  char a[200][200];
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> a[i][j];
      if (a[i][j] == 'B') {
        l = min(l, j);
        r = max(r, j);
        t = min(t, i);
        b = max(b, i);
      }
    }
  cout << (b - t + 1) / 2 + t << ' ' << l + (r - l + 1) / 2 << endl;
}
