#include <bits/stdc++.h>
using namespace std;
int main() {
  bool tr = false, os = true;
  int x, y, w = 0, k, l;
  char **p;
  cin >> x >> y;
  p = new char *[x];
  for (int i = 0; i < x; i++) {
    p[i] = new char[y];
    for (int j = 0; j < y; j++) cin >> p[i][j];
  }
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < y; j++) {
      if (p[i][j] == 'B' && os == true) {
        k = i + 1;
        l = j + 1;
        os = false;
      }
      if (os == false && p[i][j] == 'B') {
        w++;
      }
      if ((os == false && p[i][j + 1] == 'W') || (os == false && j == y - 1))
        break;
    }
    if (os == false) break;
  }
  cout << k + (w / 2) << " " << l + (w / 2);
}
