t = int(input()) for _ in range(t): h, w, d = [int(v) for v in input().split()] ans = 'N' if h * h + w * w > d * d: ans = 'S' print(ans)