#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  char t[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> t[i][j];
    }
  }
  bool check = true;
  int count = 0, r, l;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (t[i][j] == 'B') {
        count++;
        if (check) {
          l = j;
          check = false;
        }
      }
    }
    if (count) {
      r = i + 1 + count / 2;
      l = l + 1 + count / 2;
      cout << r << " " << l;
      return 0;
    }
  }
}
