#include <bits/stdc++.h>
using namespace std;
string t[150];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> t[i];
  int s = -1;
  int e = -1;
  int l = -1;
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (t[i][j] == 'B') {
        if (s == -1) {
          s = j + 1;
          l = i + 1;
          e = j + 1;
        } else {
          e = j + 1;
        }
      }
    }
    if (s != -1) break;
  }
  cout << l + (e - s) / 2 << " " << s + (e - s) / 2 << endl;
  return 0;
}
