#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433;
const long long M = 1e18;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m, l = -1, r = -1, w = 0, e = 0;
  char ch[300][300];
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cin >> ch[i][j];
      if (ch[i][j] == 'B' && l == -1) {
        l = i;
        r = j;
      }
    }
  }
  for (int i = r; i <= m; i++) {
    if (ch[l][i] != 'B') {
      w = (i + r) / 2;
      break;
    }
  }
  for (int i = l; i <= n; i++) {
    if (ch[i][r] != 'B') {
      e = (i + l) / 2;
      break;
    }
  }
  cout << e + 1 << " " << w + 1;
}
