#include <bits/stdc++.h>
#pragma GCC optimize("omit-frame-pointer")
#pragma GCC optimize("unroll-loops")
using namespace std;
vector<long long> v[300000];
long long x1[300000];
long long x2[300000];
long long n, m, q;
long long a, b, c, d;
char k;
int sum1, sum2, kol1, kol2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  srand(time(0));
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> k;
      if (k == 'B') kol1++, sum1 += i, kol2++, sum2 += j;
    }
  }
  cout << sum1 / kol1 << " " << sum2 / kol2 << endl;
  return 0;
}
