#include <bits/stdc++.h>
using namespace std;
int main() {
  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 count = 0;
  int index_x = -1;
  int index_y = -1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (arr[i][j] == 'B') {
        if (count == 0) {
          index_x = i;
          index_y = j;
        }
        count++;
      }
    }
    if (count > 0) break;
  }
  cout << index_x + 1 + (count / 2) << " " << index_y + 1 + (count / 2);
  return 0;
}
