#include <bits/stdc++.h>
using namespace std;
int xorr(int a, int b) { return ((a | b) & (~a | ~b)); }
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  char a[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  int r = 0;
  int c = 0;
  int p = 0;
  int j = 0;
  int ansl;
  int ansr;
  for (int i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        p = 1;
        c = i;
        while (a[i][j] == 'B') {
          r++;
          i++;
        }
        break;
      }
    }
    if (p == 1) {
      ansl = (c + i - 1) / 2;
      ansr = (j + r / 2);
      cout << ansl + 1 << " " << ansr + 1;
      break;
    }
  }
  return 0;
}
