#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, sum = 0, count = 0, m, flag = 0, ans = 0, k, x, y;
  cin >> n >> m;
  string a[2000];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        if (flag == 0) {
          flag = 1;
          x = i;
          y = j;
        }
        ans++;
      }
    }
    if (flag == 1) {
      break;
    }
  }
  cout << x + ans / 2 + 1 << " " << y + ans / 2 + 1;
  return 0;
}
