#include <bits/stdc++.h>
using namespace std;
const int N = 200;
int n, m, c;
char arr[N][N];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  bool M = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
    }
  }
  int st = -1, en = -1, I;
  for (int i = 0; i < n && !M; i++) {
    for (int j = 0; j < m && !M; j++) {
      if (arr[i][j] == 'B') {
        M = 1;
        st = j + 1;
        I = i + 1;
        for (int jj = j; jj < m; jj++) {
          if (arr[i][jj] == 'B') {
            en = jj + 1;
          } else {
            break;
          }
        }
      }
    }
  }
  c = en - st + 1;
  cout << ((c + I) + I) / 2 << " " << (en + st) / 2 << endl;
}
