#include <bits/stdc++.h>
using namespace std;

int m, n, r, rr, cc;
int g[636][636];
int v[636][636];
int casenum;

int dir[4][2] = {{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
char eng[4] = {'E', 'N', 'W', 'S'};

int getDistance(int row, int col, int d, int count) {
  if (v[row][col] || g[row][col]) {
		v[row][col] = 0;
    return count;
  }
  v[row][col] = 1;
  int cc = 1;
  int rp = row + dir[d][0];
  int cp = col + dir[d][1];
  if (rp >= 0 && cp >= 0 && rp < m && cp < n && !v[rp][cp] && !g[rp][cp]) {
    int dd = getDistance(rp, cp, d, count + 1);
		v[row][col] = 0;
    return 1 + dd;
  } else {
    for (int i = 1; i < 4; i += 2) {
      rp = row + dir[(d + i) & 3][0];
      cp = col + dir[(d + i) & 3][1];
      if (rp >= 0 && cp >= 0 && rp < m && cp < n && !v[rp][cp] && !g[rp][cp]) {
        cc = max(cc, 1 + getDistance(rp, cp, (d + i) & 3, count + 1));
      }
    }
  }
  v[row][col] = 0;
  return cc;
}

int wrapper(int row, int col, int d, int count) {
	int rp = row + dir[d][0];
  int cp = col + dir[d][1];
  if (rp >= 0 && cp >= 0 && rp < m && cp < n && !v[rp][cp] && !g[rp][cp]) {
		return getDistance(row, col, d, count);
	}
	return -1;
}

int main() {
  ios::sync_with_stdio(0);
  while (cin >> m >> n && m + n > 0) {
    cin >> r;
		memset(g, 0, sizeof (v));
		memset(v, 0, sizeof (v));
		for (int i = 0; i < r; i++) {
      cin >> rr >> cc;
      g[rr][cc] = 1;
    }

    int mmax = 0;
    int tmax = 0;
    int dmax = 0;
    int jmax = 0;
    int imax = 0;
    for (int j = 0; j < m; j++) {
      for (int i = 0; i < n; i++) {
        if (g[j][i] != 1) { 
					memset(v, 0, sizeof (v));
          for (int d = 0; d < 4; d++) {
            tmax = wrapper(j, i, d, 0);
            if (tmax > mmax) {
              mmax = tmax;
              dmax = d;
              jmax = j;
              imax = i;
            }
          }
        }
      }
    }
outtahere:
    cout << "Case " << ++casenum << ": " << mmax << ' ' << jmax << ' ' << imax << ' ' << eng[dmax] << '\n';
    
  }
  return 0;
}