#include <bits/stdc++.h>
using namespace std;
int main() {
  char c[120][120];
  long long int n, m, i, j, u;
  scanf("%lld%lld", &n, &m);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) cin >> c[i][j];
  }
  bool f = 0;
  long long int a = 0, p = 0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      if (c[i][j] == 'B') {
        a = i;
        p = j;
        f = 1;
        break;
      }
    }
    if (f) break;
  }
  f = 0;
  long long int b = 0;
  for (i = n; i >= 1; i--) {
    for (j = m; j >= 1; j--) {
      if (c[i][j] == 'B') {
        b = i;
        u = j;
        f = 1;
        break;
      }
    }
    if (f) break;
  }
  int sum, sum1;
  sum = (a + b) / 2;
  sum1 = (p + u) / 2;
  cout << sum << " " << sum1;
}
