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