#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e5 + 5;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long a[N];
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, s1 = 0, s2 = 0, n1 = 0, n2 = 0;
  cin >> n >> m;
  char s[n + 1][m + 1];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> s[i][j];
      if (!s1 && s[i][j] == 'B') {
        s1 = i;
        n1 = j;
      }
      if (s1 != 0 && s[i][j] == 'B') {
        s2 = i;
        n2 = j;
      }
    }
  }
  cout << ((s2 + s1) / 2) << " " << ((n2 + n1) / 2) << endl;
  return 0;
}
