#include int solve(int H, int W, int D) { if (H % 2 == 0) { if (H <= D) return 1; } else { if ((long long)H * H + 1 <= (long long)D * D) return 1; } if (W % 2 == 0) { if (W <= D) return 1; } else { if ((long long)W * W + 1 <= (long long)D * D) return 1; } return 0; } int main() { int t, T, H, W, D; scanf("%d", &T); for (t = 1; t <= T; t++) { scanf("%d %d %d", &H, &W, &D); if (solve(H, W, D) != 0) printf("N\n"); else printf("S\n"); } fflush(stdout); return 0; }