#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  string str[120];
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> str[i];
  }
  int rb, lb;
  int rr, lr;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (str[i][j] == 'B' && flag == 0) {
        flag = 1;
        rb = i;
        lb = j;
      }
      if (str[i][j] == 'B') {
        rr = i;
        lr = j;
      }
    }
  }
  cout << (rb + rr) / 2 + 1 << " " << (lb + lr) / 2 + 1 << endl;
  return 0;
}
