#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, sum1 = 0, sum2 = 0, cnt = 0;
  cin >> n >> m;
  string grid[n];
  for (int i = 0; i < n; i++) cin >> grid[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (grid[i][j] == 'B') {
        cnt++;
        sum1 += (i + 1);
        sum2 += (j + 1);
      }
    }
  }
  cout << sum1 / cnt << " " << sum2 / cnt << endl;
  return 0;
}
