#include <bits/stdc++.h>
using namespace std;
long long n;
int a[200002];
char cc[106][106];
int main() {
  cin >> n;
  int k;
  cin >> k;
  int fs = 123;
  int fa = -1;
  int fi = 1232;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < k; j++) {
      char c;
      cin >> c;
      if (c == 'B') {
        fi = min(fi, i);
        fs = min(fs, j);
        fa = max(fs, j);
      }
    }
  }
  int sc = (fa - fs) / 2;
  cout << fi + sc + 1 << " " << 1 + fs + sc;
  cin >> n;
}
