#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; ll f(ll H, ll W){ ll a, b; a = W*W + (H % 2 == 1); b = H*H + (W % 2 == 1); return min(a, b); } int main(){ int T; cin >> T; while(T){ T--; ll H, W, D, F; cin >> H >> W >> D; F = f(H, W); cout << (F <= D*D ? "N" : "S") << endl; } return 0; }