#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void in(T &x) {
  x = 0;
  int fl = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') fl = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  x *= fl;
}
template <typename T>
void out(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x / 10) out(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void outln(T x) {
  out(x);
  putchar(10);
}
template <typename T>
inline void outsp(T x) {
  out(x);
  putchar(' ');
}
template <typename T>
inline T gcd(T a, T b) {
  T t;
  if (a > b) {
    while (b) {
      t = b;
      b = a % b;
      a = t;
    }
    return a;
  } else {
    while (a) {
      t = a;
      a = b % a;
      b = t;
    }
    return b;
  }
}
template <typename T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
const int N = 120;
int n, m, u = 1e9, d, l = 1e9, r;
char g[N][N];
int main() {
  in(n);
  in(m);
  for (int i = (1); i <= (n); i++) {
    scanf("%s", g[i] + 1);
    for (int j = (1); j <= (m); j++)
      if (g[i][j] == 'B')
        u = min(u, i), l = min(l, j), d = max(d, i), r = max(r, j);
  }
  outsp((u + d) >> 1);
  outln((l + r) >> 1);
  return 0;
}
