#include <bits/stdc++.h>
using namespace std;
int main() {
  bool check = false;
  long long x, y;
  cin >> x >> y;
  long long mx, my, l = 0;
  for (int i = 1; i <= x; i++) {
    for (int j = 1; j <= y; j++) {
      char a;
      cin >> a;
      if (!check && a == 'B') {
        mx = i;
        my = j;
        l++;
        check = true;
      } else if (check && a == 'B') {
        l++;
      }
    }
    if (check) break;
  }
  cout << mx + (l - 1) / 2 << " " << my + (l - 1) / 2 << endl;
  return 0;
}
