#include <bits/stdc++.h>
using namespace std;
const int N = 116;
char s[N][N];
int a[N][N], n, m;
int sum[N][N];
int stx, sty, enx, eny;
int nowmax;
bool vis;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == 'W')
        a[i][j] = 0;
      else
        a[i][j] = 1;
      sum[i][j] = a[i][j] + sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1];
      if (sum[i][j] == 1 && !vis) stx = i, sty = j, vis = 1;
      if (sum[i][j] && sum[i][j] > nowmax) enx = i, eny = j;
      nowmax = max(nowmax, sum[i][j]);
    }
  }
  cout << (stx + enx) / 2 << " " << (sty + eny) / 2 << endl;
  return 0;
}
