#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, i, j;
  cin >> n >> m;
  char ch[n][m];
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) cin >> ch[i][j];
  }
  long long int pos1, pos2, c = 0, x, y;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (ch[i][j] == 'B') {
        if (c == 0) {
          pos1 = i;
          pos2 = j;
        }
        c++;
      }
    }
    if (c == 1) {
      cout << pos1 + 1 << " " << pos2 + 1 << endl;
      break;
    } else if (c > 1) {
      x = (c / 2) + pos1 + 1;
      y = (c / 2) + pos2 + 1;
      cout << x << " " << y << endl;
      break;
    }
  }
}
