#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x = 0, y = 0, r = 0, c = 0;
  cin >> n >> m;
  char s[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> s[i][j];
      if (x == 0 && s[i][j] == 'B') {
        x = i + 1;
        y = j + 1;
      }
    }
  }
  while (r + x <= n && s[r + x - 1][y - 1] == 'B') r++;
  while (y + c <= m && s[x - 1][y - 1 + c] == 'B') c++;
  cout << (x + r / 2) << ' ' << (y + c / 2);
  return 0;
}
