#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  char cr;
  int a = -1, b, c, d;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> cr;
      if (cr == 'B' && a == -1) {
        a = i;
        b = j;
      }
      if (cr == 'B') {
        c = i;
        d = j;
      }
    }
  }
  cout << (a + c) / 2 + 1 << ' ' << (b + d) / 2 + 1;
}
