#include using namespace std; #include #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i,n) for (int i = 0; i < (n); ++i) typedef long long ll; typedef unsigned long long ull; using P=pair; const int INF=1001001001; const int mod=1e9+7; void solve(){ ll h,w,d; cin>>h>>w>>d; bool ok=false; if(h%2==0&&w%2==0){ ok=min(h,w)<=d; } else if(h%2==0&&w%2!=0){ ok=min(h*h+1,w*w)<=d*d; } else if(h%2!=0&&w%2==0){ ok=min(h*h,w*w+1)<=d*d; } else{ ok=min(h*h+1,w*w+1)<=d*d; } cout<<(ok?"N":"S")<>t; rep(i,t){ solve(); } return 0; }