#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define getrp() ({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);}) #define rd_skip() while(*rp++>=48) #define rd() ({long _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;}) typedef unsigned long ulong; char wbuf[1<<25]; int main(){ char*rp=getrp(); char*wp=wbuf; rd_skip(); while(*rp){ long h=rd(); h*=h; long w=rd(); w*=w; long d=rd(); d*=d; *(int*)wp=h+(w&1)>d&w+(h&1)>d?'\nS':'\nN'; wp+=2; } write(1,wbuf,wp-wbuf); _exit(0); }