#include <bits/stdc++.h>
using namespace std;
const int N = 222;
int n, m;
char s[N][N];
int x1, x2, jhtdrs, jnhtdrseadw;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", s[i]);
  x1 = n;
  x2 = 0;
  jhtdrs = m;
  jnhtdrseadw = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (s[i][j] == 'W') continue;
      x1 = min(x1, i);
      x2 = max(x2, i);
      jhtdrs = min(jhtdrs, j);
      jnhtdrseadw = max(jnhtdrseadw, j);
    }
  printf("%d %d\n", 1 + (x1 + x2) / 2, 1 + (jhtdrs + jnhtdrseadw) / 2);
  return 0;
}
