#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x, y, z, t;
  bool check1 = false;
  char a[120][120];
  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' && check1 == false) {
        x = i;
        y = j;
        check1 = true;
      }
    }
  }
  check1 = false;
  for (int i = n; i >= 1; i--) {
    for (int j = m; j >= 1; j--) {
      if (a[i][j] == 'B' && check1 == false) {
        z = i;
        t = j;
        check1 = true;
      }
    }
  }
  cout << (x + z) / 2 << " " << (y + t) / 2;
}
