#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, z = 0, sum = 0, total = 0;
  char st[120][120];
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> st[i][j];
      if (st[i][j] == 'B') {
        sum += i;
        total += j;
        z++;
      }
    }
  }
  cout << sum / z << " " << total / z;
  return 0;
}
