T = int(input()) for i in range(T): H, W, D = map(int, input().split()) h,w=H*H,W*W if H%2==0 and W%2==0:a,b=h,w elif H%2==0 and W%2==1:a,b=h+1,w elif H%2==1 and W%2==0:a,b=h,w+1 else:a,b=h+1,w+1 print('N' if D*D>=min(a,b) else 'S')