#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, n, m;
  double k = 0;
  char s[115 * 115];
  cin >> x >> y;
  for (int i = 0; i < x * y; i++) {
    cin >> s[i];
    if (s[i] == 'B' && k == 0) {
      n = i + 1;
    }
    if (s[i] == 'B') {
      k++;
    }
  }
  m = n % y;
  if (m == 0) {
    m = y;
  }
  n = n / y;
  if (m > 0 && m != y) {
    n++;
  }
  k = sqrt(k);
  x = n + (k / 2);
  y = m + (k / 2);
  cout << x << "   " << y << endl;
}
