#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string a[150];
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  int mxh = 0, mxw = 0, mnh = INT_MAX, mnw = INT_MAX;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        if (i >= mxh && j >= mxw) {
          mxh = i;
          mxw = j;
        }
        if (i <= mnh && j <= mnw) {
          mnh = i;
          mnw = j;
        }
      }
    }
  }
  cout << (mnh + mxh + 2) / 2 << " " << (mxw + mnw + 2) / 2 << endl;
  return 0;
}
