t = int(input()) for _ in range(t): h, w, d = map(int, input().split()) if h % 2 == 1: x = w ** 2 + 1 else: x = w ** 2 if w % 2 == 1: y = h ** 2 + 1 else: y = h ** 2 if min(x, y) <= d ** 2: print('N') else: print('S')