#include <bits/stdc++.h>
using namespace std;
int n, m;
string s[200];
int x, y;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> s[i];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (s[i][j] == 'B') {
        for (int k = j; k < m; ++k) {
          if (s[i][k] == 'W' || k == m - 1) {
            x = (k - j) / 2 + j + 1, y = (k - j) / 2 + i + 1;
            return cout << y << " " << x, 0;
          }
        }
      }
    }
  }
  return 0;
}
