#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, t, ans;
char c[117][117];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> c[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (c[i][j] == 'B' && t == 0) {
        t = 1;
        x = i;
        y = j;
        i = n + 1;
        j = m + 1;
        break;
      }
    }
  }
  for (int j = y + 1; j <= m; j++) {
    if (c[x][j] == 'B') ans++;
  }
  cout << x + ans / 2 + ans % 2 << " " << y + ans / 2 + ans % 2;
  return 0;
}
