#include <bits/stdc++.h>
using namespace std;
void run() {
  long long n, m, s = 1, q = 0;
  cin >> n >> m;
  char a[n][m];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) cin >> a[i][j];
  for (int i = 0; i < n; ++i) {
    q = 0;
    for (int j = 0; j < m; ++j) {
      if (a[i][j] == 'B')
        q++;
      else
        q = 0;
      s = max(s, q);
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (a[i][j] == 'B') {
        cout << i + 1 + (s / 2) << " " << j + 1 + (s / 2);
        return;
      }
    }
  }
  cout << "ERR";
  return;
}
int main() {
  cin.tie(nullptr);
  cout.tie(nullptr);
  ios_base::sync_with_stdio(false);
  run();
  return 0;
}
