#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> 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 = -1, l = m + 1, d = -1, u = n + 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (a[i][j] == 'B') {
        if (u > i) u = i;
        if (d < i) d = i;
        if (l > j) l = j;
        if (r < j) r = j;
      }
  cout << (u + d) / 2 + 1 << " " << (r + l) / 2 + 1 << endl;
}
