#include <bits/stdc++.h>
using namespace std;
int n, m;
string str[205];
int check(int pos1, int pos2, int len) {
  for (int i = pos1; i < pos1 + len; i++)
    for (int j = pos2; j < pos2 + len; j++)
      if (str[i][j] != 'B') return 0;
  return len;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> str[i];
  int ans = 0;
  int x1 = 0, x2 = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (str[i][j] == 'B') {
        for (int k = 1; k + j <= m; k += 2) {
          int x = check(i, j, k);
          if (ans < x) {
            ans = x, x1 = i, x2 = j;
          }
        }
      }
    }
  }
  cout << x1 + ans / 2 + 1 << " " << x2 + ans / 2 + 1 << endl;
}
