#include <bits/stdc++.h>
using namespace std;
int n, m, l1 = -1, l2, c1, c2;
char mat[200][200];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> mat[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; ++j)
      if (mat[i][j] == 'B') {
        if (l1 == -1) l1 = i, c1 = j;
        l2 = i, c2 = j;
      }
  cout << (l1 + l2) / 2 + 1 << ' ' << (c1 + c2) / 2 + 1;
}
