#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<char>> vec(n, vector<char>(m));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> vec[i][j];
    }
  }
  int minx = 116, miny = 116, maxx = -1, maxy = -1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (vec[i][j] == 'B') {
        minx = min(minx, j);
        miny = min(miny, i);
        maxx = max(maxx, j);
        maxy = max(maxy, i);
      }
    }
  }
  cout << (miny + maxy) / 2 + 1 << " " << (minx + maxx) / 2 + 1 << endl;
  return 0;
}
