#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, cnt = 0, row, col;
  cin >> n >> m;
  char a[n][m];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      char c;
      cin >> c;
      a[i][j] = c;
      if (c == 'B') {
        cnt++;
        row = i;
        col = j;
      }
    }
  }
  row++, col++;
  cout << row - (long long)sqrt(cnt) / 2 << ' '
       << col - (long long)sqrt(cnt) / 2;
  return 0;
}
