#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  char a[n][m];
  int r1, c1, r2, c2;
  int s = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
      if (a[i][j] == 'B') {
        s++;
        r2 = i + 1;
        c2 = j + 1;
      }
    }
  }
  if (s == 1)
    cout << r2 << " " << c2 << endl;
  else {
    int i, j;
    for (i = 0; i < n; i++) {
      for (j = 0; j < m; j++) {
        if (a[i][j] == 'B') {
          goto A;
        }
      }
    }
  A:
    r1 = i + 1;
    c1 = j + 1;
    cout << (r1 + r2) / 2 << " " << (c1 + c2) / 2 << endl;
  }
  return 0;
}
