#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  char a[n + 10][m + 10];
  vector<pair<int, int>> v;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> a[i][j];
      if (a[i][j] == 'B') {
        v.push_back(make_pair(i, j));
      }
    }
  }
  int sz = v.size();
  if (sz == 1)
    cout << v[0].first << " " << v[0].second << endl;
  else {
    int k = (sz / 2);
    cout << v[k].first << " " << v[k].second << endl;
  }
  return 0;
}
