#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, x1, y1, x2, y2, count = 0;
  cin >> n >> m;
  vector<char> v[n];
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      char x;
      cin >> x;
      v[i].push_back(x);
      if (count == 0 && x == 'B') {
        x1 = i + 1, y1 = j + 1;
        count++;
      }
      if (count > 0 && x == 'B') {
        x2 = i + 1, y2 = j + 1;
      }
    }
  }
  cout << (x1 + x2) / 2 << " " << (y1 + y2) / 2;
}
