#include <bits/stdc++.h>
const int MAX = 1e5;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  char arr[n + 1][m + 1];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> arr[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (arr[i][j] == 'B') {
        int len = 1;
        for (int k = j + 1; k <= m; k++) {
          if (arr[i][k] == 'B') len++;
        }
        int row = j + (len / 2);
        len = 1;
        for (int k = i + 1; k <= n; k++) {
          if (arr[k][j] == 'B') len++;
        }
        cout << i + (len / 2) << " " << row << '\n';
        return 0;
      }
    }
  }
}
