T = int(input()) for _ in range(T): h,w,d = map(int,input().split()) if d * d < h * h + w * w: print('S') else: print('N')