#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int i, j, r, c;
  int minr = 1000, minc = 1000, maxr = 0, maxc = 0;
  cin >> r >> c;
  char a[r][c];
  for (i = 0; i < r; i++) {
    for (j = 0; j < c; j++) {
      cin >> a[i][j];
    }
  }
  for (i = 0; i < r; i++) {
    for (j = 0; j < c; j++) {
      if (a[i][j] == 'B') {
        minr = min(minr, i);
        minc = min(minc, j);
        maxr = max(maxr, i);
        maxc = max(maxc, j);
      }
    }
  }
  cout << (minr + maxr) / 2 + 1 << " " << (minc + maxc) / 2 + 1;
  return 0;
}
