#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<char>> table(n, vector<char>(m));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> table[i][j];
    }
  }
  int r1 = -1, r2 = n - 1, c1, c2 = m - 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (table[i][j] == 'B') {
        r1 = i;
        c1 = j;
        break;
      }
    }
    if (r1 != -1) break;
  }
  for (int i = r1; i < n; i++) {
    if (table[i][c1] == 'W') {
      r2 = i;
      break;
    }
  }
  for (int i = c1; i < m; i++) {
    if (table[r1][i] == 'W') {
      c2 = i;
      break;
    }
  }
  cout << 1 + r1 + (r2 - r1) / 2 << " " << 1 + c1 + (c2 - c1) / 2;
}
