#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int si = 0, ci = 0, sj = 0, cj = 0;
  for (int i = 1; i <= n; i++) {
    string tmp;
    cin >> tmp;
    for (int j = 1; j <= m; j++)
      if (tmp[j - 1] == 'B') si += i, ci++, sj += j, cj++;
  }
  cout << si / ci << " " << sj / cj << endl;
}
