#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k = 0, temp1[100000], temp2[100000], tmp;
  cin >> n >> m;
  char s[n][m];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> s[i][j];
      if (s[i][j] == 'B') {
        k++;
        temp1[k] = i + 1;
        temp2[k] = j + 1;
      }
    }
  }
  cout << (temp1[1] + temp1[k]) / 2 << " " << (temp2[1] + temp2[k]) / 2;
}
