#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323;
const double EPS = 1e-12;
const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, x, y, xx, yy;
  char ch;
  bool flag = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> ch;
      if (ch == 'B' && flag == 0) {
        x = i, y = j;
        flag = 1;
      }
      if (ch == 'B') {
        xx = i, yy = j;
      }
    }
  }
  long long int len = xx - x + 1;
  long long int bre = yy - y + 1;
  cout << x - 1 + ((len + 1) / 2) << " " << y - 1 + ((bre + 1) / 2);
  return 0;
}
