#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base ::sync_with_stdio(false);
  long long int n, m;
  cin >> n >> m;
  char arr[n + 1][m + 1];
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = 1; j <= m; j++) {
      cin >> arr[i][j];
    }
  }
  long long int c1 = 0, r1 = 0, c2 = 0, r2 = 0;
  long long int flg = 0;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = 1; j <= m; j++) {
      if (arr[i][j] == 'B') {
        c1 = j, r1 = i, c2 = j, r2 = i;
        for (long long int k = j + 1; k <= m; k++) {
          if (arr[i][k] == 'B')
            c2 = k;
          else
            break;
        }
        for (long long int k = i + 1; k <= n; k++) {
          if (arr[k][c1] == 'B')
            r2 = k;
          else
            break;
        }
        flg = 1;
        break;
      }
    }
    if (flg == 1) break;
  }
  cout << (r1 + r2) / 2 << " " << (c1 + c2) / 2 << "\n";
}
