#include <bits/stdc++.h>
using namespace std;
char a[120][120];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, x1 = 0, x2 = 0, y1 = 0, y2 = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> a[i][j];
      if (a[i][j] == 'B' && x1 == 0) x1 = j;
      if (a[i][j] == 'B' && y1 == 0) y1 = i;
      if (x1 != 0 && a[i][j] == 'B') {
        x2 = j;
        y2 = i;
      }
    }
  cout << y1 + (y2 - y1) / 2 << ' ' << x1 + (x2 - x1) / 2;
}
