#include <bits/stdc++.h>
using namespace std;
int main() {
  long long m, n;
  cin >> n >> m;
  char a[n][m];
  long long cnt = 0;
  long long indexx = -1, indexy = -1;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        if (indexx == -1 && indexy == -1) {
          indexx = i;
          indexy = j;
        }
        cnt++;
      }
    }
    if (indexx != -1 && indexy != -1) break;
  }
  cout << indexx + cnt / 2 + 1 << " " << indexy + cnt / 2 + 1;
}
