#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int LINF = 0x3f3f3f3f3f3f3f3f;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int n, m;
  cin >> n >> m;
  char c;
  int x1 = INF;
  int y1 = INF;
  int l = 0;
  for (int i = 1; i <= n && l == 0; i++)
    for (int j = 1; j <= m; j++) {
      cin >> c;
      if (c == 'B') l++, x1 = i, amin(y1, j);
    }
  cout << x1 + l / 2 << ' ' << y1 + l / 2;
}
