#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, c;
  string wall[125];
  int x, y;
  bool t = false;
  cin >> r >> c;
  for (int i = 0; i < r; i++) {
    cin >> wall[i];
  }
  for (int i = 0; i < r; i++) {
    if (t) break;
    for (int j = 0; j < c; j++) {
      if (t) break;
      if (wall[i][j] == 'B') {
        x = i;
        y = j;
        while (wall[i + 1][j] == 'B') {
          i++;
        }
        while (wall[i][j + 1] == 'B') {
          j++;
        }
        x = x + (i - x) / 2;
        y = y + (j - y) / 2;
        cout << x + 1 << ' ' << y + 1 << '\n';
        t = true;
      }
    }
  }
  return 0;
}
