#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  int rowB = 0, colp = 0, rowp = 0, stop = 0;
  cin >> n >> m;
  char ma[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> ma[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    if (stop == -1) break;
    for (int j = 0; j < m; j++) {
      if (ma[i][j] == 'B') {
        rowB++;
        stop = -1;
        if (rowp == 0) {
          rowp = j + 1;
          colp = i + 1;
        }
      }
    }
  }
  if (rowB == 1) {
    cout << colp << " " << rowp;
  } else {
    cout << colp + (rowB / 2) << " " << rowp + (rowB / 2);
  }
}
