#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  char a[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cin >> a[i][j];
  }
  int len = 0, cx = -1, cy = -1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        cx = i;
        cy = j;
        while (i < n && a[i][j] == 'B') {
          len++;
          i++;
        }
        break;
      }
    }
    if (cx != -1 || cy != -1) break;
  }
  cx += len / 2;
  cy += len / 2;
  cout << cx + 1 << " " << cy + 1 << endl;
  return 0;
}
