#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long memo[1000000];
long long aa = 0;
void solve() {
  cin >> n >> m;
  int If, Jf, ie, je;
  char arr[n][m];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; j++) cin >> arr[i][j];
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == 'B') {
        If = i;
        Jf = j;
        break;
      }
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    for (int j = m - 1; j >= 0; j--) {
      if (arr[i][j] == 'B') {
        ie = i;
        je = j;
        break;
      }
    }
  }
  cout << (If + ie + 2) / 2 << " " << (Jf + je + 2) / 2 << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  solve();
  return 0;
}
