#include <bits/stdc++.h>
using namespace std;
int n, m, a[2000][2000], ans = -1, mx, my;
char s[200];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> s;
    for (int j = 0; j <= m - 1; j++) {
      if (s[j] == 'W')
        a[i][j + 1] = 0;
      else
        a[i][j + 1] = 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      for (int k = 0; k <= max(n, m); k++) {
        if (i - k < 0 || j - k < 0) continue;
        if (a[i + k][j] + a[i - k][j] + a[i][j - k] + a[i][j + k] +
                a[i - k][j - k] + a[i - k][j + k] + a[i + k][j - k] +
                a[i + k][j + k] ==
            8) {
          if (k > ans) {
            ans = k;
            mx = i, my = j;
          }
        }
      }
    }
  }
  cout << mx << " " << my << endl;
  return 0;
}
