#include <bits/stdc++.h>
using namespace std;
void solve() {
  int i, j, n, m;
  cin >> n >> m;
  char a[n][m];
  int x = 0, y = 0;
  int count = 0;
  for (i = 0; i < n; ++i) {
    for (j = 0; j < m; ++j) {
      cin >> a[i][j];
      if (a[i][j] == 'B') {
        count++;
        x += (i + 1);
        y += (j + 1);
      }
    }
  }
  cout << x / count << " " << y / count;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  for (int it = 1; it <= t; it++) {
    solve();
  }
  return 0;
}
