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