#include <bits/stdc++.h>
using namespace std;
int const N = 15000005, md = 998244353;
void setup();
int main() {
  setup();
  int a, b, n = 0, m = 0, f = 0, r, c = -1;
  string s;
  cin >> a >> b;
  for (int x = 0; x < a; x++) {
    cin >> s;
    if (!n) {
      n = count(s.begin(), s.end(), 'B');
    }
    for (int y = 0; y < b; y++) {
      if (!f && s[y] == 'B') {
        f = 1;
        r = x;
        c = y;
      }
      if (c != -1) {
        if (s[c] == 'B' && y == c) {
          m++;
        }
      }
    }
  }
  cout << (r + n / 2 + 1) << " " << (c + m / 2 + 1);
  return 0;
}
void setup() { ios_base::sync_with_stdio(false); }
