#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("fast-math")
using namespace std;
template <typename T>
void uin(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
void uax(T &a, T b) {
  if (b > a) a = b;
}
const long long maxn = 200;
long long a[maxn][maxn];
long long n, m;
void solve() {
  cin >> n >> m;
  for (long long i = 1; i <= (long long)n; ++i) {
    for (long long j = 1; j <= (long long)m; ++j) {
      char c;
      cin >> c;
      if (c == 'B') a[i][j] = 1;
    }
  }
  long long sx = 0, sy, fx, fy;
  for (long long i = 1; i <= (long long)n; ++i) {
    for (long long j = 1; j <= (long long)m; ++j) {
      if (a[i][j]) {
        sx = i, sy = j;
        break;
      }
    }
    if (sx) break;
  }
  for (long long i = 1; i <= (long long)n; ++i) {
    for (long long j = 1; j <= (long long)m; ++j) {
      if (a[i][j]) {
        fx = i, fy = j;
      }
    }
  }
  cout << (sx + fx) / 2 << " " << (sy + fy) / 2 << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
