#include <bits/stdc++.h>
using namespace std;
int n, m;
char s[120][120];
void doit() {
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> s[i][j];
  int cnt = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (s[i][j] == 'B') cnt++;
  int si = 0;
  while (si * si < cnt) si++;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (s[i][j] == 'B') {
        cout << i + 1 + (si) / 2 << " " << j + 1 + (si) / 2 << endl;
        return;
      }
    }
}
int main() {
  int n;
  n = 1;
  for (int i = 1; i <= n; i++) doit();
  return 0;
}
