/** * @FileName a.cpp * @Author kanpurin * @Created 2022.01.07 22:07:58 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int t;cin >> t; for (int _ = 0; _ < t; _++) { ll h,w,d;cin >> h >> w >> d; ll h2 = h/2,w2 = w/2; if (h%2 == 0 && w<=d) { puts("N"); continue; } if (w%2 == 0 && h<=d) { puts("N"); continue; } if (h%2 == 1 && w*w+1<=d*d) { puts("N"); continue; } if (w%2 == 1 && h*h+1<=d*d) { puts("N"); continue; } puts("S"); } return 0; }