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