#include <bits/stdc++.h>
using namespace std;
char a[120][120];
int main() {
  int n, m, x, y, count = 0, flag = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        flag = 1;
        x = i;
        y = j;
        count = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  for (int i = y; i < m; i++) {
    if (a[x][i] == 'B') count++;
  }
  cout << x + count / 2 << " " << y + count / 2 << endl;
  return 0;
}
