#include <bits/stdc++.h>
using namespace std;
void files() {
  freopen("1.in", "r", stdin);
  freopen("1.out", "w", stdout);
  return;
}
long long bin(long long base, long long pow, long long m) {
  base %= m;
  long long ans = 1;
  while (pow) {
    if (pow & 1) ans = ans * base % m;
    base = base * base % m;
    pow >>= 1;
  }
  return ans;
}
const int MXN = 1e5 + 5;
const long long MOD = 1e9 + 7;
int x[MXN];
int y[MXN];
void sol() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  string s[n];
  for (int i = 0; i < n; ++i) {
    cin >> s[i];
  }
  int idx = -1, idy = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (s[i][j] == 'B') {
        idx = i;
        idy = j;
        break;
      }
    }
    if (idx != -1) break;
  }
  int ind = idx;
  while (ind < n && s[ind][idy] == 'B') ++ind;
  cout << (ind + idx) / 2 + 1;
  printf(" ");
  ind = idy;
  while (ind < m && s[idx][ind] == 'B') ++ind;
  cout << (ind + idy) / 2 + 1;
  printf("\n");
}
int main() {
  int tcase = 1;
  while (tcase--) {
    sol();
  }
}
