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