#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<string> a(n);
  for (auto &x : a) cin >> x;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 'B') {
        int x = i, y = j;
        for (; x < n; x++)
          if (a[x][j] == 'W') break;
        for (; y < m; y++)
          if (a[i][y] == 'W') break;
        cout << (x + i + 1) / 2 << " " << (y + j + 1) / 2 << endl;
        return 0;
      }
    }
  }
}
