N=int(input()) for _ in range(N): a,b,c=map(int,input().split()) if min(a**2 + (b%2)**2,b**2 + (a%2)**2) <= c**2: print("N") else: print("S")