#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n;
  cin >> m;
  string table[n];
  int side_length = 0;
  int first_time = 0;
  int first_x = 0;
  int first_y = 0;
  for (int i = 0; i < n; i++) {
    cin >> table[i];
    for (int a = 0; a < m; a++) {
      if (table[i][a] == 'B') {
        if (first_time == 0) {
          first_time = 1;
          first_x = i;
          first_y = a;
        }
        side_length++;
      }
    }
  }
  side_length = pow(side_length, 0.5);
  cout << first_x + side_length / 2 + 1 << " " << first_y + side_length / 2 + 1
       << "\n";
  return 0;
}
