#include <bits/stdc++.h>
using namespace std;
char ar[200][200];
int n, m, x1 = -1, x2 = -1, y = -1, y2 = -1;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) cin >> ar[i][j];
  }
  for (int i = 1; i <= n && x1 == -1; i++) {
    for (int j = 1; j <= m && x1 == -1; j++) {
      if (ar[i][j] == 'B') {
        x1 = i;
        y = j;
      }
    }
  }
  for (int i = n; i >= 1 && x2 == -1; i--) {
    for (int j = m; j >= 1 && x2 == -1; j--) {
      if (ar[i][j] == 'B') {
        x2 = i;
        y2 = j;
      }
    }
  }
  cout << x1 + (x2 - x1 + 1) / 2 << " " << y2 - (y2 - y + 1) / 2;
  return 0;
}
