#include <bits/stdc++.h>
using namespace std;
const long long oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-6;
const long double PI = acos(-1.0);
const int INT_INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const long long maxN = 2e9 + 100;
const int N = 1e6 + 10;
const int M = 2e5 + 10;
int a[M];
long long t[20];
unordered_map<int, int> maps[12];
int getlen(long long x) {
  int len = 0;
  while (x > 0) {
    x /= 10;
    len++;
  }
  return len;
}
char s[120];
int main() {
  if (fopen("c.txt", "r")) {
    freopen("c.txt", "r", stdin);
  }
  int n, m;
  while (~scanf("%d %d", &n, &m)) {
    int minx = 2000, miny = 2000, manx = -1, many = -1;
    for (int i = 0; i < n; ++i) {
      scanf("%s", s);
      for (int j = 0; j < m; ++j) {
        if (s[j] == 'B') {
          minx = min(minx, i + 1);
          miny = min(miny, j + 1);
          manx = max(manx, i + 1);
          many = max(many, j + 1);
        }
      }
    }
    printf("%d %d\n", minx + manx >> 1, miny + many >> 1);
  }
  return 0;
}
