#include <bits/stdc++.h>
using namespace std;
int n, m, c, indi1, indi2, indj1, indj2;
bool ok;
char a[116][116];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B' && ok == 0) indi1 = i + 1, indj1 = j + 1, ok = 1;
      if (a[i][j] == 'B') indi2 = i + 1, indj2 = j + 1;
    }
  }
  cout << (indi1 + indi2) / 2 << " " << (indj1 + indj2) / 2;
}
