#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef long double LD; typedef vector VI; typedef pair PII; typedef vector VPII; #define MP make_pair #define ST first #define ND second #define PB push_back #define FOR(i,a,b) for( int i=(a); i<=(b); ++i) #define FORD(i,a,b) for( int i=(a); i>=(b); --i) #define REP(i,n) for(int i=0; i<(n); ++i) #define ALL(X) (X).begin(),(X).end() #define SIZE(X) (int)(X).size() #define FOREACH(it,X) for(__typeof((X).begin()) it=(X).begin(); it!=(X).end(); ++it) #define MXN 1100 PII wsp[MXN]; int tab[MXN]; int neigh[MXN][2]; int n; int nextpos(int cur, int prev) { if (prev == neigh[cur][0]) return neigh[cur][1]; return neigh[cur][0]; } bool cmpx(int o, int p) { return wsp[o].first < wsp[p].first || wsp[o].first == wsp[p].first && wsp[o].second < wsp[p].second; } bool cmpy(int o, int p) { return wsp[o].second < wsp[p].second || wsp[o].second == wsp[p].second && wsp[o].first < wsp[p].first; } int main() { scanf("%i", &n); while (n) { for (int a = 0; a < n; a++ ) { scanf("%i%i", &wsp[a].first, &wsp[a].second); tab[a] = a; } sort(tab, tab+n, cmpx); for (int a = 0; a < n; a += 2 ) { neigh[tab[a]][0] = tab[a+1]; neigh[tab[a+1]][0] = tab[a]; } sort(tab, tab+n, cmpy); for (int a = 0; a < n; a += 2 ) { neigh[tab[a]][1] = tab[a+1]; neigh[tab[a+1]][1] = tab[a]; } LL area = 0; int prev = -1; int cur = 0; do { int next = nextpos(cur, prev); area += (LL)wsp[cur].first * (LL)wsp[next].second - (LL)wsp[cur].second * (LL)wsp[next].first; prev = cur; cur = next; } while (cur != 0); if (area > 0) swap(neigh[0][0], neigh[0][1]); prev = -1; cur = 0; do { int next = nextpos(cur, prev); if (wsp[next].first == wsp[cur].first && wsp[next].second < wsp[cur].second) printf("S"); if (wsp[next].first == wsp[cur].first && wsp[next].second > wsp[cur].second) printf("N"); if (wsp[next].first < wsp[cur].first && wsp[next].second == wsp[cur].second) printf("W"); if (wsp[next].first > wsp[cur].first && wsp[next].second == wsp[cur].second) printf("E"); prev = cur; cur = next; } while (cur != 0); printf("\n"); scanf("%i", &n); } return 0; }