#include <bits/stdc++.h>
using namespace std;
bool myComparison(const pair<long long, long long> &a,
                  const pair<long long, long long> &b) {
  return a.first < b.first;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  char arr[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
    }
  }
  int first_x = 0, first_y = 0;
  int last_x = 0, last_y = 0;
  bool first = false;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == 'B' && !first) {
        first_x = i;
        first_y = j;
        first = true;
      }
      if (arr[i][j] == 'B') {
        last_x = i;
        last_y = j;
      }
    }
  }
  int ans_x = (first_x + last_x) / 2;
  int ans_y = (first_y + last_y) / 2;
  cout << ans_x + 1 << " " << ans_y + 1;
}
