#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cout.tie(0), cin.tie(0);
  int n, m;
  cin >> n >> m;
  int sx = -1, sy;
  char arr[n][m];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
      if (arr[i][j] == 'B' && sx == -1) {
        sx = i, sy = j;
      }
    }
  int w = sx + 1, h = sy + 1;
  for (int i = sx; i < n; i++) {
    if (arr[i][sy] == 'W') {
      break;
    }
    w = i + 1;
  }
  for (int j = sy; j < m; j++) {
    if (arr[sx][j] == 'W') {
      break;
    }
    h = j + 1;
  }
  cout << (w + sx + 1) / 2 << " " << (h + sy + 1) / 2;
  return 0;
}
